com.ibm.commerce.context.content.resources

Class AbstractResourceContainerImpl

  • java.lang.Object
    • com.ibm.commerce.context.content.resources.AbstractResourceContainerImpl
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String RESOURCE_MANAGER_CONFIG_FILE
      This is the name of the XML file that contains the resource managers defined for the container.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void commit(ContentData contentData)
      This method promotes the content managed resource found in the workspace to the base edition.
      ResourceContainerMetaData getMetaData()
      This method returns the metadata associated with the container.
      ResourceManager getResourceManager(java.lang.String resourceName)
      This method returns the resource manager for the specified resource.
      java.util.Map getResourceManagers()
      This method returns the list of resource managers belonging to the container.
      void initialize()
      This method initializes the resource container by loading the resource managers defined along with additional container request tasks.
      void postPublish(ContentData contentData)
      This method processes the post-publish event.
      void processPostPublishData(java.lang.String postPublishData)
      This method processes post-publish data on production server.
      void publish(ContentData contentData, ContentPublisher publisher)
      This method publishes a task group from the content management workspace.
      void rollback(ContentData contentData)
      This method cancels the content managed resource found in the workspace to the base edition.
      void setMetaData(ResourceContainerMetaData resourceContainerMetaData)
      This method sets the metadata associated with the container.
      void synchronize(ContentData contentData)
      This method synchronizes the specified workspace.
      java.lang.String toString()
      This method returns a String representation of the object.
      • Methods inherited from class java.lang.Object

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

      • RESOURCE_MANAGER_CONFIG_FILE

        public static final java.lang.String RESOURCE_MANAGER_CONFIG_FILE
        This is the name of the XML file that contains the resource managers defined for the container. The XML file will be found in the same package as the resource container.
        See Also:
        Constant Field Values
    • Method Detail

      • setMetaData

        public void setMetaData(ResourceContainerMetaData resourceContainerMetaData)
        This method sets the metadata associated with the container.
        Specified by:
        setMetaData in interface ResourceContainer
        Parameters:
        resourceContainerMetaData - The resource container metadata.
      • commit

        public void commit(ContentData contentData)
                    throws ResourceException
        This method promotes the content managed resource found in the workspace to the base edition.
        Specified by:
        commit in interface ResourceContainer
        Parameters:
        contentData - The content data to commit.
        Throws:
        ResourceException - A problem with the promote. The problem is more then likely database related and the exception will be wrapped in a ResourceException.
      • synchronize

        public void synchronize(ContentData contentData)
                         throws ResourceException
        This method synchronizes the specified workspace. The workspace may either need to be synchronized based on some changes caused by the base or by some operation performed by the workspace. This will be called when it is known that changes have been made which may have caused the workspace to be out of synchronization.
        Specified by:
        synchronize in interface ResourceContainer
        Parameters:
        contentData - The content data to synchronize. This data will not include the task and task group because the entire workspace needs to be synchronized.
        Throws:
        ResourceException - This is thrown when there is a problem performing the commit operation. This usually occurs when the commit causes data integrity problems.
      • postPublish

        public void postPublish(ContentData contentData)
                         throws ResourceException
        This method processes the post-publish event. The default implementation is to compose post-publish data and propagate the data to a production server.
        Specified by:
        postPublish in interface ResourceContainer
        Parameters:
        contentData - The content data.
        Throws:
        ResourceException - This is thrown when a problem occurs in the post-publish event processing.
      • processPostPublishData

        public void processPostPublishData(java.lang.String postPublishData)
                                    throws ECException
        This method processes post-publish data on production server.
        Specified by:
        processPostPublishData in interface PostPublishDataProcessor
        Parameters:
        postPublishData - The post-publish data to be processed.
        Throws:
        ECException - This is thrown when a problem occurs when processing the data.
      • rollback

        public void rollback(ContentData contentData)
                      throws ResourceException
        This method cancels the content managed resource found in the workspace to the base edition.
        Specified by:
        rollback in interface ResourceContainer
        Parameters:
        contentData - The content data to undo.
        Throws:
        ResourceException - This is thrown when there is a problem with the cancel. The problem is most likely database-related. The exception will be wrapped in a ResourceException.
      • toString

        public java.lang.String toString()
        This method returns a String representation of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A readable String that describes the object.
      • getResourceManager

        public ResourceManager getResourceManager(java.lang.String resourceName)
        This method returns the resource manager for the specified resource.
        Specified by:
        getResourceManager in interface ResourceContainer
        Parameters:
        resourceName - The name of the resource.
        Returns:
        The resource manager for the specified resource name.
      • getResourceManagers

        public java.util.Map getResourceManagers()
        This method returns the list of resource managers belonging to the container.
        Specified by:
        getResourceManagers in interface ResourceContainer
        Returns:
        A list of resource managers.
      • initialize

        public void initialize()
                        throws javax.xml.parsers.ParserConfigurationException,
                               org.xml.sax.SAXException,
                               java.io.IOException,
                               java.lang.InstantiationException,
                               java.lang.IllegalAccessException,
                               java.lang.ClassNotFoundException,
                               java.sql.SQLException
        This method initializes the resource container by loading the resource managers defined along with additional container request tasks.
        Specified by:
        initialize in interface ResourceContainer
        Throws:
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
        java.io.IOException
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.ClassNotFoundException
        java.sql.SQLException
        See Also:
        ResourceContainer.initialize()