Class AttributeImpl<T>
- java.lang.Object
-
- org.camunda.bpm.model.xml.impl.type.attribute.AttributeImpl<T>
-
- All Implemented Interfaces:
Attribute<T>
- Direct Known Subclasses:
BooleanAttribute
,DoubleAttribute
,EnumAttribute
,IntegerAttribute
,NamedEnumAttribute
,StringAttribute
public abstract class AttributeImpl<T> extends java.lang.Object implements Attribute<T>
Base class for implementing primitive value attributes
- Author:
- Daniel Meyer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.String
convertModelValueToXmlValue(T modelValue)
to be implemented by subclasses: converts the raw (String) value of the attribute to the type required by the modelprotected abstract T
convertXmlValueToModelValue(java.lang.String rawValue)
to be implemented by subclasses: converts the raw (String) value of the attribute to the type required by the modeljava.lang.String
getAttributeName()
T
getDefaultValue()
java.util.List<Reference<?>>
getIncomingReferences()
java.lang.String
getNamespaceUri()
java.util.List<Reference<?>>
getOutgoingReferences()
ModelElementType
getOwningElementType()
T
getValue(ModelElementInstance modelElement)
returns the value of the attribute.boolean
isIdAttribute()
boolean
isRequired()
void
registerIncoming(Reference<?> ref)
void
registerOutgoingReference(Reference<?> ref)
void
removeAttribute(ModelElementInstance modelElement)
void
setAttributeName(java.lang.String attributeName)
void
setDefaultValue(T defaultValue)
void
setId()
Indicate whether this attribute is an Id attributevoid
setNamespaceUri(java.lang.String namespaceUri)
void
setRequired(boolean required)
void
setValue(ModelElementInstance modelElement, T value)
sets the value of the attribute.void
setValue(ModelElementInstance modelElement, T value, boolean withReferenceUpdate)
sets the value of the attribute.void
unlinkReference(ModelElementInstance modelElement, java.lang.Object referenceIdentifier)
void
updateIncomingReferences(ModelElementInstance modelElement, java.lang.String newIdentifier, java.lang.String oldIdentifier)
-
-
-
Method Detail
-
convertXmlValueToModelValue
protected abstract T convertXmlValueToModelValue(java.lang.String rawValue)
to be implemented by subclasses: converts the raw (String) value of the attribute to the type required by the model- Returns:
- the converted value
-
convertModelValueToXmlValue
protected abstract java.lang.String convertModelValueToXmlValue(T modelValue)
to be implemented by subclasses: converts the raw (String) value of the attribute to the type required by the model- Returns:
- the converted value
-
getOwningElementType
public ModelElementType getOwningElementType()
- Specified by:
getOwningElementType
in interfaceAttribute<T>
-
getValue
public T getValue(ModelElementInstance modelElement)
returns the value of the attribute.
-
setValue
public void setValue(ModelElementInstance modelElement, T value)
sets the value of the attribute. the value of the attribute.
-
setValue
public void setValue(ModelElementInstance modelElement, T value, boolean withReferenceUpdate)
Description copied from interface:Attribute
sets the value of the attribute.
-
updateIncomingReferences
public void updateIncomingReferences(ModelElementInstance modelElement, java.lang.String newIdentifier, java.lang.String oldIdentifier)
-
getDefaultValue
public T getDefaultValue()
- Specified by:
getDefaultValue
in interfaceAttribute<T>
-
setDefaultValue
public void setDefaultValue(T defaultValue)
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfaceAttribute<T>
-
setRequired
public void setRequired(boolean required)
-
setNamespaceUri
public void setNamespaceUri(java.lang.String namespaceUri)
- Parameters:
namespaceUri
- the namespaceUri to set
-
getNamespaceUri
public java.lang.String getNamespaceUri()
- Specified by:
getNamespaceUri
in interfaceAttribute<T>
- Returns:
- the namespaceUri
-
isIdAttribute
public boolean isIdAttribute()
- Specified by:
isIdAttribute
in interfaceAttribute<T>
-
setId
public void setId()
Indicate whether this attribute is an Id attribute
-
getAttributeName
public java.lang.String getAttributeName()
- Specified by:
getAttributeName
in interfaceAttribute<T>
- Returns:
- the attributeName
-
setAttributeName
public void setAttributeName(java.lang.String attributeName)
- Parameters:
attributeName
- the attributeName to set
-
removeAttribute
public void removeAttribute(ModelElementInstance modelElement)
-
unlinkReference
public void unlinkReference(ModelElementInstance modelElement, java.lang.Object referenceIdentifier)
-
getIncomingReferences
public java.util.List<Reference<?>> getIncomingReferences()
- Specified by:
getIncomingReferences
in interfaceAttribute<T>
- Returns:
- the incomingReferences
-
getOutgoingReferences
public java.util.List<Reference<?>> getOutgoingReferences()
- Specified by:
getOutgoingReferences
in interfaceAttribute<T>
- Returns:
- the outgoingReferences
-
registerOutgoingReference
public void registerOutgoingReference(Reference<?> ref)
-
registerIncoming
public void registerIncoming(Reference<?> ref)
-
-