Examples of RedirectMappings


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

        }
        return mappings;
    }

    public RedirectMappings build() {
        RedirectMappings redirectMappings = new RedirectMappings();

        if (unresolvedNode != null) {
            redirectMappings.setUnresolvedNode(RedirectMappings.UnknownNodeMapping.valueOf(unresolvedNode));
        }

        redirectMappings.setUseNodeNameMatching(useNodeNameMatching);
        redirectMappings.setMap(mappings);
        return redirectMappings;
    }
View Full Code Here

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

        if (navigator.getName() != Element.NODE_MAPPING) {
            throw unexpectedElement(navigator);
        }

        // Create mappings
        RedirectMappings mappings = new RedirectMappings();

        // boolean variables to indicate what we've parsed so far
        boolean unresolvedNodes = false;
        boolean nodeMap = false;

        // Start parsing
        Element element = navigator.child();
        while (element != null) {
            switch (element) {
                case USER_NODE_NAME_MATCHING:
                    if (unresolvedNodes || nodeMap) {
                        throw unexpectedElement(navigator);
                    }
                    mappings.setUseNodeNameMatching(parseRequiredContent(navigator, ValueType.BOOLEAN));
                    break;
                case UNRESOLVED_NODES:
                    unresolvedNodes = true;
                    if (nodeMap) {
                        throw unexpectedElement(navigator);
                    }
                    mappings.setUnresolvedNode(parseRequiredContent(navigator, UNKNOWN_NODE_MAPPING_VALUE_TYPE));
                    break;
                case NODE_MAP:
                    nodeMap = true;
                    mappings.getMappings().add(nodeMapXmlHandler.read(navigator.fork()));
                    break;
                case UNKNOWN:
                    throw unknownElement(navigator);
                default:
                    throw unexpectedElement(navigator);
View Full Code Here

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

        this.siteName = site;
        this.pr = new PortalRedirect();
        this.pr.setName(site + "_" + Long.toHexString(System.currentTimeMillis()));
        this.originalName = pr.getName();
        this.pr.setConditions(new ArrayList<RedirectCondition>());
        RedirectMappings rm = new RedirectMappings();
        rm.setMappings(new ArrayList<NodeMap>());
        this.originNodeNames = loadOriginNodes(site);
        this.redirectNodeNames = loadRedirectNodes();
        this.pr.setMappings(rm);
        this.mappings = pr.getMappings();
        isNewRedirect = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.