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 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 be null
        id - the id of the application, cannot be null
        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 be null
        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 be null
        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 be null
        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 be null
        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 be null
        Returns:
        the application lifecycle state, 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 be null
        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 of IUrlAccess.
        Parameters:
        object - the object to get URL access instances for, cannot be null
        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 be null
        the - default project application to register for the project or null 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 be null
        the - default URL access instance to register for the provided application or null to reset
        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 be null
        kind - the publish kind to use, cannot be null
        context - the execution context, cannot be null
        monitor - the progress monitor to report progress to or null 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 be null
        launchMode - the launch mode to use, cannot be null
        context - the execution context, cannot be null
        monitor - the progress monitor to report progress to or null 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 be null
        context - the execution context, cannot be null
        monitor - the progress monitor to report progress to, cannot be null
        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 be null
      • removeAppllicationListener

        void removeAppllicationListener​(IApplicationListener listener)
        Removes the application listener.
        Parameters:
        listener - the application listener, cannot be null