public class ApplicationStandalone extends java.lang.Object implements Application, ApplicationMetadata
Application.State
Constructor and Description |
---|
ApplicationStandalone() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApplicationIdentifier()
Gets the application identifier.
|
java.lang.String |
getDescription()
Gets the application description.
|
ImageInfo[] |
getIconsList()
Gets the list of icons for this application.
|
java.lang.String |
getIdentifier()
Gets the application identifier.
|
java.lang.String |
getName()
Gets the application name.
|
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.
|
ImageInfo[] |
getScreenshotsList()
Gets the list of screenshots for this application.
|
Application.State |
getState()
Returns the current application state.
|
java.lang.String |
getVersion()
Gets the application version.
|
void |
install()
Causes this application to be installed.
|
void |
install(IProgressMonitor monitor)
Causes this application to be installed.
|
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.
|
public java.lang.String getIdentifier()
Application
The identifier remains the same even between different application version.
getIdentifier
in interface Application
public java.lang.String getName()
ApplicationMetadata
getName
in interface ApplicationMetadata
public java.lang.String getVersion()
Application
getVersion
in interface Application
getVersion
in interface ApplicationMetadata
public ImageInfo[] getIconsList()
ApplicationMetadata
getIconsList
in interface ApplicationMetadata
public java.io.InputStream getResourceAsStream(java.lang.String name)
Application
getResourceAsStream
in interface Application
name
- the resource name.null
if the
resource could not be found.public java.lang.String getProperty(java.lang.String key)
Application
getProperty
in interface Application
key
- the property key to search.null
if not existing.public Application.State getState()
Application
getState
in interface Application
Application.State
public void install() throws java.lang.IllegalStateException
Application
install
in interface Application
java.lang.IllegalStateException
- if the application state is not Application.State.UNINSTALLED
state.public void start() throws java.lang.IllegalStateException
Application
Application.State.STARTED
state and this method returns.start
in interface Application
java.lang.IllegalStateException
- if the application state is not Application.State.INSTALLED
state.public void install(IProgressMonitor monitor) throws java.lang.IllegalStateException
Application
install
in interface Application
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.public void stop() throws java.lang.IllegalStateException
Application
Application.State.INSTALLED
state and this method returns.stop
in interface Application
java.lang.IllegalStateException
- if the application is in the Application.State.INSTALLED
or
Application.State.UNINSTALLED
state.public void start(IProgressMonitor monitor) throws java.lang.IllegalStateException
Application
Application.State.STARTED
state and this method returns.start
in interface Application
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.public void uninstall() throws java.lang.IllegalStateException
Application
uninstall
in interface Application
java.lang.IllegalStateException
- if the application is not in the Application.State.INSTALLED
state.public java.lang.String getDescription()
ApplicationMetadata
getDescription
in interface ApplicationMetadata
public ImageInfo[] getScreenshotsList()
ApplicationMetadata
getScreenshotsList
in interface ApplicationMetadata
public java.lang.String getApplicationIdentifier()
ApplicationMetadata
getApplicationIdentifier
in interface ApplicationMetadata