Search in sources :

Example 26 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-cmmn-model by camunda.

the class CamundaVariableListenerImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaVariableListener.class, CAMUNDA_ELEMENT_VARIABLE_LISTENER).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaVariableListener>() {

        public CamundaVariableListener newInstance(ModelTypeInstanceContext instanceContext) {
            return new CamundaVariableListenerImpl(instanceContext);
        }
    });
    camundaEventAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EVENT).namespace(CAMUNDA_NS).build();
    camundaClassAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_CLASS).namespace(CAMUNDA_NS).build();
    camundaExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_EXPRESSION).namespace(CAMUNDA_NS).build();
    camundaDelegateExpressionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DELEGATE_EXPRESSION).namespace(CAMUNDA_NS).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    camundaFieldCollection = sequenceBuilder.elementCollection(CamundaField.class).build();
    camundaScriptChild = sequenceBuilder.element(CamundaScript.class).build();
    typeBuilder.build();
}
Also used : CamundaVariableListener(org.camunda.bpm.model.cmmn.instance.camunda.CamundaVariableListener) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 27 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-xml-model by camunda.

the class Animal method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Animal.class, TYPE_NAME_ANIMAL).namespaceUri(MODEL_NAMESPACE).abstractType();
    idAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_ID).idAttribute().build();
    nameAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_NAME).build();
    fatherRef = typeBuilder.stringAttribute(ATTRIBUTE_NAME_FATHER).qNameAttributeReference(Animal.class).build();
    motherRef = typeBuilder.stringAttribute(ATTRIBUTE_NAME_MOTHER).idAttributeReference(Animal.class).build();
    isEndangeredAttr = typeBuilder.booleanAttribute(ATTRIBUTE_NAME_IS_ENDANGERED).defaultValue(false).build();
    genderAttr = typeBuilder.enumAttribute(ATTRIBUTE_NAME_GENDER, Gender.class).required().build();
    ageAttr = typeBuilder.integerAttribute(ATTRIBUTE_NAME_AGE).build();
    bestFriendsRefCollection = typeBuilder.stringAttribute(ATTRIBUTE_NAME_BEST_FRIEND_REFS).idAttributeReferenceCollection(Animal.class, AnimalAttributeReferenceCollection.class).build();
    SequenceBuilder sequence = typeBuilder.sequence();
    relationshipDefinitionsColl = sequence.elementCollection(RelationshipDefinition.class).build();
    relationshipDefinitionRefsColl = sequence.elementCollection(RelationshipDefinitionRef.class).qNameElementReferenceCollection(RelationshipDefinition.class).build();
    typeBuilder.build();
}
Also used : SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) Gender(org.camunda.bpm.model.xml.testmodel.Gender)

Example 28 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-xml-model by camunda.

the class Egg method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Egg.class, ELEMENT_NAME_EGG).namespaceUri(MODEL_NAMESPACE).instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<Egg>() {

        public Egg newInstance(ModelTypeInstanceContext instanceContext) {
            return new Egg(instanceContext);
        }
    });
    idAttr = typeBuilder.stringAttribute(ATTRIBUTE_NAME_ID).idAttribute().build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    motherRefChild = sequenceBuilder.element(Mother.class).uriElementReference(Animal.class).build();
    guardianRefCollection = sequenceBuilder.elementCollection(Guardian.class).uriElementReferenceCollection(Animal.class).build();
    typeBuilder.build();
}
Also used : SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 29 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-xml-model by camunda.

the class FlyingAnimal method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(FlyingAnimal.class, TYPE_NAME_FLYING_ANIMAL).namespaceUri(MODEL_NAMESPACE).extendsType(Animal.class).abstractType();
    wingspanAttribute = typeBuilder.doubleAttribute(ATTRIBUTE_NAME_WINGSPAN).build();
    SequenceBuilder sequence = typeBuilder.sequence();
    flightInstructorChild = sequence.element(FlightInstructor.class).idElementReference(FlyingAnimal.class).build();
    flightPartnerRefsColl = sequence.elementCollection(FlightPartnerRef.class).idElementReferenceCollection(FlyingAnimal.class).build();
    typeBuilder.build();
}
Also used : SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)

Example 30 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-cmmn-model by camunda.

the class CaseFileItemOnPartImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CaseFileItemOnPart.class, CMMN_ELEMENT_CASE_FILE_ITEM_ON_PART).extendsType(OnPart.class).namespaceUri(CMMN11_NS).instanceProvider(new ModelTypeInstanceProvider<CaseFileItemOnPart>() {

        public CaseFileItemOnPart newInstance(ModelTypeInstanceContext instanceContext) {
            return new CaseFileItemOnPartImpl(instanceContext);
        }
    });
    sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF).idAttributeReference(CaseFileItem.class).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    standardEventChild = sequenceBuilder.element(CaseFileItemTransitionStandardEvent.class).build();
    typeBuilder.build();
}
Also used : CaseFileItemOnPart(org.camunda.bpm.model.cmmn.instance.CaseFileItemOnPart) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)152 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)152 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)133 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)14 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)13 Expression (org.camunda.bpm.model.dmn.instance.Expression)8 FlowElement (org.camunda.bpm.model.bpmn.instance.FlowElement)4 Task (org.camunda.bpm.model.cmmn.instance.Task)4 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)3 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)3 DmnElement (org.camunda.bpm.model.dmn.instance.DmnElement)3 DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)3 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)3 ConversationNode (org.camunda.bpm.model.bpmn.instance.ConversationNode)2 CorrelationPropertyRetrievalExpression (org.camunda.bpm.model.bpmn.instance.CorrelationPropertyRetrievalExpression)2 Expression (org.camunda.bpm.model.bpmn.instance.Expression)2 FlowNode (org.camunda.bpm.model.bpmn.instance.FlowNode)2 Operation (org.camunda.bpm.model.bpmn.instance.Operation)2 Task (org.camunda.bpm.model.bpmn.instance.Task)2 Node (org.camunda.bpm.model.bpmn.instance.di.Node)2