Package org.exoplatform.portal.config.model

Examples of org.exoplatform.portal.config.model.Properties


     * @see org.exoplatform.portal.config.model.Application
     * @see org.exoplatform.portal.config.model.Properties
     */
    public Properties getProperties() {
        if (properties_ == null)
            properties_ = new Properties();
        return properties_;
    }
View Full Code Here


         throw new JiBXException("Invalid object type for marshaller");
      if (!(ictx instanceof MarshallingContext))
         throw new JiBXException("Invalid object type for marshaller");

      MarshallingContext ctx = (MarshallingContext)ictx;
      Properties map = (Properties)obj;
      MarshallingContext mContext = ctx.startTagAttributes(marshallIndex, marshallName);
      mContext.attribute(marshallIndex, SIZE_ATTRIBUTE_NAME, map.size()).closeStartContent();

      Iterator<Map.Entry<String, String>> iter = map.entrySet().iterator();
      while (iter.hasNext())
      {
         Map.Entry<String, String> entry = iter.next();
         String key = entry.getKey().toString();
         String value = entry.getValue().toString();
View Full Code Here

      UnmarshallingContext ctx = (UnmarshallingContext)ictx;
      if (!ctx.isAt(marshalURI, marshallName))
         ctx.throwStartTagNameError(marshalURI, marshallName);

      int size = ctx.attributeInt(marshalURI, SIZE_ATTRIBUTE_NAME, DEFAULT_SIZE);
      Properties map = (Properties)obj;
      if (map == null)
         map = new Properties(size);

      ctx.parsePastStartTag(marshalURI, marshallName);
      while (ctx.isAt(marshalURI, ENTRY_ELEMENT_NAME))
      {
         Object key = ctx.attributeText(marshalURI, KEY_ATTRIBUTE_NAME, null);
         ctx.next();
         Object value = ctx.getText();
         map.put(key.toString(), value.toString());
         ctx.parsePastEndTag(marshalURI, ENTRY_ELEMENT_NAME);
      }
      ctx.parsePastEndTag(marshalURI, marshallName);
      return map;
   }
View Full Code Here

      String icon = nextOptionalTag(ctx, "icon");
      String width = nextOptionalTag(ctx, "width");
      String height = nextOptionalTag(ctx, "height");

      //
      Properties properties = null;
      if (ctx.isAt(m_uri, "properties"))
      {
         properties = (Properties)ctx.unmarshalElement();
      }
View Full Code Here

        application.setDescription(existing.getDescription());
        application.setHeight(existing.getHeight());
        application.setIcon(existing.getIcon());
        application.setId(existing.getId());
        application.setModifiable(existing.isModifiable());
        application.setProperties(new Properties(existing.getProperties()));
        application.setShowApplicationMode(existing.getShowApplicationMode());
        application.setShowApplicationState(existing.getShowApplicationState());
        application.setShowInfoBar(existing.getShowInfoBar());
        application.setState(copy(existing.getType(), existing.getState()));
        application.setTheme(existing.getTheme());
View Full Code Here

        portalConfig.setEditPermission(existing.getEditPermission());
        portalConfig.setLabel(existing.getLabel());
        portalConfig.setLocale(existing.getLocale());
        portalConfig.setModifiable(existing.isModifiable());
        portalConfig.setPortalLayout(copy(existing.getPortalLayout()));
        portalConfig.setProperties(new Properties(existing.getProperties()));

        return portalConfig;
    }
View Full Code Here

        UnmarshallingContext ctx = (UnmarshallingContext) ictx;
        if (!ctx.isAt(marshalURI, marshallName))
            ctx.throwStartTagNameError(marshalURI, marshallName);

        int size = ctx.attributeInt(marshalURI, SIZE_ATTRIBUTE_NAME, DEFAULT_SIZE);
        Properties map = (Properties) obj;
        if (map == null)
            map = new Properties(size);

        ctx.parsePastStartTag(marshalURI, marshallName);
        while (ctx.isAt(marshalURI, ENTRY_ELEMENT_NAME)) {
            Object key = ctx.attributeText(marshalURI, KEY_ATTRIBUTE_NAME, null);
            ctx.next();
            Object value = ctx.getText();
            map.put(key.toString(), value.toString());
            ctx.parsePastEndTag(marshalURI, ENTRY_ELEMENT_NAME);
        }
        ctx.parsePastEndTag(marshalURI, marshallName);
        return map;
    }
View Full Code Here

        String icon = nextOptionalTag(ctx, "icon");
        String width = nextOptionalTag(ctx, "width");
        String height = nextOptionalTag(ctx, "height");

        //
        Properties properties = null;
        if (ctx.isAt(m_uri, "properties")) {
            properties = (Properties) ctx.unmarshalElement();
        }

        //
View Full Code Here

            throw new JiBXException("Invalid object type for marshaller");
        if (!(ictx instanceof MarshallingContext))
            throw new JiBXException("Invalid object type for marshaller");

        MarshallingContext ctx = (MarshallingContext) ictx;
        Properties map = (Properties) obj;
        MarshallingContext mContext = ctx.startTagAttributes(marshallIndex, marshallName);
        mContext.attribute(marshallIndex, SIZE_ATTRIBUTE_NAME, map.size()).closeStartContent();

        Iterator<Map.Entry<String, String>> iter = map.entrySet().iterator();
        while (iter.hasNext()) {
            Map.Entry<String, String> entry = iter.next();
            String key = entry.getKey().toString();
            String value = entry.getValue().toString();
            if (key == null || value == null)
View Full Code Here

                case SKIN:
                    portalConfig.setSkin(navigator.getContent());
                    current = navigator.sibling();
                    break;
                case PROPERTIES:
                    Properties properties = new Properties();
                    if (navigator.navigate(Axis.CHILD, Element.PROPERTIES_ENTRY)) {
                        for (StaxNavigator<Element> fork : navigator.fork(Element.PROPERTIES_ENTRY)) {
                            String key = getRequiredAttribute(fork, Attribute.PROPERTIES_KEY.getLocalName());
                            String value = getRequiredContent(fork, false);
                            properties.put(key, value);
                        }
                    } else {
                        throw expectedElement(navigator, Element.PROPERTIES_ENTRY);
                    }
                    portalConfig.setProperties(properties);
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.model.Properties

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.