Search in sources :

Example 81 with ModelElementTypeBuilder

use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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 82 with ModelElementTypeBuilder

use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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 83 with ModelElementTypeBuilder

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

the class ChildRelationshipDefinition method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ChildRelationshipDefinition.class, TYPE_NAME_CHILD_RELATIONSHIP_DEFINITION).namespaceUri(MODEL_NAMESPACE).extendsType(RelationshipDefinition.class).instanceProvider(new ModelTypeInstanceProvider<ChildRelationshipDefinition>() {

        public ChildRelationshipDefinition newInstance(ModelTypeInstanceContext instanceContext) {
            return new ChildRelationshipDefinition(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 84 with ModelElementTypeBuilder

use of org.camunda.bpm.model.xml.type.ModelElementTypeBuilder 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 85 with ModelElementTypeBuilder

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

the class FlightInstructor method registerType.

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

        public FlightInstructor newInstance(ModelTypeInstanceContext instanceContext) {
            return new FlightInstructor(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : 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)416 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)373 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)152 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)31 DmnElementReference (org.camunda.bpm.model.dmn.instance.DmnElementReference)23 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)16 Expression (org.camunda.bpm.model.bpmn.instance.Expression)13 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)11 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)10 Expression (org.camunda.bpm.model.dmn.instance.Expression)9 Task (org.camunda.bpm.model.bpmn.instance.Task)8 Expression (org.camunda.bpm.model.cmmn.instance.Expression)8 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)8 DmnElement (org.camunda.bpm.model.dmn.instance.DmnElement)7 Gateway (org.camunda.bpm.model.bpmn.instance.Gateway)6 PlanItemDefinition (org.camunda.bpm.model.cmmn.instance.PlanItemDefinition)6 FormalExpression (org.camunda.bpm.model.bpmn.instance.FormalExpression)5 DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)5 InformationItem (org.camunda.bpm.model.dmn.instance.InformationItem)5 FlowElement (org.camunda.bpm.model.bpmn.instance.FlowElement)4