Exemplo n.º 1
0
        public virtual void setAttributeValue(string attributeName, string xmlValue, bool isIdAttribute, bool withReferenceUpdate)
        {
            string oldValue = getAttributeValue(attributeName);

            if (isIdAttribute)
            {
                domElement.setIdAttribute(attributeName, xmlValue);
            }
            else
            {
                domElement.setAttribute(attributeName, xmlValue);
            }
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: org.camunda.bpm.model.xml.type.attribute.Attribute<?> attribute = elementType.getAttribute(attributeName);
            Attribute <object> attribute = elementType.getAttribute(attributeName);

            if (attribute != null && withReferenceUpdate)
            {
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: ((org.camunda.bpm.model.xml.impl.type.attribute.AttributeImpl<?>) attribute).updateIncomingReferences(this, xmlValue, oldValue);
                ((AttributeImpl <object>)attribute).updateIncomingReferences(this, xmlValue, oldValue);
            }
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") public void performModelBuild(org.camunda.bpm.model.xml.Model model)
        public virtual void performModelBuild(Model model)
        {
            // register declaring type as a referencing type of referenced type
            ModelElementTypeImpl referenceTargetType = (ModelElementTypeImpl)model.getType(referenceTargetElement);

            // the actual referenced type
            attributeReferenceImpl.ReferenceTargetElementType = referenceTargetType;

            // the referenced attribute may be declared on a base type of the referenced type.
            AttributeImpl <string> idAttribute = (AttributeImpl <string>)referenceTargetType.getAttribute("id");

            if (idAttribute != null)
            {
                idAttribute.registerIncoming(attributeReferenceImpl);
                attributeReferenceImpl.ReferenceTargetAttribute = idAttribute;
            }
            else
            {
                throw new ModelException("Element type " + referenceTargetType.TypeNamespace + ":" + referenceTargetType.TypeName + " has no id attribute");
            }
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") public void performModelBuild(org.camunda.bpm.model.xml.Model model)
        public virtual void performModelBuild(Model model)
        {
            ModelElementTypeImpl referenceTargetType = (ModelElementTypeImpl)model.getType(referenceTargetClass);
            ModelElementTypeImpl referenceSourceType = (ModelElementTypeImpl)model.getType(childElementType);

            elementReferenceCollectionImpl.ReferenceTargetElementType = referenceTargetType;
            elementReferenceCollectionImpl.setReferenceSourceElementType(referenceSourceType);

            // the referenced attribute may be declared on a base type of the referenced type.
            AttributeImpl <string> idAttribute = (AttributeImpl <string>)referenceTargetType.getAttribute("id");

            if (idAttribute != null)
            {
                idAttribute.registerIncoming(elementReferenceCollectionImpl);
                elementReferenceCollectionImpl.ReferenceTargetAttribute = idAttribute;
            }
            else
            {
                throw new ModelException("Unable to find id attribute of " + referenceTargetClass);
            }
        }