public interface ApplicationService extends ListenerService<ApplicationEvent,ApplicationListener>
Modifier and Type | Method and Description |
---|---|
Application |
getApplication(ApplicationId appId)
Returns the application with the supplied application identifier.
|
default java.io.InputStream |
getApplicationArchive(ApplicationId appId)
Returns stream that contains the application OAR/JAR file contents.
|
java.util.Set<Application> |
getApplications()
Returns the set of all installed applications.
|
ApplicationId |
getId(java.lang.String name)
Returns the registered id of the application with the given name.
|
java.util.Set<Permission> |
getPermissions(ApplicationId appId)
Returns the permissions currently granted to the applications.
|
ApplicationState |
getState(ApplicationId appId)
Return the application state.
|
void |
registerDeactivateHook(ApplicationId appId,
java.lang.Runnable hook)
Registers application pre-deactivation processing hook.
|
addListener, removeListener
java.util.Set<Application> getApplications()
ApplicationId getId(java.lang.String name)
name
- application nameApplication getApplication(ApplicationId appId)
appId
- application identifierApplicationState getState(ApplicationId appId)
appId
- application identifierjava.util.Set<Permission> getPermissions(ApplicationId appId)
appId
- application identifiervoid registerDeactivateHook(ApplicationId appId, java.lang.Runnable hook)
appId
- application identifierhook
- pre-deactivation hookdefault java.io.InputStream getApplicationArchive(ApplicationId appId)
appId
- application identifier