Package org.camunda.bpm.model.xml.instance

Examples of org.camunda.bpm.model.xml.instance.DomElement


  public void setUniqueChildElementByNameNs(ModelElementInstance newChild) {
    ModelUtil.ensureInstanceOf(newChild, ModelElementInstanceImpl.class);
    ModelElementInstanceImpl newChildElement = (ModelElementInstanceImpl) newChild;

    DomElement childElement = newChildElement.getDomElement();
    ModelElementInstance existingChild = getUniqueChildElementByNameNs(childElement.getNamespaceURI(), childElement.getLocalName());
    if(existingChild == null) {
      addChildElement(newChild);
    } else {
      replaceChildElement(existingChild, newChildElement);
    }
View Full Code Here


      replaceChildElement(existingChild, newChildElement);
    }
  }

  public void replaceChildElement(ModelElementInstance existingChild, ModelElementInstance newChild) {
    DomElement existingChildDomElement = existingChild.getDomElement();
    DomElement newChildDomElement = newChild.getDomElement();

    // unlink (remove all references) of child elements
    ((ModelElementInstanceImpl) existingChild).unlinkAllChildReferences();

    // update incoming references from old to new child element
View Full Code Here

    String identifier = getReferenceIdentifier(referenceSourceElement);
    List<String> references = StringUtil.splitListBySeparator(identifier, separator);

    Collection<DomElement> referenceTargetElements = new ArrayList<DomElement>();
    for (String reference : references) {
      DomElement referenceTargetElement = document.getElementById(reference);
      if (referenceTargetElement != null) {
        referenceTargetElements.add(referenceTargetElement);
      }
      else {
        throw new ModelException("Unable to find a model element instance for id " + identifier);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.model.xml.instance.DomElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.