本文整理汇总了Java中org.camunda.bpm.model.xml.instance.ModelElementInstance.getAttributeValue方法的典型用法代码示例。如果您正苦于以下问题:Java ModelElementInstance.getAttributeValue方法的具体用法?Java ModelElementInstance.getAttributeValue怎么用?Java ModelElementInstance.getAttributeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.model.xml.instance.ModelElementInstance
的用法示例。
在下文中一共展示了ModelElementInstance.getAttributeValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateIncomingReferences
import org.camunda.bpm.model.xml.instance.ModelElementInstance; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void updateIncomingReferences(ModelElementInstance oldInstance, ModelElementInstance newInstance) {
String oldId = oldInstance.getAttributeValue("id");
String newId = newInstance.getAttributeValue("id");
if (oldId == null || newId == null) {
return;
}
Collection<Attribute<?>> attributes = ((ModelElementTypeImpl) oldInstance.getElementType()).getAllAttributes();
for (Attribute<?> attribute : attributes) {
if (attribute.isIdAttribute()) {
for (Reference<?> incomingReference : attribute.getIncomingReferences()) {
((ReferenceImpl<ModelElementInstance>) incomingReference).referencedElementUpdated(newInstance, oldId, newId);
}
}
}
}
示例2: getValue
import org.camunda.bpm.model.xml.instance.ModelElementInstance; //导入方法依赖的package包/类
/**
* returns the value of the attribute.
*
* @return the value of the attribute.
*/
public T getValue(ModelElementInstance modelElement) {
String value;
if(namespaceUri == null) {
value = modelElement.getAttributeValue(attributeName);
} else {
value = modelElement.getAttributeValueNs(namespaceUri, attributeName);
if(value == null) {
String alternativeNamespace = owningElementType.getModel().getAlternativeNamespace(namespaceUri);
if (alternativeNamespace != null) {
value = modelElement.getAttributeValueNs(alternativeNamespace, attributeName);
}
}
}
// default value
if (value == null && defaultValue != null) {
return defaultValue;
} else {
return convertXmlValueToModelValue(value);
}
}
示例3: getReferenceIdentifier
import org.camunda.bpm.model.xml.instance.ModelElementInstance; //导入方法依赖的package包/类
@Override
public String getReferenceIdentifier(ModelElementInstance referenceSourceElement) {
// TODO: implement something more robust (CAM-4028)
String identifier = referenceSourceElement.getAttributeValue("href");
if (identifier != null) {
String[] parts = identifier.split("#");
if (parts.length > 1) {
return parts[parts.length - 1];
}
else {
return parts[0];
}
}
else {
return null;
}
}