Package org.camunda.bpm.model.xml.type

Examples of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder


  protected static Attribute<String> nameAttribute;
  protected static AttributeReference<ItemDefinition> typeAttribute;
  protected static ChildElementCollection<CorrelationPropertyRetrievalExpression> correlationPropertyRetrievalExpressionCollection;

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder;
    typeBuilder = modelBuilder.defineType(CorrelationProperty.class, BPMN_ELEMENT_CORRELATION_PROPERTY)
      .namespaceUri(BPMN20_NS)
      .extendsType(RootElement.class)
      .instanceProvider(new ModelTypeInstanceProvider<CorrelationProperty>() {
        public CorrelationProperty newInstance(ModelTypeInstanceContext instanceContext) {
          return new CorrelationPropertyImpl(instanceContext);
        }
      });

    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
      .build();

    typeAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_TYPE)
      .qNameAttributeReference(ItemDefinition.class)
      .build();

    SequenceBuilder sequenceBuilder = typeBuilder.sequence();

    correlationPropertyRetrievalExpressionCollection = sequenceBuilder
      .elementCollection(CorrelationPropertyRetrievalExpression.class)
      .required()
      .build();

    typeBuilder.build();
  }
View Full Code Here


* @author Sebastian Menski
*/
public class FlowNodeRef extends BpmnModelElementInstanceImpl {

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(FlowNodeRef.class, BPMN_ELEMENT_FLOW_NODE_REF)
      .namespaceUri(BPMN20_NS)
      .instanceProvider(new ModelTypeInstanceProvider<FlowNodeRef>() {
        public FlowNodeRef newInstance(ModelTypeInstanceContext instanceContext) {
          return new FlowNodeRef(instanceContext);
        }
      });

    typeBuilder.build();
  }
View Full Code Here

* @author Sebastian Menski
*/
public class ChildLaneSet extends LaneSetImpl {

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ChildLaneSet.class, BPMN_ELEMENT_CHILD_LANE_SET)
      .namespaceUri(BPMN20_NS)
      .extendsType(LaneSet.class)
      .instanceProvider(new ModelTypeInstanceProvider<ChildLaneSet>() {
        public ChildLaneSet newInstance(ModelTypeInstanceContext instanceContext) {
          return new ChildLaneSet(instanceContext);
        }
      });

    typeBuilder.build();
  }
View Full Code Here

  protected static Attribute<String> nameAttribute;
  protected static AttributeReference<InteractionNode> sourceRefAttribute;
  protected static AttributeReference<InteractionNode> targetRefAttribute;

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ConversationLink.class, BPMN_ELEMENT_CONVERSATION_LINK)
      .namespaceUri(BPMN20_NS)
      .extendsType(BaseElement.class)
      .instanceProvider(new ModelTypeInstanceProvider<ConversationLink>() {
        public ConversationLink newInstance(ModelTypeInstanceContext instanceContext) {
          return new ConversationLinkImpl(instanceContext);
        }
      });

    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
      .build();

    sourceRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_SOURCE_REF)
      .required()
      .qNameAttributeReference(InteractionNode.class)
      .build();

    targetRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_TARGET_REF)
      .required()
      .qNameAttributeReference(InteractionNode.class)
      .build();

    typeBuilder.build();
  }
View Full Code Here

  protected static ElementReference<Message, InMessageRef> inMessageRefChild;
  protected static ElementReference<Message, OutMessageRef> outMessageRefChild;
  protected static ElementReferenceCollection<Error, ErrorRef> errorRefCollection;

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Operation.class, BPMN_ELEMENT_OPERATION)
      .namespaceUri(BPMN20_NS)
      .extendsType(BaseElement.class)
      .instanceProvider(new ModelTypeInstanceProvider<Operation>() {
        public Operation newInstance(ModelTypeInstanceContext instanceContext) {
          return new OperationImpl(instanceContext);
        }
      });

    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
      .required()
      .build();

    implementationRefAttribute = typeBuilder.stringAttribute(BPMN_ELEMENT_IMPLEMENTATION_REF)
      .build();

    SequenceBuilder sequenceBuilder = typeBuilder.sequence();

    inMessageRefChild = sequenceBuilder.element(InMessageRef.class)
      .required()
      .qNameElementReference(Message.class)
      .build();

    outMessageRefChild = sequenceBuilder.element(OutMessageRef.class)
      .qNameElementReference(Message.class)
      .build();

    errorRefCollection = sequenceBuilder.elementCollection(ErrorRef.class)
      .qNameElementReferenceCollection(Error.class)
      .build();

    typeBuilder.build();
  }
View Full Code Here

  protected static Attribute<String> nameAttribute;
  protected static ElementReferenceCollection<LinkEventDefinition, Source> sourceCollection;
  protected static ElementReference<LinkEventDefinition, Target> targetChild;

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(LinkEventDefinition.class, BPMN_ELEMENT_LINK_EVENT_DEFINITION)
      .namespaceUri(BPMN20_NS)
      .extendsType(EventDefinition.class)
      .instanceProvider(new ModelTypeInstanceProvider<LinkEventDefinition>() {
        public LinkEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
          return new LinkEventDefinitionImpl(instanceContext);
        }
      });

    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
      .required()
      .build();

    SequenceBuilder sequenceBuilder = typeBuilder.sequence();

    sourceCollection = sequenceBuilder.elementCollection(Source.class)
      .qNameElementReferenceCollection(LinkEventDefinition.class)
      .build();

    targetChild = sequenceBuilder.element(Target.class)
      .qNameElementReference(LinkEventDefinition.class)
      .build();

    typeBuilder.build();
  }
View Full Code Here

* @author Sebastian Menski
*/
public class ManualTaskImpl extends TaskImpl implements ManualTask {

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ManualTask.class, BPMN_ELEMENT_MANUAL_TASK)
      .namespaceUri(BPMN20_NS)
      .extendsType(Task.class)
      .instanceProvider(new ModelTypeInstanceProvider<ManualTask>() {
        public ManualTask newInstance(ModelTypeInstanceContext instanceContext) {
          return new ManualTaskImpl(instanceContext);
        }
      });

    typeBuilder.build();
  }
View Full Code Here

* @author Sebastian Menski
*/
public class ScriptImpl extends BpmnModelElementInstanceImpl implements Script {

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Script.class, BPMN_ELEMENT_SCRIPT)
      .namespaceUri(BPMN20_NS)
      .instanceProvider(new ModelTypeInstanceProvider<Script>() {
        public Script newInstance(ModelTypeInstanceContext instanceContext) {
          return new ScriptImpl(instanceContext);
        }
      });

    typeBuilder.build();
  }
View Full Code Here

  protected static ChildElement<TimeDate> timeDateChild;
  protected static ChildElement<TimeDuration> timeDurationChild;
  protected static ChildElement<TimeCycle> timeCycleChild;

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(TimerEventDefinition.class, BPMN_ELEMENT_TIMER_EVENT_DEFINITION)
      .namespaceUri(BPMN20_NS)
      .extendsType(EventDefinition.class)
      .instanceProvider(new ModelTypeInstanceProvider<TimerEventDefinition>() {
        public TimerEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
          return new TimerEventDefinitionImpl(instanceContext);
        }
      });

    SequenceBuilder sequenceBuilder = typeBuilder.sequence();

    timeDateChild = sequenceBuilder.element(TimeDate.class)
      .build();

    timeDurationChild = sequenceBuilder.element(TimeDuration.class)
      .build();

    timeCycleChild = sequenceBuilder.element(TimeCycle.class)
      .build();

    typeBuilder.build();
  }
View Full Code Here

  protected static ChildElement<PartitionElement> partitionElementChild;
  protected static ElementReferenceCollection<FlowNode, FlowNodeRef> flowNodeRefCollection;
  protected static ChildElement<ChildLaneSet> childLaneSetChild;

  public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Lane.class, BPMN_ELEMENT_LANE)
      .namespaceUri(BPMN20_NS)
      .extendsType(BaseElement.class)
      .instanceProvider(new ModelTypeInstanceProvider<Lane>() {
        public Lane newInstance(ModelTypeInstanceContext instanceContext) {
          return new LaneImpl(instanceContext);
        }
      });

    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
      .build();

    partitionElementRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_PARTITION_ELEMENT_REF)
      .qNameAttributeReference(PartitionElement.class)
      .build();

    SequenceBuilder sequenceBuilder = typeBuilder.sequence();

    partitionElementChild = sequenceBuilder.element(PartitionElement.class)
      .build();

    flowNodeRefCollection = sequenceBuilder.elementCollection(FlowNodeRef.class)
      .idElementReferenceCollection(FlowNode.class)
      .build();

    childLaneSetChild = sequenceBuilder.element(ChildLaneSet.class)
      .build();



    typeBuilder.build();
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.