Search in sources :

Example 1 with PrimitiveStructureDefinition

use of org.activiti.engine.impl.bpmn.data.PrimitiveStructureDefinition in project Activiti by Activiti.

the class CxfWSDLImporter method importStructure.

protected void importStructure(Mapping mapping) {
    QName qname = mapping.getElement();
    final JType type = mapping.getType().getTypeClass();
    if (type.isPrimitive()) {
        final Class<?> primitiveClass = ReflectUtil.loadClass(type.boxify().fullName());
        final StructureDefinition structure = new PrimitiveStructureDefinition(this.namespace + qname.getLocalPart(), primitiveClass);
        this.structures.put(structure.getId(), structure);
    } else if (type instanceof JDefinedClass) {
        JDefinedClass theClass = (JDefinedClass) type;
        SimpleStructureDefinition structure = new SimpleStructureDefinition(this.namespace + qname.getLocalPart());
        this.structures.put(structure.getId(), structure);
        importFields(theClass, structure);
    } else {
        final Class<?> referencedClass = ReflectUtil.loadClass(type.fullName());
        final StructureDefinition structure = new PrimitiveStructureDefinition(this.namespace + qname.getLocalPart(), referencedClass);
        this.structures.put(structure.getId(), structure);
    }
}
Also used : StructureDefinition(org.activiti.engine.impl.bpmn.data.StructureDefinition) SimpleStructureDefinition(org.activiti.engine.impl.bpmn.data.SimpleStructureDefinition) PrimitiveStructureDefinition(org.activiti.engine.impl.bpmn.data.PrimitiveStructureDefinition) JDefinedClass(com.sun.codemodel.JDefinedClass) SimpleStructureDefinition(org.activiti.engine.impl.bpmn.data.SimpleStructureDefinition) QName(javax.xml.namespace.QName) PrimitiveStructureDefinition(org.activiti.engine.impl.bpmn.data.PrimitiveStructureDefinition) JDefinedClass(com.sun.codemodel.JDefinedClass) JClass(com.sun.codemodel.JClass) JType(com.sun.codemodel.JType)

Aggregations

JClass (com.sun.codemodel.JClass)1 JDefinedClass (com.sun.codemodel.JDefinedClass)1 JType (com.sun.codemodel.JType)1 QName (javax.xml.namespace.QName)1 PrimitiveStructureDefinition (org.activiti.engine.impl.bpmn.data.PrimitiveStructureDefinition)1 SimpleStructureDefinition (org.activiti.engine.impl.bpmn.data.SimpleStructureDefinition)1 StructureDefinition (org.activiti.engine.impl.bpmn.data.StructureDefinition)1