Package org.exoplatform.portal.config.model

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


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


     * @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

    public static Properties from(Attributes attributes) {
        if (attributes == null) {
            return null;
        }
        Properties properties = new Properties(attributes);
        Object showInfoBarKey = Site.AttributeKeys.SHOW_PORTLET_INFO_BAR.getName();
        String showInfoBar = properties.get(showInfoBarKey);
        if (showInfoBar == null) {
            if (properties.containsKey(showInfoBarKey)) {
                properties.remove(showInfoBarKey);
            }
        } else {
            properties.put(showInfoBar, Boolean.parseBoolean(showInfoBar) ? "1" : "0");
        }
        return properties;
    }
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

    public static Properties from(Attributes attributes) {
        if (attributes == null) {
            return null;
        }

        Properties properties = new Properties();
        properties.putAll(attributes);

        for (String key : properties.keySet()) {
            if (key.equals(Site.AttributeKeys.SHOW_PORTLET_INFO_BAR.getName())) {
                String value = properties.get(key);
                boolean show = Boolean.parseBoolean(value);
                if (show) {
                    properties.put(key, "1");
                } else {
                    properties.put(key, "0");
                }
            }
        }
        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();
            if (key == null || value == null)
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

                case SKIN:
                    portalConfig.setSkin(navigator.getContent());
                    current = navigator.sibling();
                    break;
                case PROPERTIES:
                    Properties properties = Utils.unmarshalProperties(navigator);
                    portalConfig.setProperties(properties);
                    current = navigator.next();
                    break;
                case ACCESS_PERMISSIONS:
                    portalConfig.setAccessPermissions(unmarshalAccessPermissions(navigator, false));
View Full Code Here

            pConfig = obj.getObject();
        }

        if (template != null && template.length() > 0) {
            if (pConfig.getProperties() == null) {
                pConfig.setProperties(new Properties());
            }
            pConfig.setProperty("template", template);
        }

        ImportMode importMode = getRightMode(config.getImportMode());
View Full Code Here

        if (existingPageNode.getEndPublicationDate() != null) {
            pageNode.setEndPublicationDate( (Date)existingPageNode.getEndPublicationDate().clone() );
        }
        pageNode.setVisibility(existingPageNode.getVisibility());
        pageNode.setPageReference(existingPageNode.getPageReference());
        pageNode.setProperties(new Properties(existingPageNode.getProperties()));
        for (PageNode existingChild : existingPageNode.getNodes()) {
            PageNode child = copy(existingChild);
            pageNode.getNodes().add(child);
        }
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.