Package com.adito.boot

Examples of com.adito.boot.DefaultPropertyDefinitionCategory


                  def = new XMLPropertyDefinition(ec);
                }
                propertyDefinitions.put(def.getName(), def);
                pc.registerPropertyDefinition(def);
              } else if (ec.getName().equals("category")) {
                PropertyDefinitionCategory cat = new DefaultPropertyDefinitionCategory(
                    ec.getAttribute("id").getIntValue(), ec
                        .getAttributeValue("bundle"),
                    ec.getAttributeValue("image"));
                cat.setPropertyClass(pc);
                if (ec.getAttributeValue("parent") == null) {
                  pc.addPropertyDefinitionCategory(-1, cat);
                } else {
                  PropertyDefinitionCategory parentCat = pc
                      .getPropertyDefinitionCategory(ec
                          .getAttribute("parent")
                          .getIntValue());
                  if (parentCat == null) {
                    throw new ExtensionException(
                        ExtensionException.INTERNAL_ERROR,
                        "No parent category for "
                            + cat.getId()
                            + " of "
                            + ec
                                .getAttributeValue("parent"));
                  }
                  pc.addPropertyDefinitionCategory(parentCat
                      .getId(), cat);
                }
                propertyDefinitionCategories.put(cat.getId(),
                    cat);
              } else {
                throw new ExtensionException(
                    ExtensionException.INTERNAL_ERROR,
                    "Expect child element of <definitions> with child elements of <definition>. Got <"
View Full Code Here


        addCat(c, l);
      }   
  }

  void addCategories(PropertyClass propertyClass, Element el, PropertyDefinitionCategory parent) throws JDOMException {
        PropertyDefinitionCategory cat = new DefaultPropertyDefinitionCategory(el.getAttribute("id").getIntValue(),
            el.getAttributeValue("bundle"),
            el.getAttributeValue("image"));
        propertyClass.addPropertyDefinitionCategory(parent == null ? -1 : parent.getId(), cat);
        for (Iterator i = el.getChildren().iterator(); i.hasNext();) {
            addCategories(propertyClass, (Element) i.next(), cat);
View Full Code Here

TOP

Related Classes of com.adito.boot.DefaultPropertyDefinitionCategory

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.