org.camunda.bpm.model.xml.impl.type
Class ModelElementTypeImpl
java.lang.Object
org.camunda.bpm.model.xml.impl.type.ModelElementTypeImpl
- All Implemented Interfaces:
- ModelElementType
public class ModelElementTypeImpl
- extends Object
- implements ModelElementType
- Author:
- Daniel Meyer
ModelElementTypeImpl
public ModelElementTypeImpl(ModelImpl model,
String name,
Class<? extends ModelElementInstance> instanceType)
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
getElementsByNameNs
protected List<DomElement> getElementsByNameNs(DomDocument document,
String namespaceURI)
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 © 2016 camunda services GmbH. All rights reserved.