Package org.exoplatform.portal.config.model

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


    public static PageNode copy(PageNode existingPageNode) {
        PageNode pageNode = new PageNode();

        if (existingPageNode.getLabels() != null) {
            pageNode.setLabels(new I18NString(existingPageNode.getLabels()));
        }
        pageNode.setIcon(existingPageNode.getIcon());
        pageNode.setName(existingPageNode.getName());
        if (existingPageNode.getStartPublicationDate() != null) {
            pageNode.setStartPublicationDate( (Date)existingPageNode.getStartPublicationDate().clone() );
View Full Code Here


        NodeState nodeState = node.getState();
        if (nodeState.getLabel() == null) {
            Map<Locale, Described.State> descriptions = service.getDescriptions(node.getId());
            if (descriptions != null && !descriptions.isEmpty()) {
                I18NString labels = new I18NString();
                for (Map.Entry<Locale, Described.State> entry : descriptions.entrySet()) {
                    labels.add(new LocalizedString(entry.getValue().getName(), entry.getKey()));
                }

                pageNode.setLabels(labels);
            }
        } else {
View Full Code Here

        }
    }

    private PageNode unmarshalNode(StaxNavigator<Element> navigator) throws StaxNavException {
        PageNode node = new PageNode();
        I18NString labels = new I18NString();
        ArrayList<PageNode> children = new ArrayList<PageNode>();

        Element current = navigator.child();
        while (current != null) {
            switch (navigator.getName()) {
                case URI: // For backwards compatibility
                    current = navigator.sibling();
                    break;
                case NAME:
                    node.setName(navigator.getContent());
                    current = navigator.sibling();
                    break;
                case LABEL:
                    labels.add(Utils.parseLocalizedString(navigator));
                    current = navigator.sibling();
                    break;
                case ICON:
                    node.setIcon(navigator.getContent());
                    current = navigator.sibling();
View Full Code Here

TOP

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

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.