Class ReferenceImpl<T extends ModelElementInstance>
- java.lang.Object
-
- org.camunda.bpm.model.xml.impl.type.reference.ReferenceImpl<T>
-
- All Implemented Interfaces:
Reference<T>
- Direct Known Subclasses:
AttributeReferenceImpl
,ElementReferenceCollectionImpl
public abstract class ReferenceImpl<T extends ModelElementInstance> extends java.lang.Object implements Reference<T>
- Author:
- Sebastian Menski
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeImpl<java.lang.String>
referenceTargetAttribute
-
Constructor Summary
Constructors Constructor Description ReferenceImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ModelElementInstance>
findReferenceSourceElements(ModelElementInstance referenceTargetElement)
Find all reference source element instances of the reference target model element instanceAttribute<java.lang.String>
getReferenceTargetAttribute()
Get the reference target attributeT
getReferenceTargetElement(ModelElementInstance referenceSourceElement)
Get the reference target model element instancevoid
referencedElementRemoved(ModelElementInstance referenceTargetElement, java.lang.Object referenceIdentifier)
Remove the reference if the target element is removedvoid
referencedElementUpdated(ModelElementInstance referenceTargetElement, java.lang.String oldIdentifier, java.lang.String newIdentifier)
Update the reference identifierprotected abstract void
removeReference(ModelElementInstance referenceSourceElement, ModelElementInstance referenceTargetElement)
Remove the reference in the reference source model element instanceprotected abstract void
setReferenceIdentifier(ModelElementInstance referenceSourceElement, java.lang.String referenceIdentifier)
Set the reference identifier in the reference sourcevoid
setReferenceTargetAttribute(AttributeImpl<java.lang.String> referenceTargetAttribute)
Set the reference target attributevoid
setReferenceTargetElement(ModelElementInstance referenceSourceElement, T referenceTargetElement)
Set the reference target model element instancevoid
setReferenceTargetElementType(ModelElementTypeImpl referenceTargetElementType)
Set the reference target model element typeprotected abstract void
updateReference(ModelElementInstance referenceSourceElement, java.lang.String oldIdentifier, java.lang.String newIdentifier)
Update the reference identifier of the reference source model element instance-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.model.xml.type.reference.Reference
getReferenceIdentifier, getReferenceSourceElementType
-
-
-
-
Field Detail
-
referenceTargetAttribute
protected AttributeImpl<java.lang.String> referenceTargetAttribute
-
-
Method Detail
-
setReferenceIdentifier
protected abstract void setReferenceIdentifier(ModelElementInstance referenceSourceElement, java.lang.String referenceIdentifier)
Set the reference identifier in the reference source- Parameters:
referenceSourceElement
- the reference source model element instancereferenceIdentifier
- the new reference identifier
-
getReferenceTargetElement
public T getReferenceTargetElement(ModelElementInstance referenceSourceElement)
Get the reference target model element instance- Specified by:
getReferenceTargetElement
in interfaceReference<T extends ModelElementInstance>
- Parameters:
referenceSourceElement
- the reference source model element instance- Returns:
- the reference target model element instance or null if not set
-
setReferenceTargetElement
public void setReferenceTargetElement(ModelElementInstance referenceSourceElement, T referenceTargetElement)
Set the reference target model element instance- Specified by:
setReferenceTargetElement
in interfaceReference<T extends ModelElementInstance>
- Parameters:
referenceSourceElement
- the reference source model element instancereferenceTargetElement
- the reference target model element instance- Throws:
ModelReferenceException
- if element is not already added to the model
-
setReferenceTargetAttribute
public void setReferenceTargetAttribute(AttributeImpl<java.lang.String> referenceTargetAttribute)
Set the reference target attribute- Parameters:
referenceTargetAttribute
- the reference target string attribute
-
getReferenceTargetAttribute
public Attribute<java.lang.String> getReferenceTargetAttribute()
Get the reference target attribute- Specified by:
getReferenceTargetAttribute
in interfaceReference<T extends ModelElementInstance>
- Returns:
- the reference target string attribute
-
setReferenceTargetElementType
public void setReferenceTargetElementType(ModelElementTypeImpl referenceTargetElementType)
Set the reference target model element type- Parameters:
referenceTargetElementType
- the referenceTargetElementType to set
-
findReferenceSourceElements
public java.util.Collection<ModelElementInstance> findReferenceSourceElements(ModelElementInstance referenceTargetElement)
Description copied from interface:Reference
Find all reference source element instances of the reference target model element instance- Specified by:
findReferenceSourceElements
in interfaceReference<T extends ModelElementInstance>
- Parameters:
referenceTargetElement
- the reference target model element instance- Returns:
- the collection of all reference source element instances
-
updateReference
protected abstract void updateReference(ModelElementInstance referenceSourceElement, java.lang.String oldIdentifier, java.lang.String newIdentifier)
Update the reference identifier of the reference source model element instance- Parameters:
referenceSourceElement
- the reference source model element instanceoldIdentifier
- the old reference identifiernewIdentifier
- the new reference identifier
-
referencedElementUpdated
public void referencedElementUpdated(ModelElementInstance referenceTargetElement, java.lang.String oldIdentifier, java.lang.String newIdentifier)
Update the reference identifier- Parameters:
referenceTargetElement
- the reference target model element instanceoldIdentifier
- the old reference identifiernewIdentifier
- the new reference identifier
-
removeReference
protected abstract void removeReference(ModelElementInstance referenceSourceElement, ModelElementInstance referenceTargetElement)
Remove the reference in the reference source model element instance- Parameters:
referenceSourceElement
- the reference source model element instance
-
referencedElementRemoved
public void referencedElementRemoved(ModelElementInstance referenceTargetElement, java.lang.Object referenceIdentifier)
Remove the reference if the target element is removed- Parameters:
referenceTargetElement
- the reference target model element instance, which is removedreferenceIdentifier
- the identifier of the reference to filter reference source elements
-
-