public class FileData extends CommonData implements DiskConsumableData, LoggableData, SubtypableData
File
,
Developer documentation: Files and directoriesModifier and Type | Field and Description |
---|---|
private int |
action |
private String |
charset |
private boolean |
compressed |
private long |
compressedSize |
private DirectoryData |
directory |
private DiskUsageData |
diskUsage |
private FileServerData |
fileServer |
private String |
internalName |
private Date |
lastUpdate |
private int |
location |
static int |
MAX_CHARSET_LENGTH |
static int |
MAX_MIMETYPE_LENGTH |
static int |
MAX_URL_LENGTH |
private String |
md5 |
private String |
mimeType |
private long |
size |
private ItemSubtypeData |
subtype |
private String |
url |
private boolean |
writeProtected |
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
FileData() |
Modifier and Type | Method and Description |
---|---|
int |
getAction()
Get the value of the action variable for this
FileData
object. |
String |
getCharacterSet()
Get the character set used in this file (for text-files only).
|
long |
getCompressedSize()
Get the size in bytes that this
FileData object
uses after compression. |
DirectoryData |
getDirectory()
Get the associated
DirectoryData item. |
DiskUsageData |
getDiskUsage()
Get the
DiskUsageData that this item use. |
FileServerData |
getFileServer()
Get the associated
FileServerData item. |
String |
getInternalName()
Get the internal name accosiated with this file.
|
ItemSubtypeData |
getItemSubtype()
Get the subtype of the item.
|
Date |
getLastUpdate()
Get the date and time the actual file data was last updated.
|
int |
getLocation()
Get the
Location of this FileData |
String |
getMd5()
Get the MD5 hash of the file contents.
|
String |
getMimeType()
Get the mime type of this
FileData item. |
String |
getName()
Get the name of the item.
|
long |
getSize()
Get the size in bytes for this
FileData object. |
String |
getUrl()
Get the URL to the file.
|
boolean |
isCompressed()
If the file is stored in a compressed format or not.
|
boolean |
isWriteProtected()
If the actual file contents should be write protected or not.
|
void |
setAction(int action) |
void |
setCharacterSet(String charset) |
void |
setCompressed(boolean compressed) |
void |
setCompressedSize(long compressedSize) |
void |
setDirectory(DirectoryData directory) |
(package private) void |
setDiskUsage(DiskUsageData diskUsage) |
void |
setFileServer(FileServerData fileServer) |
void |
setInternalName(String internalName) |
void |
setItemSubtype(ItemSubtypeData subtype)
Set the subtype of the item.
|
void |
setLastUpdate(Date lastUpdate) |
void |
setLocation(int location) |
void |
setMd5(String md5) |
void |
setMimeType(String mimeType) |
void |
setSize(long size) |
void |
setUrl(String url) |
void |
setWriteProtected(boolean writeProtected) |
getDescription, isRemoved, setDescription, setName, setRemoved
getItemKey, getProjectKey, setItemKey, setProjectKey
equals, getId, getVersion, hashCode, setId, setVersion, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOwner, setOwner
getId, getVersion
private DiskUsageData diskUsage
private ItemSubtypeData subtype
private long size
private String md5
private int action
private int location
private String mimeType
public static final int MAX_MIMETYPE_LENGTH
private String charset
public static final int MAX_CHARSET_LENGTH
private DirectoryData directory
private boolean writeProtected
private Date lastUpdate
private boolean compressed
private long compressedSize
private String internalName
private String url
public static final int MAX_URL_LENGTH
private FileServerData fileServer
public String getName()
getName
in interface NameableData
getName
in class CommonData
String
with the name of the itempublic DiskUsageData getDiskUsage()
DiskConsumableData
DiskUsageData
that this item use.getDiskUsage
in interface DiskConsumableData
void setDiskUsage(DiskUsageData diskUsage)
public ItemSubtypeData getItemSubtype()
SubtypableData
getItemSubtype
in interface SubtypableData
public void setItemSubtype(ItemSubtypeData subtype)
SubtypableData
setItemSubtype
in interface SubtypableData
public long getSize()
FileData
object.public void setSize(long size)
public String getMd5()
public void setMd5(String md5)
public int getAction()
FileData
object.public void setAction(int action)
public int getLocation()
Location
of this FileData
public void setLocation(int location)
public String getMimeType()
FileData
item.public void setMimeType(String mimeType)
public String getCharacterSet()
public void setCharacterSet(String charset)
public DirectoryData getDirectory()
DirectoryData
item.public void setDirectory(DirectoryData directory)
public boolean isWriteProtected()
public void setWriteProtected(boolean writeProtected)
public Date getLastUpdate()
Date
object, or null if no file has been uploadedpublic void setLastUpdate(Date lastUpdate)
public boolean isCompressed()
public void setCompressed(boolean compressed)
public long getCompressedSize()
FileData
object
uses after compression. If the file is not compressed, this value
is the same as getSize()
public void setCompressedSize(long compressedSize)
@NotLoggable @PropertyPathProtected public String getInternalName()
public void setInternalName(String internalName)
public String getUrl()
public void setUrl(String url)
public FileServerData getFileServer()
FileServerData
item. This property is only
set/valid for files that are stored externally (location=EXTERNAL).public void setFileServer(FileServerData fileServer)