public void runAutomated(AutomatedInstallData idata, IXMLElement panelRoot)
     throws InstallerException {
   IXMLElement locations = panelRoot.getFirstChildNamed(LOCATIONS_NODE_NAME);
   if (locations != null && locations.getContent() != null) {
     idata.setVariable(Unpacker.INSTALL_RT_LOCATIONS_VAR, locations.getContent());
   }
 }
Esempio n. 2
0
 /*
  * (non-Javadoc)
  *
  * @see de.reddot.installer.rules.Condition#readFromXML(net.n3.nanoxml.XMLElement)
  */
 public void readFromXML(IXMLElement xmlcondition) {
   try {
     if (xmlcondition.getChildrenCount() != 2) {
       Debug.log("xor-condition needs two conditions as operands");
       return;
     }
     this.leftoperand = RulesEngine.analyzeCondition(xmlcondition.getChildAtIndex(0));
     this.rightoperand = RulesEngine.analyzeCondition(xmlcondition.getChildAtIndex(1));
   } catch (Exception e) {
     Debug.log("missing element in xor-condition");
   }
 }
  /*--------------------------------------------------------------------------*/
  public static boolean attributeIsTrue(IXMLElement element, String name) {
    String value = element.getAttribute(name, "").toUpperCase();

    if (value.equals(YES)) {
      return (true);
    } else if (value.equals(TRUE)) {
      return (true);
    } else if (value.equals(ON)) {
      return (true);
    } else if (value.equals(_1)) {
      return (true);
    }

    return (false);
  }
  /**
   * The Opposit of AttributeIsTrue()
   *
   * @param element the element to inspect
   * @param name the attribute to inspect
   * @return returns true if name attribute of the given element contains "false"
   */
  public static boolean attributeIsFalse(IXMLElement element, String name) {
    String value = element.getAttribute(name, "").toUpperCase();

    if (value.equals("NO")) {
      return (true);
    } else if (value.equals("FALSE")) {
      return (true);
    } else if (value.equals("OFF")) {
      return (true);
    } else if (value.equals("0")) {
      return (true);
    }

    return (false);
  }
 public void makeXMLData(AutomatedInstallData installData, IXMLElement panelRoot) {
   IXMLElement locations = new XMLElementImpl(LOCATIONS_NODE_NAME, panelRoot);
   locations.setContent(installData.getVariable(Unpacker.INSTALL_RT_LOCATIONS_VAR));
   panelRoot.addChild(locations);
 }