Package org.deltava.beans.fleet
Class LibraryEntry
java.lang.Object
org.deltava.beans.fleet.LibraryEntry
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<LibraryEntry>
,Auditable
,ViewEntry
,Cacheable
- Direct Known Subclasses:
FileEntry
,FleetEntry
,Newsletter
public abstract class LibraryEntry
extends Object
implements Comparable<LibraryEntry>, Cacheable, ViewEntry, Auditable
An abstract bean to store information about Library entries.
- Since:
- 1.0
- Version:
- 10.4
- Author:
- Luke
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
cacheKey()
Returns the cache key for this object.int
file()
Returns the underlying filesystem entry.Returns the object ID for this auditable object.Returns a description of this resource.int
Returns the number of times this resource has been downloaded.Returns the filename of the resource, without paths.Gets the full pathname of the resource on the local filesystem.final String
getName()
Returns the name of the resource.getOwner()
Returns the owning Virtual Airline.Returns the CSS class for this object if rendered in a view table.Returns this resource's security level.long
getSize()
Returns the size of the resource.int
hashCode()
void
setDescription
(String desc) Updates the description of this resource.void
setDownloadCount
(int count) Updates the number of times this resource has been downloaded.void
Updates the name of this resource.void
Updates the owning Virtual Airline.void
setSecurity
(Security level) Updates this resource's security level.void
setSize
(long size) Updates the size of this resource.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.Auditable
getAuditType, isCrossApp
-
Constructor Details
-
LibraryEntry
-
-
Method Details
-
getName
-
getFullName
Gets the full pathname of the resource on the local filesystem.- Returns:
- the full path to the resource
- See Also:
-
getFileName
Returns the filename of the resource, without paths.- Returns:
- the filename
- See Also:
-
getDescription
Returns a description of this resource.- Returns:
- the resource's description
- See Also:
-
getOwner
Returns the owning Virtual Airline.- Returns:
- an AirlineInformation bean
- See Also:
-
getDownloadCount
public int getDownloadCount()Returns the number of times this resource has been downloaded.- Returns:
- the number of downloads
- See Also:
-
getSecurity
Returns this resource's security level.- Returns:
- the security level for this entry
- See Also:
-
getSize
public long getSize()Returns the size of the resource.- Returns:
- the size of the resource in bytes, or 0 if it does not exist on the filesystem
- See Also:
-
setDownloadCount
public void setDownloadCount(int count) Updates the number of times this resource has been downloaded.- Parameters:
count
- the download count
-
setDescription
Updates the description of this resource.- Parameters:
desc
- the description- Throws:
NullPointerException
- if desc is null- See Also:
-
setName
Updates the name of this resource.- Parameters:
name
- the name- Throws:
NullPointerException
- if name is null- See Also:
-
setSize
public void setSize(long size) Updates the size of this resource.- Parameters:
size
- the size of the file in bytes- See Also:
-
setSecurity
Updates this resource's security level.- Parameters:
level
- the security level code- See Also:
-
setOwner
Updates the owning Virtual Airline.- Parameters:
ai
- an AirlineInfromation bean- See Also:
-
file
-
getAuditID
Description copied from interface:Auditable
Returns the object ID for this auditable object.- Specified by:
getAuditID
in interfaceAuditable
- Returns:
- the ID
-
compareTo
- Specified by:
compareTo
in interfaceComparable<LibraryEntry>
-
hashCode
-
getRowClassName
Description copied from interface:ViewEntry
Returns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name, or NULL if none
-
cacheKey
-
toString
-