com.ibm.commerce.contentmanagement.workspace

Class WorkspaceEventManager

  • java.lang.Object
    • com.ibm.commerce.contentmanagement.workspace.WorkspaceEventManager


  • public class WorkspaceEventManager
    extends java.lang.Object
    Workspace Event Manager to handle status transitions from Event Listener
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void cancelTaskGroup(java.lang.Long workspaceId, java.lang.Long taskGroupId, CommandContext cmdContext)
      Event handler to process task groups in the cancel state.
      void cleanupTaskGroup(java.lang.Long workspaceId, java.lang.Long taskGroupId, CommandContext cmdContext)
      Cleans up a task group.
      void commitTaskGroup(java.lang.Long workspaceId, java.lang.Long taskGroupId, CommandContext cmdContext)
      Commit task group event handler.
      void completeTask(java.lang.Long workspaceId, java.lang.Long taskGroupId, java.lang.Long taskId, CommandContext cmdContext)
      Complete task event handler.
      void initialize()
      Initializes the workspace event manager.
      boolean isDeferredCommit()
      Check if configuration setting is enabled for deferred commit.
      boolean isRetryCommitEnabled()
      Check if configuration setting is enabled for retrying commits.
      void postCommitTaskGroup(java.lang.Long workspaceId, java.lang.Long taskGroupId, CommandContext cmdContext)
      Event handler to process task groups in the commit complete state.
      void publishTaskGroup(java.lang.Long workspaceId, java.lang.Long taskGroupId, CommandContext cmdContext)
      Event handler to process a task group in the ready to publish state.
      void readyForApprovalTaskGroup(java.lang.Long workspaceId, java.lang.Long taskGroupId, CommandContext cmdContext)
      Event handler to process a task group in the ready for approval state.
      static WorkspaceEventManager singleton()
      Gets the WorkspaceEventManager as a singleton
      void workingTask(java.lang.Long workspaceId, java.lang.Long taskGroupId, java.lang.Long taskId, CommandContext cmdContext)
      Activated task event handler.
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

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

      • initialize

        public void initialize()
                        throws java.lang.Exception
        Initializes the workspace event manager.
        Throws:
        java.lang.Exception - A problem initializing the event manager.
      • singleton

        public static WorkspaceEventManager singleton()
        Gets the WorkspaceEventManager as a singleton
        Returns:
        WorkspaceEventManager
      • completeTask

        public void completeTask(java.lang.Long workspaceId,
                                 java.lang.Long taskGroupId,
                                 java.lang.Long taskId,
                                 CommandContext cmdContext)
                          throws ECException
        Complete task event handler.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        taskId - The Task identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • workingTask

        public void workingTask(java.lang.Long workspaceId,
                                java.lang.Long taskGroupId,
                                java.lang.Long taskId,
                                CommandContext cmdContext)
                         throws ECException
        Activated task event handler.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        taskId - The Task identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • commitTaskGroup

        public void commitTaskGroup(java.lang.Long workspaceId,
                                    java.lang.Long taskGroupId,
                                    CommandContext cmdContext)
                             throws ECException
        Commit task group event handler.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • cancelTaskGroup

        public void cancelTaskGroup(java.lang.Long workspaceId,
                                    java.lang.Long taskGroupId,
                                    CommandContext cmdContext)
                             throws ECException
        Event handler to process task groups in the cancel state. A Task group in cancelled state sends an e-mail message to the approvers listed for the task group.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • postCommitTaskGroup

        public void postCommitTaskGroup(java.lang.Long workspaceId,
                                        java.lang.Long taskGroupId,
                                        CommandContext cmdContext)
                                 throws ECException
        Event handler to process task groups in the commit complete state.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • publishTaskGroup

        public void publishTaskGroup(java.lang.Long workspaceId,
                                     java.lang.Long taskGroupId,
                                     CommandContext cmdContext)
                              throws ECException
        Event handler to process a task group in the ready to publish state.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • cleanupTaskGroup

        public void cleanupTaskGroup(java.lang.Long workspaceId,
                                     java.lang.Long taskGroupId,
                                     CommandContext cmdContext)
                              throws ECException
        Cleans up a task group.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • readyForApprovalTaskGroup

        public void readyForApprovalTaskGroup(java.lang.Long workspaceId,
                                              java.lang.Long taskGroupId,
                                              CommandContext cmdContext)
                                       throws ECException
        Event handler to process a task group in the ready for approval state. A Task group in ready for approval state will by default trigger an email message to the approvers listed for the task group.
        Parameters:
        workspaceId - The Workspace identifier.
        taskGroupId - The Task Group identifier.
        cmdContext - CommandContext
        Throws:
        ECException
      • isDeferredCommit

        public boolean isDeferredCommit()
        Check if configuration setting is enabled for deferred commit.
        Returns:
        true if deferred commit is enabled.
      • isRetryCommitEnabled

        public boolean isRetryCommitEnabled()
        Check if configuration setting is enabled for retrying commits.
        Returns:
        true if deferred commit is enabled.