Class PortalEngine

java.lang.Object
com.aquima.interactions.portal.model.PortalEngine
All Implemented Interfaces:
IPortalEngine

public class PortalEngine extends Object implements IPortalEngine
The portal engine class act as a factory for portal sessions, and optionally holds cached information about applications (through the application store). This object should not be created directly by clients, but clients should use the PortalFactory instead.
Since:
5.0
Author:
O. Kerpershoek
  • Constructor Details

    • PortalEngine

      public PortalEngine(IPortalEngineDS datasource, CaseEngineClient caseEngineClient, IAuditEngine auditEngine, ICommentsManager commentsManager)
      Constructor to create a portal engine using a specified data source. This constructor should not be used directly, the PortalFactory should be used instead to initialize a portal engine.
      Parameters:
      datasource - The data source that should be used to initialize applications.
      caseEngineClient - The optional CaseEngine client to communicate to the case engine.
      auditEngine - The AuditEngine to log audited actions
      commentsManager - The Comments Manager to add and find comments
    • PortalEngine

      public PortalEngine(IPortalEngineDS datasource, IProcessEngineManager peManager, CaseEngineClient caseEngineClient, IAuditEngine auditEngine, ICommentsManager commentsManager, ILicenseProvider licenseProvider)
      Constructor to create a portal engine using a specified data source. This constructor should not be used directly, the PortalFactory should be used instead to initialize a portal engine.
      Parameters:
      datasource - The data source that should be used to initialize applications.
      peManager - The optional process engine manager which provides process engine implementations.
      caseEngineClient - The optional CaseEngine client to communicate to the case engine.
      auditEngine - The AuditEngine to log audited actions
      commentsManager - The Comments Manager to add and find comments
      licenseProvider - The optional license provider which provides the license contents which the portal engine should use.
  • Method Details

    • getApplications

      public String[] getApplications()
      Description copied from interface: IPortalEngine
      This method returns the names of the applications that can be accessed through this portal engine interface. The returned array will always contain at least one application name.
      Specified by:
      getApplications in interface IPortalEngine
      Returns:
      Array of strings containing the names of the application that are available.
    • getVersions

      public Version[] getVersions(String applicationName)
      Description copied from interface: IPortalEngine
      This method returns the versions that are available for the given application name. For each application name that is returned by the getApplications method, an array of at least one Version will be returned.
      Specified by:
      getVersions in interface IPortalEngine
      Parameters:
      applicationName - The name of the application for which the available versions are requested.
      Returns:
      Array of version objects containing at least one version.
    • getDefaultVersion

      public Version getDefaultVersion(String applicationName)
      Description copied from interface: IPortalEngine
      This method returns the default version for the application.
      Specified by:
      getDefaultVersion in interface IPortalEngine
      Parameters:
      applicationName - The name of the application for which the default version is requested.
      Returns:
      Default Version object for the selected application.
    • resetCache

      public void resetCache(String applicationName)
      Description copied from interface: IPortalEngine
      This method will ensure the application caches are cleared for the specified application. The next invocation of getApplication will reload the engine models from the data-sources.
      Specified by:
      resetCache in interface IPortalEngine
      Parameters:
      applicationName - The name of the application for which the models should be reloaded.
    • resetCache

      public void resetCache(Version applicationsVersion, String[] applicationNames)
      Description copied from interface: IPortalEngine
      This method will ensure the application caches are cleared for the specified application version. The next invocation of getApplication will reload the engine models from the data-sources.
      Specified by:
      resetCache in interface IPortalEngine
      Parameters:
      applicationsVersion - The version for the applications for which the models should be reloaded.
      applicationNames - The applications (with this version) for which the models should be reloaded. When null, reset the cache for all applications with this version
    • resetCache

      public void resetCache()
      Description copied from interface: IPortalEngine
      This method will ensure all the application caches are cleared for the specified application. The next invocation of getApplication will reload the engine models from the data-sources.
      Specified by:
      resetCache in interface IPortalEngine
    • getApplication

      public IApplication getApplication(ApplicationID applicationId)
      Description copied from interface: IPortalEngine
      This method retrieves the application model for the specified application ID. When no application has yet been loaded, or when the application cache has been reset, this method will automatically load the application model from data source.
      Specified by:
      getApplication in interface IPortalEngine
      Parameters:
      applicationId - The ID of the application model that should be retrieved.
      Returns:
      The application model for the specified ID.
    • applicationExists

      public boolean applicationExists(ApplicationID applicationId)
      Description copied from interface: IPortalEngine
      This method returns whether an application exists for the specified application ID. NOTE: In contrast to IPortalEngine.getApplication(ApplicationID) this does NOT load the application/project.
      Specified by:
      applicationExists in interface IPortalEngine
      Parameters:
      applicationId - The ID of the application/project that should be checked.
      Returns:
      True if the application exists, false otherwise
    • getApplicationMetadata

      public ProjectMetadata getApplicationMetadata(ApplicationID applicationId)
      Description copied from interface: IPortalEngine
      This method retrieves the project meta data for the specified application ID. NOTE: In contrast to IPortalEngine.getApplication(ApplicationID) this does NOT load the application/project.
      Specified by:
      getApplicationMetadata in interface IPortalEngine
      Parameters:
      applicationId - the ID of the application/project the meta data should be retrieved for.
      Returns:
      the project meta data, may be null
    • getSolution

      public ISolution getSolution(ApplicationID applicationId)
      Description copied from interface: IPortalEngine
      This method retrieves the solution model for a specified application id
      Specified by:
      getSolution in interface IPortalEngine
      Parameters:
      applicationId - The application model for the specified ID.
      Returns:
      The solution model for the specified ID.