com.ibm.commerce.marketing.content.resources

Class CollateralContentResourceManager

  • java.lang.Object
    • com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
      • com.ibm.commerce.context.content.resources.AbstractEntityBeanResourceManagerImpl
        • com.ibm.commerce.marketing.content.resources.CollateralContentResourceManager
  • All Implemented Interfaces:
    com.ibm.commerce.context.content.resources.postpublish.PostPublishDataProcessor, com.ibm.commerce.context.content.resources.ResourceManager


    public class CollateralContentResourceManager
    extends com.ibm.commerce.context.content.resources.AbstractEntityBeanResourceManagerImpl
    Resource manager for Collateral object.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      • Fields inherited from class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl

        CONTENT_CANCEL, CONTENT_DELETE, CONTENT_NEW, CONTENT_PROMOTE, CONTENT_UPDATE, RESOURCE_COMMIT, RESOURCE_DELETE, RESOURCE_NEW, RESOURCE_ROLLBACK, RESOURCE_UPDATE, STRING_CONTENT_DELETE, STRING_CONTENT_NEW, STRING_CONTENT_UPDATE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void commit(com.ibm.commerce.context.content.events.ContentData contentData)
      This method commits the changes in the workspace to the base edition.
      com.ibm.commerce.context.content.resources.ManagedResourceKey getManagedResourceKey(java.util.Map boKeyMap)
      Returns the business object key.
      com.ibm.commerce.context.content.resources.ManagedResourceKey getManagedResourceKey(java.lang.Object businessObject)
      Returns the business object key.
      java.util.Map handleUniqueIndexViolations(com.ibm.commerce.context.content.events.ContentData contentData)
      This method will compare UI conflicts for resources in the workspace and will modify them based on action from configuration.
      void issueInvalidations(com.ibm.commerce.context.content.events.ContentData contentData, boolean setupProductionInvalidations)
      This method will invalidate individual entries related to marketing content changes made in a workspace.
      java.lang.String postPublish(com.ibm.commerce.context.content.events.ContentData contentData)
      This method will setup invalidations on the production environment for individual entries in the base dynacache and marketing distributed map related to marketing content changes made in a workspace.
      • Methods inherited from class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl

        createManagedResource, deleteManagedResource, deleteRelatedManagedResources, fetchUniqueIndexViolations, getLockData, getLockData, getManagedResourceData, getManagedResourceDataCount, getMetaData, getResourceContainer, handleForeignKeyViolations, handleUniqueIndexViolations, isLocked, isLocked, lockManagedResource, processPostPublishData, publish, relockManagedResource, rollback, setMetaData, setResourceContainer, synchronize, unlockManagedResource, updateManagedResource
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.context.content.resources.ResourceManager

        createManagedResource, deleteManagedResource, getLockData, getLockData, getManagedResourceData, getManagedResourceDataCount, getMetaData, getResourceContainer, isLocked, isLocked, lockManagedResource, publish, relockManagedResource, rollback, setMetaData, setResourceContainer, synchronize, unlockManagedResource, updateManagedResource
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CollateralContentResourceManager

        public CollateralContentResourceManager()
    • Method Detail

      • commit

        public void commit(com.ibm.commerce.context.content.events.ContentData contentData)
                    throws com.ibm.commerce.context.content.resources.exception.ResourceException
        This method commits the changes in the workspace to the base edition. It then calls the method issueInvalidations to issue invalidations to the base dynacache (if enabled) and the marketing distributed map in the authoring environment.
        Specified by:
        commit in interface com.ibm.commerce.context.content.resources.ResourceManager
        Overrides:
        commit in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
        Parameters:
        contentData - The content data to commit.
        Throws:
        com.ibm.commerce.context.content.resources.exception.ResourceException - This is thrown when there is a problem performing the commit operation. This usually occurs when the commit causes data integrity problems.
        See Also:
        ResourceManager.commit(com.ibm.commerce.context.content.events.ContentData)
      • getManagedResourceKey

        public com.ibm.commerce.context.content.resources.ManagedResourceKey getManagedResourceKey(java.util.Map boKeyMap)
                                                                                            throws java.lang.Exception
        Returns the business object key.
        Parameters:
        boKeyMap - A map that represents the business object.
        Returns:
        Returns a business object key.
        Throws:
        java.lang.Exception
      • getManagedResourceKey

        public com.ibm.commerce.context.content.resources.ManagedResourceKey getManagedResourceKey(java.lang.Object businessObject)
                                                                                            throws java.lang.Exception
        Returns the business object key.
        Parameters:
        businessObject - The business object access bean.
        Returns:
        Returns a business object key.
        Throws:
        java.lang.Exception
      • handleUniqueIndexViolations

        public java.util.Map handleUniqueIndexViolations(com.ibm.commerce.context.content.events.ContentData contentData)
                                                  throws com.ibm.commerce.context.content.resources.exception.ResourceException
        This method will compare UI conflicts for resources in the workspace and will modify them based on action from configuration. This will also fix any related tables with foreign keys and tables referencing the corrected records of ths resource.
        Overrides:
        handleUniqueIndexViolations in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
        Parameters:
        contentData - The content data of workspace/task group/task to check for UI violations.
        Returns:
        map containing key / value pairs indicating the unique index violations for specified table in the workspace/task group. The 'key' is the base table primary key and the value is the corresponding 'workspace' primary key for a conflicting UI.
        Throws:
        com.ibm.commerce.context.content.resources.exception.ResourceException - This is thrown when there is a problem performing the primary key delete/update operation.
        See Also:
        com.ibm.commerce.context.content.resources.ResourceManager#
      • issueInvalidations

        public void issueInvalidations(com.ibm.commerce.context.content.events.ContentData contentData,
                                       boolean setupProductionInvalidations)
                                throws com.ibm.commerce.context.content.resources.exception.ResourceException
        This method will invalidate individual entries related to marketing content changes made in a workspace. During a workspace commit, invalidations are issued for content changes in the task group in the authoring environment. During a quick publish, entries are created in the CACHEIVL table on the production database for the required invalidations. This allows the DynaCacheInvalidation scheduled job to issue the necessary invalidation on the production environment. Changes to the attachment associated with a marketing content will also result in an invalidation for the marketing content.
        Parameters:
        contentData - The content data.
        setupProductionInvalidations - If this is true, then the CACHEIVL entries will be created on the production database. This is used for a Quick Publish. If this parameter if false, then the local dynacache base cache and distributed map invalidations will be issued.
        Throws:
        com.ibm.commerce.context.content.resources.exception.ResourceException - A problem occurs in the post-publish event processing.
      • postPublish

        public java.lang.String postPublish(com.ibm.commerce.context.content.events.ContentData contentData)
                                     throws com.ibm.commerce.context.content.resources.exception.ResourceException
        This method will setup invalidations on the production environment for individual entries in the base dynacache and marketing distributed map related to marketing content changes made in a workspace. From the authoring environment, invalidations are determined for content changes in the task group. For these required invalidations, entries are created in the CACHEIVL table on the production database. This allows the DynaCacheInvalidation scheduled job to issue the necessary invalidation on the production environment. Changes to the attachment associated with a marketing content will also result in an invalidation for the marketing content.
        Specified by:
        postPublish in interface com.ibm.commerce.context.content.resources.ResourceManager
        Overrides:
        postPublish in class com.ibm.commerce.context.content.resources.AbstractResourceManagerImpl
        Parameters:
        contentData - The content data.
        Returns:
        This method returns null. It does not use the common base event infrastructure to issue invalidations. Instead it uses the CACHEIVL table.
        Throws:
        com.ibm.commerce.context.content.resources.exception.ResourceException - A problem occurs in the post-publish event processing.