Class AbstractCreateProgramItemByCopyFunction

All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider, LogEnabled, Serviceable
Direct Known Subclasses:
CreateContainerByCopyFunction, CreateCourseByCopyFunction, CreateCourseListByCopyFunction, CreateProgramByCopyFunction, CreateSubProgramByCopyFunction

OSWorkflow function to create a program item by copy of another
  • Field Details

    • PARENT_KEY

      public static final String PARENT_KEY
      Key for the parent of the target content
  • Constructor Details

  • Method Details

    • getAdditionalCopyMap

      protected Map<String,Object> getAdditionalCopyMap(Map transientVars, Content baseContent, String viewName, String fallbackViewName) throws com.opensymphony.workflow.WorkflowException
      Description copied from class: CreateContentByCopyFunction
      Get an additional copy map, if any. It allows subclasses to provide additional data to copy. This map is concatenated to the initial copy map.
      Overrides:
      getAdditionalCopyMap in class CreateContentByCopyFunction
      Parameters:
      transientVars - the workflow parameters
      baseContent - the source content to be copied
      viewName - the view name
      fallbackViewName - the fallback view name, if required view does not exist
      Returns:
      the additional copy map, or null if none.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs
    • processValues

      protected void processValues(Map transientVars, ModifiableContent targetContent, Map<String,Object> values) throws com.opensymphony.workflow.WorkflowException
      Description copied from class: CreateContentByCopyFunction
      Called after creation and before execution of the EditContentFunction to allow subclasses to add/remove/modify the values.
      Overrides:
      processValues in class CreateContentByCopyFunction
      Parameters:
      transientVars - The workflow transient vars
      targetContent - The newly created content
      values - the values computed from the copyMap and to be given to the EditContentFunction.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs
    • _populateAdditionalData

      protected void _populateAdditionalData(Map transientVars, ModifiableContent content) throws com.opensymphony.workflow.WorkflowException
      Description copied from class: CreateContentFunction
      Populate the content.
      Overrides:
      _populateAdditionalData in class CreateContentFunction
      Parameters:
      transientVars - the transient variables.
      content - the content.
      Throws:
      com.opensymphony.workflow.WorkflowException - if an error occurs.
    • _getChildrenReferencesName

      protected abstract Set<String> _getChildrenReferencesName()
      Get the attributes names holding the children relations between the content to create and its children
      Returns:
      the attributes names