Package org.appng.api.model
Interface Resource
-
- All Superinterfaces:
Identifiable<Integer>
,Nameable
,Named<Integer>
,Serializable
- All Known Implementing Classes:
ResourceImpl
,TemplateResource
public interface Resource extends Named<Integer>
AApplication
provides severalResource
s, which are needed to load and execute theApplication
. AResource
is created from the physical files that come with aApplication
.- Author:
- Matthias Herlitzius
- See Also:
ResourceType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 dataResourceType
getResourceType()
Returns the type of thisResource
.int
getSize()
Returns the size (in bytes) of thisResource
.void
setCachedFile(File cachedFile)
Sets the cached version of theResource
s file.-
Methods inherited from interface org.appng.api.model.Identifiable
getId
-
Methods inherited from interface org.appng.api.model.Nameable
getDescription, getName
-
-
-
-
Method Detail
-
getResourceType
ResourceType getResourceType()
Returns the type of thisResource
.- Returns:
- the type
-
getBytes
byte[] getBytes()
Returns the byte data of theResource
.- Returns:
- the byte data
-
getSize
int getSize()
Returns the size (in bytes) of thisResource
.- Returns:
- the size (in bytes)
-
getCachedFile
File getCachedFile()
Returns a cached version of theResource
s file.- Returns:
- the cached file
-
setCachedFile
void setCachedFile(File cachedFile)
Sets the cached version of theResource
s file.- Parameters:
cachedFile
- the cached file
-
getCheckSum
String getCheckSum()
Returns the checksum of the byte data- Returns:
- the checksum of the byte data
-
-