Package com.e1c.g5.dt.applications
Interface IApplicationManager
-
public interface IApplicationManager
The application manager is the core service of the application framework. It allows to get and introspect workspace applications based on the registred application contributions.- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAppllicationListener(IApplicationListener listener)
Adds the application listener to listen to application events.boolean
check(IApplication application, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
Checks and returns whether the application is ready to launch e.g.Optional<IApplication>
getApplication(org.eclipse.core.resources.IProject project, String id)
Returns the project application with the provided id.List<IApplicationArtifact>
getApplicationArtifacts(Object object)
Returns a list of all found application artifacts for the provided application or application artifact.List<IApplication>
getApplications(org.eclipse.core.resources.IProject project)
Returns a list of all registered project applications.List<IApplicationType>
getApplicationTypes()
Returns a list of all registered application types.Optional<IApplication>
getDefaultApplication(org.eclipse.core.resources.IProject project)
Returns the default registered project application.Optional<org.eclipse.core.resources.IProject>
getDefaultProject()
Returns the default application owner project if there is any.Optional<IUrlAccess>
getDefaultUrlAccess(IApplication application)
Returns the default URL access instance for the provided application.LifecycleState
getLifecycleState(ILifecycleAware object)
Returns the application lifecycle state for the provided application or lifecycle aware artifact.PublishState
getPublishState(IApplication application)
Returns the application publish state for the provided application.List<IUrlAccess>
getUrlAccesses(IApplication application)
Returns a list of all found URL access instances for the provided application.ExecutionContext
launch(IApplication application, String launchMode, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
Publishes the application with the provided publish kind.Optional<Process>
open(IApplication application, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
Opens the application and launches application client.PublishState
publish(IApplication application, PublishKind kind, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
Publishes the application with the provided publish kind.void
removeAppllicationListener(IApplicationListener listener)
Removes the application listener.void
setDefaultApplication(org.eclipse.core.resources.IProject project, IApplication application)
Sets the default registered project application.void
setDefaultUrlAccess(IApplication application, IUrlAccess urlAccess)
Sets the default URL access instance for the provided application.
-
-
-
Method Detail
-
getApplication
Optional<IApplication> getApplication(org.eclipse.core.resources.IProject project, String id) throws ApplicationException
Returns the project application with the provided id.- Parameters:
project
- the project to get application for, cannot benull
id
- the id of the application, cannot benull
- Returns:
- the optional found application
- Throws:
ApplicationException
- if method call failed with some reason
-
getApplications
List<IApplication> getApplications(org.eclipse.core.resources.IProject project) throws ApplicationException
Returns a list of all registered project applications.- Parameters:
project
- the project to get applications for, cannot benull
- Returns:
- a list of all registered project applications, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
getDefaultProject
Optional<org.eclipse.core.resources.IProject> getDefaultProject() throws ApplicationException
Returns the default application owner project if there is any.- Returns:
- the default application owner project if there is any
- Throws:
ApplicationException
- if method call failed with some reason
-
getDefaultApplication
Optional<IApplication> getDefaultApplication(org.eclipse.core.resources.IProject project) throws ApplicationException
Returns the default registered project application.- Parameters:
project
- the project to get default application for, cannot benull
- Returns:
- the optional default registered project application
- Throws:
ApplicationException
- if method call failed with some reason
-
getDefaultUrlAccess
Optional<IUrlAccess> getDefaultUrlAccess(IApplication application) throws ApplicationException
Returns the default URL access instance for the provided application.- Parameters:
application
- the application, cannot benull
- Returns:
- the optional default URL access instance for the provided application
- Throws:
ApplicationException
- if method call failed with some reason
-
getPublishState
PublishState getPublishState(IApplication application) throws ApplicationException
Returns the application publish state for the provided application. May be unkown.- Parameters:
application
- the application to get state for, cannot benull
- Returns:
- the application publish state, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
getLifecycleState
LifecycleState getLifecycleState(ILifecycleAware object) throws ApplicationException
Returns the application lifecycle state for the provided application or lifecycle aware artifact. May be unkown.- Parameters:
object
- the object to get state for, cannot benull
- Returns:
- the application lifecycle state, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
getApplicationTypes
List<IApplicationType> getApplicationTypes() throws ApplicationException
Returns a list of all registered application types.- Returns:
- a list of all registered application types, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
getApplicationArtifacts
List<IApplicationArtifact> getApplicationArtifacts(Object object) throws ApplicationException
Returns a list of all found application artifacts for the provided application or application artifact.- Parameters:
object
- the object to get application artifacts for, cannot benull
- Returns:
- a list of all found application artifacts, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
getUrlAccesses
List<IUrlAccess> getUrlAccesses(IApplication application) throws ApplicationException
Returns a list of all found URL access instances for the provided application. May return the application itself if it is an instance ofIUrlAccess
.- Parameters:
object
- the object to get URL access instances for, cannot benull
- Returns:
- a list of all found URL access instances, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
setDefaultApplication
void setDefaultApplication(org.eclipse.core.resources.IProject project, IApplication application) throws ApplicationException
Sets the default registered project application.- Parameters:
project
- the project to get application for, cannot benull
the
- default project application to register for the project ornull
to reset- Throws:
ApplicationException
- if method call failed with some reason
-
setDefaultUrlAccess
void setDefaultUrlAccess(IApplication application, IUrlAccess urlAccess) throws ApplicationException
Sets the default URL access instance for the provided application.- Parameters:
application
- the application, cannot benull
the
- default URL access instance to register for the provided application ornull
to reset- Throws:
ApplicationException
- if method call failed with some reason
-
check
boolean check(IApplication application, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws ApplicationException
Checks and returns whether the application is ready to launch e.g. is not changed outside of the IDE.- Parameters:
application
- the application to check, cannot benull
context
- the execution context, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
- Returns:
- whether the application is ready to launch
- Throws:
ApplicationException
- if method call failed with some reason
-
publish
PublishState publish(IApplication application, PublishKind kind, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws ApplicationException
Publishes the application with the provided publish kind.- Parameters:
application
- the application to publish, cannot benull
kind
- the publish kind to use, cannot benull
context
- the execution context, cannot benull
monitor
- the progress monitor to report progress to ornull
if report is not desired- Returns:
- the publication state after execution, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
launch
ExecutionContext launch(IApplication application, String launchMode, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws ApplicationException
Publishes the application with the provided publish kind.- Parameters:
application
- the application to publish, cannot benull
launchMode
- the launch mode to use, cannot benull
context
- the execution context, cannot benull
monitor
- the progress monitor to report progress to ornull
if report is not desired- Returns:
- the execution context after execution, never
null
- Throws:
ApplicationException
- if method call failed with some reason
-
open
Optional<Process> open(IApplication application, ExecutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws ApplicationException
Opens the application and launches application client. Returns the application client system process.- Parameters:
application
- the application to open, cannot benull
context
- the execution context, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
- Returns:
- the optional application open client system process, may be empty if application is web for example
- Throws:
ApplicationException
- if method call failed with some reason
-
addAppllicationListener
void addAppllicationListener(IApplicationListener listener)
Adds the application listener to listen to application events.- Parameters:
listener
- the application listener, cannot benull
-
removeAppllicationListener
void removeAppllicationListener(IApplicationListener listener)
Removes the application listener.- Parameters:
listener
- the application listener, cannot benull
-
-