public class ApplicationArchive
extends org.onosproject.store.AbstractStore<org.onosproject.app.ApplicationEvent,org.onosproject.app.ApplicationStoreDelegate>
| Constructor and Description |
|---|
ApplicationArchive() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
clearActive(java.lang.String appName)
Clears the app as active by deleting token file in the app directory.
|
org.onosproject.app.ApplicationDescription |
getApplicationDescription(java.lang.String appName)
Loads the application descriptor from the specified application archive
stream and saves the stream in the appropriate application archive
directory.
|
java.io.InputStream |
getApplicationInputStream(java.lang.String appName)
Returns application archive stream for the specified application.
|
java.util.Set<java.lang.String> |
getApplicationNames()
Returns the set of installed application names.
|
org.onosproject.core.ApplicationRole |
getRole(java.lang.String value) |
java.lang.String |
getRootPath()
Returns the root directory where apps directory is contained.
|
long |
getUpdateTime(java.lang.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(java.lang.String appName)
Indicates whether the app was marked as active by checking for token file.
|
void |
purgeApplication(java.lang.String appName)
Purges the application archive directory.
|
org.onosproject.app.ApplicationDescription |
saveApplication(java.io.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(java.lang.String appName)
Marks the app as active by creating token file in the app directory.
|
protected void |
setRootPath(java.lang.String root)
Sets the root directory where apps directory is contained.
|
protected boolean |
updateTime(java.lang.String appName)
Updates the time-stamp of the app descriptor file.
|
protected void setRootPath(java.lang.String root)
root - top-level directory pathpublic java.lang.String getRootPath()
public java.util.Set<java.lang.String> getApplicationNames()
public long getUpdateTime(java.lang.String appName)
appName - application namepublic org.onosproject.app.ApplicationDescription getApplicationDescription(java.lang.String appName)
appName - application nameorg.onosproject.app.ApplicationException - if unable to read application descriptionpublic org.onosproject.app.ApplicationDescription saveApplication(java.io.InputStream stream)
stream - application archive streamorg.onosproject.app.ApplicationException - if unable to read the
archive stream or store
the application archivepublic void purgeApplication(java.lang.String appName)
appName - application namepublic java.io.InputStream getApplicationInputStream(java.lang.String appName)
appName - application nameprotected boolean setActive(java.lang.String appName)
appName - application nameprotected boolean clearActive(java.lang.String appName)
appName - application nameprotected boolean updateTime(java.lang.String appName)
appName - application nameprotected boolean isActive(java.lang.String appName)
appName - application namepublic org.onosproject.core.ApplicationRole getRole(java.lang.String value)