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 Object
implements Reference<T>
- Author:
- Sebastian Menski
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindReferenceSourceElements
(ModelElementInstance referenceTargetElement) Find all reference source element instances of the reference target model element instanceGet the reference target attributegetReferenceTargetElement
(ModelElementInstance referenceSourceElement) Get the reference target model element instancevoid
referencedElementRemoved
(ModelElementInstance referenceTargetElement, Object referenceIdentifier) Remove the reference if the target element is removedvoid
referencedElementUpdated
(ModelElementInstance referenceTargetElement, String oldIdentifier, 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, String referenceIdentifier) Set the reference identifier in the reference sourcevoid
setReferenceTargetAttribute
(AttributeImpl<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, String oldIdentifier, String newIdentifier) Update the reference identifier of the reference source model element instanceMethods 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 Details
-
referenceTargetAttribute
-
-
Constructor Details
-
ReferenceImpl
public ReferenceImpl()
-
-
Method Details
-
setReferenceIdentifier
protected abstract void setReferenceIdentifier(ModelElementInstance referenceSourceElement, String referenceIdentifier) Set the reference identifier in the reference source- Parameters:
referenceSourceElement
- the reference source model element instancereferenceIdentifier
- the new reference identifier
-
getReferenceTargetElement
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
Set the reference target attribute- Parameters:
referenceTargetAttribute
- the reference target string attribute
-
getReferenceTargetAttribute
Get the reference target attribute- Specified by:
getReferenceTargetAttribute
in interfaceReference<T extends ModelElementInstance>
- Returns:
- the reference target string attribute
-
setReferenceTargetElementType
Set the reference target model element type- Parameters:
referenceTargetElementType
- the referenceTargetElementType to set
-
findReferenceSourceElements
public 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, String oldIdentifier, 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, String oldIdentifier, 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, 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
-