src/main/java/com/yelbota/plugins/adt/model/ApplicationDescriptorModel.java
/**
     * Set properties into parsed descriptor.
     */
Set properties into parsed descriptor.
Set properties into parsed descriptor .
public void configureDescriptor() {
        Element docEle = dom.getDocumentElement();
        NodeList nl = docEle.getChildNodes();
        Element extensionsElement = null;
        for (int i = 0; i < nl.getLength(); i++) {
            Object uel = nl.item(i);
            if (uel instanceof Element) {
                Element el = (Element) uel;
                String nodeName = el.getNodeName();
                if (nodeName.equals("versionNumber")) {
                    el.setTextContent(versionNumber);
                } else if (nodeName.equals("versionLabel")) {
                    el.setTextContent(versionLabel);
                } else if (nodeName.equals("initialWindow")) {
                    NodeList initialWindowElements = el.getElementsByTagName("content");
                    initialWindowElements.item(0).setTextContent(content);
                } else if (nodeName.equals("extensions")) {
                    extensionsElement = el;
                }
            }
        }
        if (extensionsElement != null) {
            if (extensionIds == null || extensionIds.size() < 1) {
                docEle.removeChild(extensionsElement);
            } else {
                nl = extensionsElement.getChildNodes();
                while (nl.getLength() > 0)
                    extensionsElement.removeChild(nl.item(0));
                appendExtensionsElementChildren(extensionsElement);
            }
        } else {
            if (extensionIds != null && extensionIds.size() > 0) {
                extensionsElement = dom.createElement("extensions");
                appendExtensionsElementChildren(extensionsElement);
                docEle.appendChild(extensionsElement);
            }
        }
    }
public void configureDescriptor ( ) { Element docEle = dom . getDocumentElement ( ) ; NodeList nl = docEle . getChildNodes ( ) ; Element extensionsElement = null ; for ( int i = 0 ; i < nl . getLength ( ) ; i ++ ) { Object uel = nl . item ( i ) ; if ( uel instanceof Element ) { Element el = ( Element ) uel ; String nodeName = el . getNodeName ( ) ; if ( nodeName . equals ( "versionNumber" ) ) { el . setTextContent ( versionNumber ) ; } else if ( nodeName . equals ( "versionLabel" ) ) { el . setTextContent ( versionLabel ) ; } else if ( nodeName . equals ( "initialWindow" ) ) { NodeList initialWindowElements = el . getElementsByTagName ( "content" ) ; initialWindowElements . item ( 0 ) . setTextContent ( content ) ; } else if ( nodeName . equals ( "extensions" ) ) { extensionsElement = el ; } } } if ( extensionsElement != null ) { if ( extensionIds == null || extensionIds . size ( ) < 1 ) { docEle . removeChild ( extensionsElement ) ; } else { nl = extensionsElement . getChildNodes ( ) ; while ( nl . getLength ( ) > 0 ) extensionsElement . removeChild ( nl . item ( 0 ) ) ; appendExtensionsElementChildren ( extensionsElement ) ; } } else { if ( extensionIds != null && extensionIds . size ( ) > 0 ) { extensionsElement = dom . createElement ( "extensions" ) ; appendExtensionsElementChildren ( extensionsElement ) ; docEle . appendChild ( extensionsElement ) ; } } }
Set properties into parsed descriptor.
Set properties into parsed descriptor .
// Clear <extensions>.