Ejemplo n.º 1
0
    public WhatsNewItem(Element root, WhatsNewComponentProvider prov, AbstractProjectViewer pv)
        throws Exception {

      this.id = JDOMUtils.getAttributeValue(root, XMLConstants.id, false);

      if ((!this.id.equals("")) && (prov != null)) {

        this.component = prov.getComponent(pv, this.id);

      } else {

        this.id = null;
      }

      this.onlyIfCurrentVersion =
          JDOMUtils.getAttributeValueAsBoolean(root, XMLConstants.onlyIfCurrentVersion, false);
      this.title = JDOMUtils.getChildElementContent(root, XMLConstants.title);
      this.description = JDOMUtils.getChildElementContent(root, XMLConstants.description, false);

      if (this.description.equals("")) {

        this.description = null;
      }
    }