Class PortalEngine
java.lang.Object
com.aquima.interactions.portal.model.PortalEngine
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionPortalEngine
(IPortalEngineDS datasource, CaseEngineClient caseEngineClient, IAuditEngine auditEngine, ICommentsManager commentsManager) Constructor to create a portal engine using a specified data source.PortalEngine
(IPortalEngineDS datasource, IProcessEngineManager peManager, CaseEngineClient caseEngineClient, IAuditEngine auditEngine, ICommentsManager commentsManager, ILicenseProvider licenseProvider) Constructor to create a portal engine using a specified data source. -
Method Summary
Modifier and TypeMethodDescriptionboolean
applicationExists
(ApplicationID applicationId) This method returns whether an application exists for the specified application ID.getApplication
(ApplicationID applicationId) This method retrieves the application model for the specified application ID.getApplicationMetadata
(ApplicationID applicationId) This method retrieves the project meta data for the specified application ID.String[]
This method returns the names of the applications that can be accessed through this portal engine interface.getDefaultVersion
(String applicationName) This method returns the default version for the application.getSolution
(ApplicationID applicationId) This method retrieves the solution model for a specified application idVersion[]
getVersions
(String applicationName) This method returns the versions that are available for the given application name.void
This method will ensure all the application caches are cleared for the specified application.void
resetCache
(Version applicationsVersion, String[] applicationNames) This method will ensure the application caches are cleared for the specified application version.void
resetCache
(String applicationName) This method will ensure the application caches are cleared for the specified application.
-
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 actionscommentsManager
- 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 actionscommentsManager
- The Comments Manager to add and find commentslicenseProvider
- The optional license provider which provides the license contents which the portal engine should use.
-
-
Method Details
-
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 interfaceIPortalEngine
- Returns:
- Array of strings containing the names of the application that are available.
-
getVersions
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 interfaceIPortalEngine
- 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
Description copied from interface:IPortalEngine
This method returns the default version for the application.- Specified by:
getDefaultVersion
in interfaceIPortalEngine
- Parameters:
applicationName
- The name of the application for which the default version is requested.- Returns:
- Default Version object for the selected application.
-
resetCache
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 interfaceIPortalEngine
- Parameters:
applicationName
- The name of the application for which the models should be reloaded.
-
resetCache
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 interfaceIPortalEngine
- 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 interfaceIPortalEngine
-
getApplication
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 interfaceIPortalEngine
- Parameters:
applicationId
- The ID of the application model that should be retrieved.- Returns:
- The application model for the specified ID.
-
applicationExists
Description copied from interface:IPortalEngine
This method returns whether an application exists for the specified application ID. NOTE: In contrast toIPortalEngine.getApplication(ApplicationID)
this does NOT load the application/project.- Specified by:
applicationExists
in interfaceIPortalEngine
- Parameters:
applicationId
- The ID of the application/project that should be checked.- Returns:
- True if the application exists, false otherwise
-
getApplicationMetadata
Description copied from interface:IPortalEngine
This method retrieves the project meta data for the specified application ID. NOTE: In contrast toIPortalEngine.getApplication(ApplicationID)
this does NOT load the application/project.- Specified by:
getApplicationMetadata
in interfaceIPortalEngine
- Parameters:
applicationId
- the ID of the application/project the meta data should be retrieved for.- Returns:
- the project meta data, may be null
-
getSolution
Description copied from interface:IPortalEngine
This method retrieves the solution model for a specified application id- Specified by:
getSolution
in interfaceIPortalEngine
- Parameters:
applicationId
- The application model for the specified ID.- Returns:
- The solution model for the specified ID.
-