com.ibm.commerce.context.content.resources

Class ResourceContainerManager

  • java.lang.Object
    • com.ibm.commerce.context.content.resources.ResourceContainerManager


  • public class ResourceContainerManager
    extends java.lang.Object
    This class provides an abstract implementation of a resource container manager.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String RESOURCE_CONTAINER_CONFIG_FILE
      The XML configuration file that contains the list of resource containers.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void commit(ContentData contentData)
      This method promotes the workspace specified in the given content data.
      java.lang.String getApproveForeignKeyViolationAction()
      This method returns whether or not the resource managers within this container should merge the foreign key violations.
      java.lang.String getApproveJvmName()
      Returns the Approve JVM name.
      java.lang.String getApproveUniqueIndexViolationAction()
      This method returns whether or not the resource managers within this container should merge the unique index violations.
      int getBatchSize()
      Trivial accessor for JDBC batch-size specification in QuickPublish
      java.lang.String getCheckUniqueIndexViolationAction()
      This method returns whether or not the resource managers within this container should merge the unique index violations.
      java.lang.Boolean getForceEARUpdate()
      Returns whether or not the EAR will be updated during quick publish.
      java.lang.Integer getPostPublishSize()
      This method returns Quick Publish setting for the post publish size in the Staging database.
      java.lang.String getQuickPublishJvmName()
      Returns the Quick Publish JVM name.
      java.lang.Integer getQuickPublishUpdateStaglogStmtNum()
      This method returns Quick Publish setting for the SQL statement number to update the Staglog table in the Staging database.
      ResourceContainer getResourceContainer(java.lang.String resourceContainerName)
      This method returns the resource container matching the specified resource container name.
      ResourceContainer[] getResourceContainers()
      This method returns the resource containers that are managed by the container manager.
      ResourceManager getResourceManager(java.lang.String tableName)
      This method returns the resource manager matching the specified table name / resource manager name.
      java.lang.String getSchedulerApplicationType()
      Returns the application type for scheduler workload.
      void initialize()
      This method initializes the managed resource container manager.
      boolean isApproveJvmNameDefined()
      Returns whether Approve JVM name from default configuration is defined or not.
      java.lang.Boolean isPostPublish()
      This method returns Quick Publish setting for post publish in the Staging database.
      boolean isQuickPublishJvmNameDefined()
      Returns whether Quick Publish JVM name is defined or not.
      boolean isSchedulerApplicationTypeDefined()
      Returns whether application type from default configuration is defined or not.
      java.lang.Boolean isStaglogLowerCase()
      This method returns Quick Publish setting for case sensitive Staglog records in the Staging database.
      void postCommit(ContentData contentData)
      This method composes post-commit and calls the command registered.
      void postPublish(ContentData contentData)
      This method composes post-publish data and propagates the data to a production server.
      void publish(ContentData contentData)
      This method publishes a task group.
      void rollback(ContentData contentData)
      This method rolls back the workspace specified in the given content data.
      static ResourceContainerManager singleton()
      This method returns the singleton instance of the container manager.
      void synchronize(ContentData contentData)
      This method synchronizes the workspace specified in the given content data.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RESOURCE_CONTAINER_CONFIG_FILE

        public static final java.lang.String RESOURCE_CONTAINER_CONFIG_FILE
        The XML configuration file that contains the list of resource containers.
        See Also:
        Constant Field Values
    • Method Detail

      • getResourceContainers

        public ResourceContainer[] getResourceContainers()
        This method returns the resource containers that are managed by the container manager.
        Returns:
        An array of resource containers.
      • getResourceContainer

        public ResourceContainer getResourceContainer(java.lang.String resourceContainerName)
        This method returns the resource container matching the specified resource container name.
        Parameters:
        resourceContainerName - The resource container name.
        Returns:
        The resource container matching the specified name. If no container is found then null is returned.
      • initialize

        public void initialize()
                        throws java.lang.Exception
        This method initializes the managed resource container manager.
        Throws:
        java.lang.Exception - This is thrown when there is a problem initializing the container manager or any of the containers that belong to it.
      • singleton

        public static ResourceContainerManager singleton()
        This method returns the singleton instance of the container manager.
        Returns:
        The container manager singleton.
      • rollback

        public void rollback(ContentData contentData)
                      throws ResourceException
        This method rolls back the workspace specified in the given content data.
        Parameters:
        contentData - The content data.
        Throws:
        ResourceException - This is thrown if there is any problem rolling back the workspace.
      • commit

        public void commit(ContentData contentData)
                    throws ResourceException
        This method promotes the workspace specified in the given content data.
        Parameters:
        contentData - The content data.
        Throws:
        ResourceException - This is thrown if there is any problem promoting the workspace.
      • postCommit

        public void postCommit(ContentData contentData)
                        throws ResourceException
        This method composes post-commit and calls the command registered.
        Parameters:
        contentData - The content data.
        Throws:
        ResourceException - This is thrown if any problem occurs in the post-publish event processing.
      • synchronize

        public void synchronize(ContentData contentData)
                         throws ResourceException
        This method synchronizes the workspace specified in the given content data.
        Parameters:
        contentData - The content data.
        Throws:
        ResourceException - This is thrown if there is any problem synchronizing the workspace.
      • publish

        public void publish(ContentData contentData)
                     throws ResourceException
        This method publishes a task group.
        Parameters:
        contentData - The content management content data.
        Throws:
        ResourceException - This is thrown if there is any problem publishing the task group.
      • postPublish

        public void postPublish(ContentData contentData)
                         throws ResourceException
        This method composes post-publish data and propagates the data to a production server.
        Parameters:
        contentData - The content data.
        Throws:
        ResourceException - This is thrown if any problem occurs in the post-publish event processing.
      • isStaglogLowerCase

        public java.lang.Boolean isStaglogLowerCase()
        This method returns Quick Publish setting for case sensitive Staglog records in the Staging database.
        Returns:
        the boolean value of caseSensitiveStaglog in the Quick Publish configuration.
      • getQuickPublishUpdateStaglogStmtNum

        public java.lang.Integer getQuickPublishUpdateStaglogStmtNum()
        This method returns Quick Publish setting for the SQL statement number to update the Staglog table in the Staging database.
        Returns:
        the SQL statement number to use for updating Staglog table during Quick Publish.
      • isPostPublish

        public java.lang.Boolean isPostPublish()
        This method returns Quick Publish setting for post publish in the Staging database.
        Returns:
        the boolean value of postPublish in the Quick Publish configuration.
      • getPostPublishSize

        public java.lang.Integer getPostPublishSize()
        This method returns Quick Publish setting for the post publish size in the Staging database.
        Returns:
        the size to use for post update propagating XML string to production during Quick Publish. this number determines the number of resource manager data to read before propagating
      • getForceEARUpdate

        public java.lang.Boolean getForceEARUpdate()
        Returns whether or not the EAR will be updated during quick publish.
        Returns:
        true if the quick publish step will enforce the EAR update.
      • getQuickPublishJvmName

        public java.lang.String getQuickPublishJvmName()
        Returns the Quick Publish JVM name.
        Returns:
        a string representing the JVM name for QP to run on.
      • isQuickPublishJvmNameDefined

        public boolean isQuickPublishJvmNameDefined()
        Returns whether Quick Publish JVM name is defined or not.
        Returns:
        true if jvm name is defined by user; false otherwise
      • getApproveJvmName

        public java.lang.String getApproveJvmName()
        Returns the Approve JVM name.
        Returns:
        a string representing the JVM name for approve processing to run on.
      • isApproveJvmNameDefined

        public boolean isApproveJvmNameDefined()
        Returns whether Approve JVM name from default configuration is defined or not.
        Returns:
        true if jvm name is defined by user; false otherwise
      • getSchedulerApplicationType

        public java.lang.String getSchedulerApplicationType()
        Returns the application type for scheduler workload.
        Returns:
        a string representing the application name for workspace processing to run on.
      • isSchedulerApplicationTypeDefined

        public boolean isSchedulerApplicationTypeDefined()
        Returns whether application type from default configuration is defined or not.
        Returns:
        true if application type is defined by user; false otherwise
      • getApproveUniqueIndexViolationAction

        public java.lang.String getApproveUniqueIndexViolationAction()
        This method returns whether or not the resource managers within this container should merge the unique index violations.
        Returns:
        String value "1" if the resource manager should merge the index violations into base. "0" or null indicates no merge is specified.
      • getCheckUniqueIndexViolationAction

        public java.lang.String getCheckUniqueIndexViolationAction()
        This method returns whether or not the resource managers within this container should merge the unique index violations.
        Returns:
        String value "1" if the resource manager should merge the index violations into base. "0" or null indicates no merge is specified.
      • getApproveForeignKeyViolationAction

        public java.lang.String getApproveForeignKeyViolationAction()
        This method returns whether or not the resource managers within this container should merge the foreign key violations.
        Returns:
        String value "1" if the resource manager should delete the key violations into base. "0" or null indicates no merge is specified.
      • getResourceManager

        public ResourceManager getResourceManager(java.lang.String tableName)
        This method returns the resource manager matching the specified table name / resource manager name.
        Parameters:
        tableName - The resource container name.
        Returns:
        The resource container matching the specified name. If no container is found then null is returned.
      • getBatchSize

        public int getBatchSize()
        Trivial accessor for JDBC batch-size specification in QuickPublish
        Returns:
        this.batchSize.intValue()