Package org.gatein.api.common

Examples of org.gatein.api.common.Attributes$Key


    validateQuery(query);
    validateSplitSize(numSplits);

    List<Query> splits = new ArrayList<Query>(numSplits);
    List<Key> scatterKeys = getScatterKeys(numSplits, query, datastore);
    Key lastKey = null;
    for (Key nextKey : getSplitKey(scatterKeys, numSplits)) {
      splits.add(createSplit(lastKey, nextKey, query));
      lastKey = nextKey;
    }
    splits.add(createSplit(lastKey, null, query));
View Full Code Here


    public SiteImpl(SiteId id, String templateName) {
        this.id = id;
        SiteKey siteKey = Util.from(id);
        this.portalConfig = new PortalConfig(siteKey.getTypeName(), siteKey.getName());
        this.attributes = new Attributes();
        this.create = true;
        this.templateName = templateName;
    }
View Full Code Here

        return properties;
    }

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

        Attributes attributes = new Attributes();
        for (Entry<String, String> e : properties.entrySet()) {
            String key = e.getKey();
            String value = e.getValue();
            if (key.equals(Site.AttributeKeys.SHOW_PORTLET_INFO_BAR.getName())) {
                if ("0".equals(value)) {
                    attributes.put(Site.AttributeKeys.SHOW_PORTLET_INFO_BAR, Boolean.FALSE);
                } else if ("1".equals(value)) {
                    attributes.put(Site.AttributeKeys.SHOW_PORTLET_INFO_BAR, Boolean.TRUE);
                } else {
                    attributes.put(key, value);
                }
            } else {
                attributes.put(key, value);
            }
        }
        return attributes;
    }
View Full Code Here

        return properties;
    }

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

        Attributes attributes = new Attributes();
        for (Entry<String, String> e : properties.entrySet()) {
            String key = e.getKey();
            String value = e.getValue();
            if (key.equals(Site.AttributeKeys.SHOW_PORTLET_INFO_BAR.getName())) {
                if ("0".equals(value)) {
                    attributes.put(Site.AttributeKeys.SHOW_PORTLET_INFO_BAR, Boolean.FALSE);
                } else if ("1".equals(value)) {
                    attributes.put(Site.AttributeKeys.SHOW_PORTLET_INFO_BAR, Boolean.TRUE);
                } else {
                    attributes.put(key, value);
                }
            } else {
                attributes.put(key, value);
            }
        }
        return attributes;
    }
View Full Code Here

        siteModel.set("skin", site.getSkin());
        populate("locale", site.getLocale(), siteModel);
        populate("access-permissions", site.getAccessPermission(), siteModel);
        populate("edit-permissions", site.getEditPermission(), siteModel);
        ModelList attrList = siteModel.get("attributes", ModelList.class);
        Attributes attributes = site.getAttributes();
        for (String key : attributes.keySet()) {
            ModelObject attr = attrList.add().setEmptyObject();
            attr.set("key", key);
            attr.set("value", attributes.get(key));
        }

        // Pages
        ModelReference pagesRef = siteModel.get("pages", ModelReference.class);
        pagesRef.set(address.append("pages"));
View Full Code Here

TOP

Related Classes of org.gatein.api.common.Attributes$Key

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.