Interface CometConfigurationLocal


  • public interface CometConfigurationLocal
    The Interface CometConfigurationLocal.
    • Field Detail

      • JNDINAME

        static final java.lang.String JNDINAME
        The Constant JNDINAME "java:global/CometConfiguration/CometConfiguration!com.priint.pubserver.comet.config.CometConfigurationLocal".
        See Also:
        Constant Field Values
      • MAPPED_NAME

        static final java.lang.String MAPPED_NAME

        The mapped name of the CometConfiguration Plugin

        Use this name when requesting a Plugin instance from the PluginManager

        .
        See Also:
        Constant Field Values
      • SESSION_PREFIX

        static final java.lang.String SESSION_PREFIX
        The Constant SESSION_PREFIX "cometConfiguration::".
        See Also:
        Constant Field Values
      • SESSION_CLIENT_PROPERTY

        static final java.lang.String SESSION_CLIENT_PROPERTY
        The Constant SESSION_CLIENT_PROPERTY SESSION_PREFIX + "client"
        See Also:
        Constant Field Values
      • SESSION_PROJECT_PROPERTY

        static final java.lang.String SESSION_PROJECT_PROPERTY
        The Constant SESSION_PROJECT_PROPERTY SESSION_PREFIX + "project"
        See Also:
        Constant Field Values
      • SESSION_LANGUAGE_PROPERTY

        static final java.lang.String SESSION_LANGUAGE_PROPERTY
        The Constant SESSION_LANGUAGE_PROPERTY SESSION_PREFIX + "language"
        See Also:
        Constant Field Values
      • SESSION_UI_LANGUAGE_PROPERTY

        static final java.lang.String SESSION_UI_LANGUAGE_PROPERTY
        The Constant SESSION_UI_LANGUAGE_PROPERTY SESSION_PREFIX + "ui_language"
        See Also:
        Constant Field Values
      • SESSION_REGION_PROPERTY

        static final java.lang.String SESSION_REGION_PROPERTY
        The Constant SESSION_REGION_PROPERTY SESSION_PREFIX + "region"
        See Also:
        Constant Field Values
      • ENV_PLACEHOLDER_PROPERTY

        static final java.lang.String ENV_PLACEHOLDER_PROPERTY
        The Constant ENV_PLACEHOLDER_PROPERTY SESSION_PREFIX + "placeholder"
        See Also:
        Constant Field Values
      • ENV_SUBJECT_PROPERTY

        static final java.lang.String ENV_SUBJECT_PROPERTY
        The Constant ENV_SUBJECT_PROPERTY SESSION_PREFIX + "subject"
        See Also:
        Constant Field Values
      • PROJECT_FILENAME

        static final java.lang.String PROJECT_FILENAME
        The Constant PROJECT_FILENAME "cometproject.xml"
        See Also:
        Constant Field Values
      • INDEX_FILENAME

        static final java.lang.String INDEX_FILENAME
        The Constant INDEX_FILENAME "index.xml"
        See Also:
        Constant Field Values
      • NAME_SEPARATOR

        static final java.lang.String NAME_SEPARATOR
        The Constant NAME_SEPARATOR "-"
        See Also:
        Constant Field Values
    • Method Detail

      • createAnonymousSession

        java.lang.String createAnonymousSession​(java.lang.String name,
                                                long maxIdleTimeInMillis)
                                         throws CometException
        Create a new and anonymous session.
        Parameters:
        name - - login name
        maxIdleTimeInMillis - new session will expire after this time
        Returns:
        session id of anonymous session
        Throws:
        CometException - the comet exception
      • checkForBrokenDependencies

        CheckResult checkForBrokenDependencies​(java.lang.String projectIdentifier)
                                        throws CometException,
                                               InvalidSessionException

        Check for broken dependencies in a comet project repository.
        This is a PluginMethod.MethodType.CONFIGURATION_CHECK method intended to be run e.g. from the Ison client "Check rules" view.

        Parameters:
        projectIdentifier - the project identifier
        Returns:
        CheckResult
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkForDuplicateIDs

        CheckResult checkForDuplicateIDs​(java.lang.String projectIdentifier)
                                  throws CometException,
                                         InvalidSessionException

        Check for duplicate IDs in a comet project repository.
        This is a PluginMethod.MethodType.CONFIGURATION_CHECK method intended to be run e.g. from the Ison client "Check rules" view.

        Parameters:
        projectIdentifier - the project identifier
        Returns:
        CheckResult
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkTypeIntegrity

        CheckResult checkTypeIntegrity​(java.lang.String projectIdentifier)
                                throws CometException,
                                       InvalidSessionException

        Check for type integrity, i.e., if all required dependent files for certain types exist, if all type or field constraints are fulfilled etc.
        This is a PluginMethod.MethodType.CONFIGURATION_CHECK method intended to be run e.g. from the Ison client "Check rules" view.

        Parameters:
        projectIdentifier - the project identifier
        Returns:
        CheckResult
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkCScriptSyntax

        CheckResult checkCScriptSyntax​(java.lang.String projectIdentifier)
                                throws CometException,
                                       InvalidSessionException

        Check CScript syntax This is a PluginMethod.MethodType.CONFIGURATION_COMET_PROJECT_CHECK method intended to be run e.g. from the PRIINT Suite Validation Panel

        Parameters:
        projectIdentifier - the project identifier
        Returns:
        CheckResult
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • existsInRepository

        boolean existsInRepository​(PluginConfigDataHandler container)
                            throws CometException,
                                   InvalidSessionException

        Check, if an item already exists in the repository.
        This will return false for items only existing in current transactions and not persisted yet. The method also returns false for items, that have been deleted.

        Parameters:
        container - the container
        Returns:
        true, if item exists AND is alive
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • getAbsoluteContainerPath

        java.lang.String getAbsoluteContainerPath​(PluginConfigDataHandler item)
                                           throws CometException,
                                                  InvalidSessionException

        Get the repository path for a particular item.
        Returns the absolute path respecting all client and project hierarchy.

        Usually there is no need to call this method, because the following code should give the same result: PluginConfigDataHandler handler; String path = handler.getProperties().getPath(); However, if the configuration properties are incomplete or not existing (e.g. if you just created a new configuration), the path for this item can be calculated - provided that this is a valid configuration item within the Comet repository.

        Parameters:
        item - the item
        Returns:
        absolute path of this configuration item
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • getConfigPath

        java.lang.String getConfigPath​(java.lang.String relativePath)
                                throws CometException,
                                       InvalidSessionException

        Calculates the absolute configuration path for a given session and relative path.
        This is the root directory of the current Comet configuration. The path depends on the client and Comet project choosen for this session.

        Parameters:
        relativePath - the relative path
        Returns:
        configuration root for this session
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • getProject

        CometProject getProject​(java.lang.String projectName)
                         throws CometException,
                                InvalidSessionException

        Get a CometProject identified by the given name. If this project does not exist, an Exception is thrown.
        The CometProject provides information such as client name, entity model etc.

        Parameters:
        projectName - the project name
        Returns:
        the comet project
        Throws:
        CometException - if no such project exists
        InvalidSessionException - the invalid session exception
      • login

        java.lang.String login​(java.lang.String user,
                               java.lang.String password)
                        throws CometException

        Start a CometConfiguration session. This is just a shortcut for the SessionManagerRemote.login() method in the PubServerKernel, in case you write applications on top of the CometConfiguration EJB and you don't want to setup another EJB client just to call the login method from SessionManager

        Parameters:
        user - the user
        password - the password
        Returns:
        sessionId, if login succeeds
        Throws:
        CometException - if login fails
      • logout

        void logout()
             throws CometException,
                    InvalidSessionException

        Stop a CometConfiguration session. This is just a shortcut for the SessionManagerRemote.logout() method in the PubServerKernel, in case you write applications on top of the CometConfiguration EJB and you don't want to setup another EJB client just to call the logout method from SessionManager

        Throws:
        CometException - if logout fails (e.g. no such session)
        InvalidSessionException - the invalid session exception
      • repairChangeDependencyRestriction

        void repairChangeDependencyRestriction​(java.lang.String path,
                                               java.lang.String dependencyName,
                                               java.lang.String restriction)
                                        throws CometException,
                                               InvalidSessionException
        Repair change dependency restriction.
        Parameters:
        path - the path
        dependencyName - the dependency name
        restriction - the restriction
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • repairChangeFieldIdValue

        void repairChangeFieldIdValue​(java.lang.String configPath,
                                      java.lang.String fieldName,
                                      java.lang.String oldValue)
                               throws CometException,
                                      InvalidSessionException
        Repair change field id value.
        Parameters:
        configPath - the config path
        fieldName - the field name
        oldValue - the old value
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • resetApplication

        void resetApplication()
                       throws CometException,
                              InvalidSessionException

        Reset the application

        This method is mainly intended for testing purposes. In regular operation there should be no need to reset the application. All caches are cleared and startup procedures are executed.

        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • setSessionContext

        void setSessionContext​(java.lang.String client,
                               java.lang.String project,
                               java.lang.String language,
                               java.lang.String region)
                        throws CometException,
                               InvalidSessionException
        Set the context of this session.
        • client defaults to "Default"
        • project is an arbitrary string
        Parameters:
        client - the client
        project - the project
        language - the language
        region - the region
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • startTransaction

        void startTransaction()
                       throws CometException,
                              InvalidSessionException

        Start transaction mode. In transaction mode all modifications will be cached (rather than persisted in the repository).
        Only one transaction can be active per session at the time, if transaction mode is already active, an Exception will be raised.

        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • duplicateCometConfiguration

        java.lang.String duplicateCometConfiguration​(java.lang.String sourceProject,
                                                     java.lang.String newIdentifier,
                                                     java.lang.String newLabel,
                                                     java.lang.String newClient,
                                                     java.lang.String newDescription)
                                              throws CometException,
                                                     InvalidSessionException
        Duplicate comet configuration.
        Parameters:
        sourceProject - the source project
        newIdentifier - the new identifier
        newLabel - the new label
        newClient - the new client
        newDescription - the new description
        Returns:
        the string
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkForNotExistingEntityModelForCometProject

        CheckResult checkForNotExistingEntityModelForCometProject​(java.lang.String projectIdentifier)
                                                           throws CometException,
                                                                  InvalidSessionException
        Check for not existing entity model for comet project.
        Parameters:
        projectIdentifier - the project identifier
        Returns:
        the check result
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkForNotExistingPanelActionLabelCometProject

        CheckResult checkForNotExistingPanelActionLabelCometProject​(java.lang.String projectIdentifier)
                                                             throws CometException,
                                                                    InvalidSessionException
        Check for not existing panel action label comet project.
        Parameters:
        projectIdentifier - the project identifier
        Returns:
        the check result
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkForNotExistingPanelActionStatementCometProject

        CheckResult checkForNotExistingPanelActionStatementCometProject​(java.lang.String projectIdentifier)
                                                                 throws CometException,
                                                                        InvalidSessionException
        Check for not existing panel action statement comet project.
        Parameters:
        projectIdentifier - the project identifier
        Returns:
        the check result
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkForNotExistingPlaceholderDataProviderSelectionCheckCometProject

        CheckResult checkForNotExistingPlaceholderDataProviderSelectionCheckCometProject​(java.lang.String projectIdentifier)
                                                                                  throws CometException,
                                                                                         InvalidSessionException
        Check for not existing placeholder data provider selection check comet project.
        Parameters:
        projectIdentifier - the project identifier
        Returns:
        the check result
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkForNotPlaceholderDataQueryMethodCometProject

        CheckResult checkForNotPlaceholderDataQueryMethodCometProject​(java.lang.String projectIdentifier)
                                                               throws CometException,
                                                                      InvalidSessionException
        Check for not placeholder data query method comet project.
        Parameters:
        projectIdentifier - the project identifier
        Returns:
        the check result
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • checkForNotPlaceholderDataMappingMethodCometProject

        CheckResult checkForNotPlaceholderDataMappingMethodCometProject​(java.lang.String projectIdentifier)
                                                                 throws CometException,
                                                                        InvalidSessionException
        Check for not placeholder data mapping method comet project.
        Parameters:
        projectIdentifier - the project identifier
        Returns:
        the check result
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • loginPreCheck

        void loginPreCheck()
        Login pre check.
      • setSessionContext4LoginLocal

        void setSessionContext4LoginLocal​(java.lang.String sessionId,
                                          java.lang.String client,
                                          java.lang.String project,
                                          java.lang.String language,
                                          java.lang.String region)
                                   throws CometException,
                                          InvalidSessionException
        Sets the session context 4 login local.
        Parameters:
        sessionId - the session id
        client - the client
        project - the project
        language - the language
        region - the region
        Throws:
        CometException - the comet exception
        InvalidSessionException - the invalid session exception
      • getAbsolutePath

        java.lang.String getAbsolutePath​(java.lang.String relativePath)
                                  throws InvalidSessionException
        Gets the absolute path.
        Parameters:
        relativePath - the relative path
        Returns:
        the absolute path
        Throws:
        InvalidSessionException - the invalid session exception