Package org.appng.core.domain
Class TemplateResource
- java.lang.Object
-
- org.appng.core.domain.TemplateResource
-
- All Implemented Interfaces:
Serializable
,Identifiable<Integer>
,Nameable
,Named<Integer>
,Resource
@Entity public class TemplateResource extends Object implements Resource
Representats aResource
of an appNG template.- Author:
- Matthias Müller
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TemplateResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
calculateChecksum()
boolean
equals(Object o)
byte[]
getBytes()
Returns the byte data of theResource
.File
getCachedFile()
Returns a cached version of theResource
s file.String
getCheckSum()
Returns the checksum of the byte dataString
getDescription()
Returns the description.Date
getFileVersion()
Integer
getId()
Returns the id.String
getName()
Returns the name.ResourceType
getResourceType()
Returns the type of thisResource
.int
getSize()
Returns the size (in bytes) of thisResource
.Template
getTemplate()
Date
getVersion()
int
hashCode()
void
setBytes(byte[] bytes)
void
setCachedFile(File cachedFile)
Sets the cached version of theResource
s file.void
setCheckSum(String checkSum)
void
setDescription(String description)
void
setFileVersion(Date fileVersion)
void
setId(Integer id)
void
setName(String name)
void
setResourceType(ResourceType type)
void
setTemplate(Template template)
void
setVersion(Date version)
-
-
-
Method Detail
-
getId
public Integer getId()
Description copied from interface:Identifiable
Returns the id.- Specified by:
getId
in interfaceIdentifiable<Integer>
- Returns:
- the id
-
setId
public void setId(Integer id)
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
Description copied from interface:Nameable
Returns the description.- Specified by:
getDescription
in interfaceNameable
- Returns:
- the description
-
setDescription
public void setDescription(String description)
-
getFileVersion
public Date getFileVersion()
-
setFileVersion
public void setFileVersion(Date fileVersion)
-
getVersion
public Date getVersion()
-
setVersion
public void setVersion(Date version)
-
getTemplate
public Template getTemplate()
-
setTemplate
public void setTemplate(Template template)
-
getResourceType
public ResourceType getResourceType()
Description copied from interface:Resource
Returns the type of thisResource
.- Specified by:
getResourceType
in interfaceResource
- Returns:
- the type
-
setResourceType
public void setResourceType(ResourceType type)
-
getBytes
public byte[] getBytes()
Description copied from interface:Resource
Returns the byte data of theResource
.
-
setBytes
public void setBytes(byte[] bytes)
-
getCachedFile
public File getCachedFile()
Description copied from interface:Resource
Returns a cached version of theResource
s file.- Specified by:
getCachedFile
in interfaceResource
- Returns:
- the cached file
-
setCachedFile
public void setCachedFile(File cachedFile)
Description copied from interface:Resource
Sets the cached version of theResource
s file.- Specified by:
setCachedFile
in interfaceResource
- Parameters:
cachedFile
- the cached file
-
getCheckSum
public String getCheckSum()
Description copied from interface:Resource
Returns the checksum of the byte data- Specified by:
getCheckSum
in interfaceResource
- Returns:
- the checksum of the byte data
-
setCheckSum
public void setCheckSum(String checkSum)
-
getSize
public int getSize()
Description copied from interface:Resource
Returns the size (in bytes) of thisResource
.
-
calculateChecksum
public String calculateChecksum()
-
-