Class AbstractContentFunction

All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider, EnhancedFunction, Initializable, LogEnabled, Serviceable
Direct Known Subclasses:
AbstractCoursePartFunction, CreateVersionFunction, RemoveLiveLabelFunction, ResetWorkflowIdFunction, RestoreRevisionFunction, SetCurrentStepIdAndNotifyFunction, SetNotifiedFunction, ValidateContentFunction

Abstract workflow function working on a Content, which provides common content methods.
  • Field Details

  • Constructor Details

  • Method Details

    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in interface Initializable
      Throws:
      Exception
    • _addLockToken

      protected void _addLockToken(WorkflowAwareContent content) throws com.opensymphony.workflow.WorkflowException, javax.jcr.RepositoryException
      Add the content lock token to the current session if the content is locked.
      Parameters:
      content - the content.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs.
      javax.jcr.RepositoryException - if a repository error occurs.
    • _setCurrentStepId

      protected void _setCurrentStepId(WorkflowAwareContent content, Map transientVars) throws com.opensymphony.workflow.WorkflowException
      Set the content's current step ID without notifying the observers that the content's workflow has changed.
      Parameters:
      content - the content.
      transientVars - The workflow transient vars.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs.
    • _setCurrentStepIdAndNotify

      protected void _setCurrentStepIdAndNotify(WorkflowAwareContent content, Map transientVars) throws com.opensymphony.workflow.WorkflowException
      Set the content's current step ID and notify the observers that the content's workflow has changed.
      Parameters:
      content - the content.
      transientVars - The workflow transient vars.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs.
    • _createVersion

      protected void _createVersion(WorkflowAwareContent content) throws com.opensymphony.workflow.WorkflowException
      Persists the current version and create a new one.
      Parameters:
      content - the content.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs.
    • _addLabel

      protected void _addLabel(WorkflowAwareContent content, String label) throws com.opensymphony.workflow.WorkflowException, javax.jcr.RepositoryException
      Add a label on the content.
      Parameters:
      content - the content.
      label - the label to add.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs.
      javax.jcr.RepositoryException - if an error occurs.