org.camunda.bpm.model.xml.impl.type
Class ModelElementTypeImpl

java.lang.Object
  extended by org.camunda.bpm.model.xml.impl.type.ModelElementTypeImpl
All Implemented Interfaces:
ModelElementType

public class ModelElementTypeImpl
extends Object
implements ModelElementType

Author:
Daniel Meyer

Constructor Summary
ModelElementTypeImpl(ModelImpl model, String name, Class<? extends ModelElementInstance> instanceType)
           
 
Method Summary
protected  ModelElementInstance createModelElementInstance(ModelTypeInstanceContext instanceContext)
           
 boolean equals(Object obj)
           
 Collection<Attribute<?>> getAllAttributes()
          Returns a list of all attributes, including the attributes of all base types.
 List<ChildElementCollection<?>> getAllChildElementCollections()
           
 List<ModelElementType> getAllChildElementTypes()
           
 Collection<ModelElementType> getAllExtendingTypes()
           
 Attribute<?> getAttribute(String attributeName)
          Return the attribute for the attribute name
 List<Attribute<?>> getAttributes()
           
 ModelElementType getBaseType()
           
 ChildElementCollection<?> getChildElementCollection(ModelElementType childElementType)
           
 List<ChildElementCollection<?>> getChildElementCollections()
           
 List<ModelElementType> getChildElementTypes()
           
 Collection<ModelElementType> getExtendingTypes()
           
 Collection<ModelElementInstance> getInstances(ModelInstance modelInstance)
           
 Class<? extends ModelElementInstance> getInstanceType()
           
 Model getModel()
           
 String getTypeName()
           
 String getTypeNamespace()
           
 int hashCode()
           
 boolean isAbstract()
           
 boolean isBaseTypeOf(ModelElementType elementType)
          Test if a element type is a base type of this type.
 ModelElementInstance newInstance(ModelInstance modelInstance)
           
 ModelElementInstance newInstance(ModelInstanceImpl modelInstance, DomElement domElement)
           
 void registerAttribute(Attribute<?> attribute)
           
 void registerChildElementCollection(ChildElementCollection<?> childElementCollection)
           
 void registerChildElementType(ModelElementType childElementType)
           
 void registerExtendingType(ModelElementType modelType)
           
 void resolveBaseTypes(List<ModelElementType> baseTypes)
          Resolve all types which are base types of this type
 void resolveExtendingTypes(Set<ModelElementType> allExtendingTypes)
          Resolve all types recursively which are extending this type
 void setAbstract(boolean isAbstract)
           
 void setBaseType(ModelElementTypeImpl baseType)
           
 void setInstanceProvider(ModelElementTypeBuilder.ModelTypeInstanceProvider<?> instanceProvider)
           
 void setTypeNamespace(String typeNamespace)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelElementTypeImpl

public ModelElementTypeImpl(ModelImpl model,
                            String name,
                            Class<? extends ModelElementInstance> instanceType)
Method Detail

newInstance

public ModelElementInstance newInstance(ModelInstance modelInstance)
Specified by:
newInstance in interface ModelElementType

newInstance

public ModelElementInstance newInstance(ModelInstanceImpl modelInstance,
                                        DomElement domElement)

registerAttribute

public void registerAttribute(Attribute<?> attribute)

registerChildElementType

public void registerChildElementType(ModelElementType childElementType)

registerChildElementCollection

public void registerChildElementCollection(ChildElementCollection<?> childElementCollection)

registerExtendingType

public void registerExtendingType(ModelElementType modelType)

createModelElementInstance

protected ModelElementInstance createModelElementInstance(ModelTypeInstanceContext instanceContext)

getAttributes

public final List<Attribute<?>> getAttributes()
Specified by:
getAttributes in interface ModelElementType

getTypeName

public String getTypeName()
Specified by:
getTypeName in interface ModelElementType

getInstanceType

public Class<? extends ModelElementInstance> getInstanceType()
Specified by:
getInstanceType in interface ModelElementType

setTypeNamespace

public void setTypeNamespace(String typeNamespace)

getTypeNamespace

public String getTypeNamespace()
Specified by:
getTypeNamespace in interface ModelElementType

setBaseType

public void setBaseType(ModelElementTypeImpl baseType)

setInstanceProvider

public void setInstanceProvider(ModelElementTypeBuilder.ModelTypeInstanceProvider<?> instanceProvider)

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface ModelElementType

setAbstract

public void setAbstract(boolean isAbstract)

getExtendingTypes

public Collection<ModelElementType> getExtendingTypes()
Specified by:
getExtendingTypes in interface ModelElementType

getAllExtendingTypes

public Collection<ModelElementType> getAllExtendingTypes()
Specified by:
getAllExtendingTypes in interface ModelElementType

resolveExtendingTypes

public void resolveExtendingTypes(Set<ModelElementType> allExtendingTypes)
Resolve all types recursively which are extending this type

Parameters:
allExtendingTypes - set of calculated extending types

resolveBaseTypes

public void resolveBaseTypes(List<ModelElementType> baseTypes)
Resolve all types which are base types of this type

Parameters:
baseTypes - list of calculated base types

getBaseType

public ModelElementType getBaseType()
Specified by:
getBaseType in interface ModelElementType

getModel

public Model getModel()
Specified by:
getModel in interface ModelElementType

getChildElementTypes

public List<ModelElementType> getChildElementTypes()
Specified by:
getChildElementTypes in interface ModelElementType

getAllChildElementTypes

public List<ModelElementType> getAllChildElementTypes()
Specified by:
getAllChildElementTypes in interface ModelElementType

getChildElementCollections

public List<ChildElementCollection<?>> getChildElementCollections()

getAllChildElementCollections

public List<ChildElementCollection<?>> getAllChildElementCollections()

getInstances

public Collection<ModelElementInstance> getInstances(ModelInstance modelInstance)
Specified by:
getInstances in interface ModelElementType

isBaseTypeOf

public boolean isBaseTypeOf(ModelElementType elementType)
Test if a element type is a base type of this type. So this type extends the given element type.

Parameters:
elementType - the element type to test
Returns:
true if childElementTypeClass is a base type of this type, else otherwise

getAllAttributes

public Collection<Attribute<?>> getAllAttributes()
Returns a list of all attributes, including the attributes of all base types.

Returns:
the list of all attributes

getAttribute

public Attribute<?> getAttribute(String attributeName)
Return the attribute for the attribute name

Specified by:
getAttribute in interface ModelElementType
Parameters:
attributeName - the name of the attribute
Returns:
the attribute or null if it not exists

getChildElementCollection

public ChildElementCollection<?> getChildElementCollection(ModelElementType childElementType)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2015 camunda services GmbH. All rights reserved.