@Service public class DistributedApplicationStore extends ApplicationArchive implements ApplicationStore
| Modifier and Type | Class and Description |
|---|---|
static class |
DistributedApplicationStore.InternalState |
| Modifier and Type | Field and Description |
|---|---|
protected ClusterCommunicationService |
clusterCommunicator |
protected ClusterService |
clusterService |
protected ApplicationIdStore |
idStore |
protected StorageService |
storageService |
protected VersionService |
versionService |
delegate| Constructor and Description |
|---|
DistributedApplicationStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
activate(ApplicationId appId)
Mark the application as active.
|
Application |
create(InputStream appDescStream)
Creates the application from the specified application descriptor
input stream.
|
void |
deactivate() |
void |
deactivate(ApplicationId appId)
Mark the application as deactivated.
|
Application |
getApplication(ApplicationId appId)
Returns the application with the supplied application identifier.
|
InputStream |
getApplicationArchive(ApplicationId appId)
Returns stream that contains the application OAR/JAR file contents.
|
Set<Application> |
getApplications()
Returns the set of all installed applications.
|
ApplicationId |
getId(String name)
Returns the registered id of the application with the given name.
|
Set<Permission> |
getPermissions(ApplicationId appId)
Returns the permissions granted to the applications.
|
ApplicationState |
getState(ApplicationId appId)
Returns the current application state.
|
void |
remove(ApplicationId appId)
Removes the specified application.
|
void |
setDelegate(ApplicationStoreDelegate delegate)
Sets the delegate on the store.
|
void |
setPermissions(ApplicationId appId,
Set<Permission> permissions)
Updates the permissions granted to the applications.
|
clearActive, getApplicationDescription, getApplicationInputStream, getApplicationNames, getRole, getRootPath, getUpdateTime, isActive, purgeApplication, saveApplication, setActive, setRootPath, updateTimehasDelegate, notifyDelegate, notifyDelegate, unsetDelegateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasDelegate, unsetDelegate@Reference(cardinality=MANDATORY_UNARY) protected ClusterCommunicationService clusterCommunicator
@Reference(cardinality=MANDATORY_UNARY) protected ClusterService clusterService
@Reference(cardinality=MANDATORY_UNARY) protected StorageService storageService
@Reference(cardinality=MANDATORY_UNARY) protected ApplicationIdStore idStore
@Reference(cardinality=MANDATORY_UNARY) protected VersionService versionService
@Activate public void activate()
@Deactivate public void deactivate()
public void setDelegate(ApplicationStoreDelegate delegate)
StoresetDelegate in interface Store<ApplicationEvent,ApplicationStoreDelegate>setDelegate in class AbstractStore<ApplicationEvent,ApplicationStoreDelegate>delegate - new store delegatepublic Set<Application> getApplications()
ApplicationStoregetApplications in interface ApplicationStorepublic ApplicationId getId(String name)
ApplicationStoregetId in interface ApplicationStorename - application namepublic Application getApplication(ApplicationId appId)
ApplicationStoregetApplication in interface ApplicationStoreappId - application identifierpublic ApplicationState getState(ApplicationId appId)
ApplicationStoregetState in interface ApplicationStoreappId - application identifierpublic Application create(InputStream appDescStream)
ApplicationStorecreate in interface ApplicationStoreappDescStream - application archive input streampublic void remove(ApplicationId appId)
ApplicationStoreremove in interface ApplicationStoreappId - application identifierpublic void activate(ApplicationId appId)
ApplicationStoreactivate in interface ApplicationStoreappId - application identifierpublic void deactivate(ApplicationId appId)
ApplicationStoredeactivate in interface ApplicationStoreappId - application identifierpublic Set<Permission> getPermissions(ApplicationId appId)
ApplicationStoregetPermissions in interface ApplicationStoreappId - application identifierpublic void setPermissions(ApplicationId appId, Set<Permission> permissions)
ApplicationStoresetPermissions in interface ApplicationStoreappId - application identifierpermissions - set of granted permissionspublic InputStream getApplicationArchive(ApplicationId appId)
ApplicationStoregetApplicationArchive in interface ApplicationStoreappId - application identifier