public class ApplicationArchive extends AbstractStore<ApplicationEvent,ApplicationStoreDelegate>
delegate| Constructor and Description | 
|---|
ApplicationArchive()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected boolean | 
clearActive(String appName)
Clears the app as active by deleting token file in the app directory. 
 | 
ApplicationDescription | 
getApplicationDescription(String appName)
Loads the application descriptor from the specified application archive
 stream and saves the stream in the appropriate application archive
 directory. 
 | 
InputStream | 
getApplicationInputStream(String appName)
Returns application archive stream for the specified application. 
 | 
Set<String> | 
getApplicationNames()
Returns the set of installed application names. 
 | 
ApplicationRole | 
getRole(String value)  | 
String | 
getRootPath()
Returns the root directory where apps directory is contained. 
 | 
long | 
getUpdateTime(String appName)
Returns the timestamp in millis since start of epoch, of when the
 specified application was last modified or changed state. 
 | 
protected boolean | 
isActive(String appName)
Indicates whether the app was marked as active by checking for token file. 
 | 
void | 
purgeApplication(String appName)
Purges the application archive directory. 
 | 
ApplicationDescription | 
saveApplication(InputStream stream)
Loads the application descriptor from the specified application archive
 stream and saves the stream in the appropriate application archive
 directory. 
 | 
protected boolean | 
setActive(String appName)
Marks the app as active by creating token file in the app directory. 
 | 
protected void | 
setRootPath(String root)
Sets the root directory where apps directory is contained. 
 | 
protected boolean | 
updateTime(String appName)
Updates the time-stamp of the app descriptor file. 
 | 
hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegateprotected void setRootPath(String root)
root - top-level directory pathpublic String getRootPath()
public Set<String> getApplicationNames()
public long getUpdateTime(String appName)
appName - application namepublic ApplicationDescription getApplicationDescription(String appName)
appName - application nameApplicationException - if unable to read application descriptionpublic ApplicationDescription saveApplication(InputStream stream)
stream - application archive streamApplicationException - if unable to read the
                                                  archive stream or store
                                                  the application archivepublic void purgeApplication(String appName)
appName - application namepublic InputStream getApplicationInputStream(String appName)
appName - application nameprotected boolean setActive(String appName)
appName - application nameprotected boolean clearActive(String appName)
appName - application nameprotected boolean updateTime(String appName)
appName - application nameprotected boolean isActive(String appName)
appName - application namepublic ApplicationRole getRole(String value)