Class AbstractPlanItemDefinitionExport<T extends PlanItemDefinition>

java.lang.Object
org.flowable.cmmn.converter.export.AbstractPlanItemDefinitionExport<T>
All Implemented Interfaces:
CmmnXmlConstants
Direct Known Subclasses:
AbstractChildTaskExport, AbstractServiceTaskExport, CasePageTaskExport, DecisionTaskExport, ExternalWorkerServiceTaskExport, GenericEventListenerExport, HumanTaskExport, MilestoneExport, PlanFragmentExport, ReactivationEventListenerExport, SignalEventListenerExport, StageExport, TaskExport, TimerEventListenerExport, UserEventListenerExport, VariableEventListenerExport

public abstract class AbstractPlanItemDefinitionExport<T extends PlanItemDefinition> extends Object implements CmmnXmlConstants
  • Constructor Details

    • AbstractPlanItemDefinitionExport

      public AbstractPlanItemDefinitionExport()
  • Method Details

    • getExportablePlanItemDefinitionClass

      protected abstract Class<? extends T> getExportablePlanItemDefinitionClass()
      The class for which exporter subclasses works for
      Returns:
      a Class that extends PlanItemDefinition
    • writePlanItemDefinition

      public void writePlanItemDefinition(CmmnModel model, T planItemDefinition, XMLStreamWriter xtw, CmmnXmlConverterOptions options) throws Exception
      The steps followed to write a planItemDefinition
      Parameters:
      planItemDefinition - the plan item definition to write
      xtw - the XML to write the definition to
      Throws:
      Exception - in case of write exception
    • writePlanItemDefinitionStartElement

      protected void writePlanItemDefinitionStartElement(T planItemDefinition, XMLStreamWriter xtw) throws Exception
      Throws:
      Exception
    • getPlanItemDefinitionXmlElementValue

      protected abstract String getPlanItemDefinitionXmlElementValue(T planItemDefinition)
      Subclasses must override this method to provide the xml element tag value of this planItemDefinition
      Parameters:
      planItemDefinition - the plan item definition to write
      Returns:
      the value of the xml element tag to write
    • writePlanItemDefinitionCommonAttributes

      protected void writePlanItemDefinitionCommonAttributes(T planItemDefinition, XMLStreamWriter xtw, CmmnXmlConverterOptions options) throws Exception
      Throws:
      Exception
    • writePlanItemDefinitionSpecificAttributes

      protected void writePlanItemDefinitionSpecificAttributes(T planItemDefinition, XMLStreamWriter xtw) throws Exception
      Subclasses can override this method to write attributes specific to the plainItemDefinition element
      Parameters:
      planItemDefinition - the plan item definition to write
      xtw - the XML to write the definition to
      Throws:
      Exception - in case of write exception
    • writePlanItemDefinitionCommonElements

      protected boolean writePlanItemDefinitionCommonElements(CmmnModel model, T planItemDefinition, XMLStreamWriter xtw, CmmnXmlConverterOptions options) throws Exception
      Writes common elements like planItem documentation. Subclasses should call super.writePlanItemDefinitionCommonElements(), it is recommended to override writePlanItemDefinitionBody instead
      Parameters:
      planItemDefinition - the plan item definition to write
      xtw - the XML to write the definition to
      Throws:
      Exception - in case of write exception
    • writePlanItemDefinitionExtensionElements

      protected boolean writePlanItemDefinitionExtensionElements(CmmnModel model, T planItemDefinition, boolean didWriteExtensionElement, XMLStreamWriter xtw) throws Exception
      Throws:
      Exception
    • writePlanItemDefinitionDefaultItemControl

      protected void writePlanItemDefinitionDefaultItemControl(CmmnModel model, T planItemDefinition, XMLStreamWriter xtw) throws Exception
      Throws:
      Exception
    • writePlanItemDefinitionBody

      protected void writePlanItemDefinitionBody(CmmnModel model, T planItemDefinition, XMLStreamWriter xtw, CmmnXmlConverterOptions options) throws Exception
      Subclasses can override this method to write the content body xml content of the plainItemDefinition
      Parameters:
      planItemDefinition - the plan item definition to write
      xtw - the XML to write the definition to
      Throws:
      Exception - in case of write exception
    • writePlanItemDefinitionEndElement

      protected void writePlanItemDefinitionEndElement(XMLStreamWriter xtw) throws Exception
      Throws:
      Exception