public interface Application
Two applications are equals if and only if they have the same identifier.
Modifier and Type | Interface and Description |
---|---|
static class |
Application.State
Represents an application state.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getIdentifier()
Gets the application identifier.
|
java.lang.String |
getProperty(java.lang.String key)
Gets an application property.
|
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Gets an input stream for reading the specified resource from the application.
|
Application.State |
getState()
Returns the current application state.
|
java.lang.String |
getVersion()
Gets the application version.
|
void |
install()
Deprecated.
|
void |
install(IProgressMonitor monitor)
Deprecated.
|
void |
start()
Causes this application to start.
|
void |
start(IProgressMonitor monitor)
Causes this application to start.
|
void |
stop()
Causes this application to stop.
|
void |
uninstall()
Causes the application to be uninstalled.
|
java.lang.String getIdentifier()
The identifier remains the same even between different application version.
java.lang.String getVersion()
java.io.InputStream getResourceAsStream(java.lang.String name) throws java.lang.IllegalStateException
name
- the resource name.null
if the
resource could not be found.java.lang.IllegalStateException
- if the application state is not Application.State.STARTED
state.java.lang.String getProperty(java.lang.String key) throws java.lang.IllegalStateException
key
- the property key to search.null
if not existing.java.lang.IllegalStateException
- if the application state is not Application.State.STARTED
state.Application.State getState()
Application.State
@Deprecated void install() throws java.lang.IllegalStateException, java.lang.SecurityException, ApplicationOperationException
java.lang.IllegalStateException
- if the application state is not Application.State.UNINSTALLED
state.java.lang.SecurityException
- if a security manager exits and if the caller does not have the
appropriate permissions.ApplicationOperationException
- If any unexpected errors occur while installing this application.@Deprecated void install(IProgressMonitor monitor) throws java.lang.IllegalStateException, java.lang.SecurityException, ApplicationOperationException
monitor
- the progress monitor to use for reporting progress to the user. It
is the caller's responsibility to call done() on the given
monitor. Accepts null
, indicating that no progress
should be reported and that the operation cannot be cancelled.java.lang.IllegalStateException
- if the application state is not Application.State.UNINSTALLED
state.java.lang.SecurityException
- if a security manager exits and if the caller does not have the
appropriate permissions.ApplicationOperationException
- If any unexpected errors occur while installing this application.void start() throws java.lang.IllegalStateException, java.lang.SecurityException, ApplicationOperationException
Application.State.STARTED
state and this method returns.java.lang.IllegalStateException
- if the application state is not Application.State.INSTALLED
state.java.lang.SecurityException
- if a security manager exits and if the caller does not have the
appropriate permissions.ApplicationOperationException
- If any unexpected errors occur while starting this application.void start(IProgressMonitor monitor) throws java.lang.IllegalStateException, java.lang.SecurityException, ApplicationOperationException
Application.State.STARTED
state and this method returns.monitor
- the progress monitor to use for reporting progress to the user. It
is the caller's responsibility to call done() on the given
monitor. Accepts null
, indicating that no progress
should be reported and that the operation cannot be cancelled.java.lang.IllegalStateException
- if the application state is not Application.State.INSTALLED
state.java.lang.SecurityException
- if a security manager exits and if the caller does not have the
appropriate permissions.ApplicationOperationException
- If any unexpected errors occur while starting this application.void stop() throws java.lang.IllegalStateException, java.lang.SecurityException, ApplicationOperationException
Application.State.INSTALLED
state and this method returns.java.lang.IllegalStateException
- if the application is in the Application.State.INSTALLED
or
Application.State.UNINSTALLED
state.java.lang.SecurityException
- if a security manager exits and if the caller does not have the
appropriate permissions.ApplicationOperationException
- If any unexpected errors occur while stopping this application.void uninstall() throws java.lang.IllegalStateException, java.lang.SecurityException, ApplicationOperationException
java.lang.IllegalStateException
- if the application is not in the Application.State.INSTALLED
state.java.lang.SecurityException
- if a security manager exits and if the caller does not have the
appropriate permissions.ApplicationOperationException
- If any unexpected errors occur while uninstalling this
application.