|
3.0.2: 2012-01-25 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.data.BasicData
net.sf.basedb.core.data.OwnedData
net.sf.basedb.core.data.SharedData
net.sf.basedb.core.data.CommonData
net.sf.basedb.core.data.FileData
public class FileData
This class holds information about a file.
File
,
Developer documentation: Files and directoriesField Summary | |
---|---|
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
|
Fields inherited from interface net.sf.basedb.core.data.NameableData |
---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
Constructor Summary | |
---|---|
FileData()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class net.sf.basedb.core.data.CommonData |
---|
getDescription, isRemoved, setDescription, setName, setRemoved |
Methods inherited from class net.sf.basedb.core.data.SharedData |
---|
getItemKey, getProjectKey, setItemKey, setProjectKey |
Methods inherited from class net.sf.basedb.core.data.OwnedData |
---|
getOwner, setOwner |
Methods inherited from class net.sf.basedb.core.data.BasicData |
---|
equals, getId, getVersion, hashCode, setId, setVersion, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.data.OwnableData |
---|
getOwner, setOwner |
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData |
---|
getId, getVersion |
Field Detail |
---|
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
Constructor Detail |
---|
public FileData()
Method Detail |
---|
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)
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)
|
3.0.2: 2012-01-25 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |