public class FileData extends CommonData implements DiskConsumableData, LoggableData, SubtypableData
File
,
Developer documentation: Files and directoriesModifier and Type | Field and Description |
---|---|
private int |
action |
private java.lang.String |
charset |
private boolean |
compressed |
private long |
compressedSize |
private DirectoryData |
directory |
private DiskUsageData |
diskUsage |
private FileServerData |
fileServer |
private java.lang.String |
internalName |
private java.util.Date |
lastUpdate |
private int |
location |
static int |
MAX_CHARSET_LENGTH |
static int |
MAX_MIMETYPE_LENGTH |
static int |
MAX_URL_LENGTH |
private java.lang.String |
md5 |
private java.lang.String |
mimeType |
private long |
size |
private ItemSubtypeData |
subtype |
private java.lang.String |
url |
private boolean |
writeProtected |
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
FileData() |
Modifier and Type | Method and Description |
---|---|
int |
getAction()
Deprecated.
In 3.14, no replacement
|
java.lang.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. |
java.lang.String |
getInternalName()
Get the internal name accosiated with this file.
|
ItemSubtypeData |
getItemSubtype()
Get the subtype of the item.
|
java.util.Date |
getLastUpdate()
Get the date and time the actual file data was last updated.
|
int |
getLocation()
Get the
Location of this FileData |
java.lang.String |
getMd5()
Get the MD5 hash of the file contents.
|
java.lang.String |
getMimeType()
Get the mime type of this
FileData item. |
java.lang.String |
getName()
Get the name of the item.
|
long |
getSize()
Get the size in bytes for this
FileData object. |
java.lang.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)
Deprecated.
|
void |
setCharacterSet(java.lang.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(java.lang.String internalName) |
void |
setItemSubtype(ItemSubtypeData subtype)
Set the subtype of the item.
|
void |
setLastUpdate(java.util.Date lastUpdate) |
void |
setLocation(int location) |
void |
setMd5(java.lang.String md5) |
void |
setMimeType(java.lang.String mimeType) |
void |
setSize(long size) |
void |
setUrl(java.lang.String url) |
void |
setWriteProtected(boolean writeProtected) |
getDescription, getRemovedBy, setDescription, setName, setRemovedBy
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 java.lang.String md5
private int action
private int location
private java.lang.String mimeType
public static final int MAX_MIMETYPE_LENGTH
private java.lang.String charset
public static final int MAX_CHARSET_LENGTH
private DirectoryData directory
private boolean writeProtected
private java.util.Date lastUpdate
private boolean compressed
private long compressedSize
private java.lang.String internalName
private java.lang.String url
public static final int MAX_URL_LENGTH
private FileServerData fileServer
public java.lang.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 java.lang.String getMd5()
public void setMd5(java.lang.String md5)
@Deprecated public int getAction()
FileData
object.@Deprecated public void setAction(int action)
public int getLocation()
Location
of this FileData
public void setLocation(int location)
public java.lang.String getMimeType()
FileData
item.public void setMimeType(java.lang.String mimeType)
public java.lang.String getCharacterSet()
public void setCharacterSet(java.lang.String charset)
public DirectoryData getDirectory()
DirectoryData
item.public void setDirectory(DirectoryData directory)
public boolean isWriteProtected()
public void setWriteProtected(boolean writeProtected)
public java.util.Date getLastUpdate()
Date
object, or null if no file has been uploadedpublic void setLastUpdate(java.util.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 java.lang.String getInternalName()
public void setInternalName(java.lang.String internalName)
public java.lang.String getUrl()
public void setUrl(java.lang.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)