Package org.gatein.api.navigation

Examples of org.gatein.api.navigation.NodePath


     *
     * @see #setActive(boolean)
     * @return The current NavigationNodeBean active state.
     */
    public boolean isActive() {
        NodePath currentPath = PortalRequest.getInstance().getNodePath();
        NodePath nodePath = node.getNodePath();

        if (!active) {
            active = (nodePath != null) ? nodePath.equals(currentPath) : false;
        }

        return active;
    }
View Full Code Here


     *
     * @see #setActive(boolean)
     * @return The current NavigationNodeBean active state.
     */
    public boolean isActive() {
        NodePath currentPath = PortalRequest.getInstance().getNodePath();
        NodePath nodePath = node.getNodePath();

        if (!active) {
            active = (nodePath != null) ? nodePath.equals(currentPath) : false;
        }

        return active;
    }
View Full Code Here

        // Retrieve siteId from address (can be null)
        SiteId siteId = getSiteId(address);

        // Retrieve nodePath from address (can be null)
        NodePath nodePath = getNodePath(address);

        Locale locale = context.getLocale();
        // For some HTTP requests the locale is set to *, I guess to indicate a header 'Accept-Language: *' ?
        if (locale != null && locale.getLanguage().equals("*")) {
            locale = null;
View Full Code Here

    @Managed("{path: .*}")
    @ManagedRole("administrators")
    @ManagedOperation(name = OperationNames.ADD_RESOURCE, description = "Adds the navigation node")
    public ModelObject addNode(@MappedPath("path") String path, @ManagedContext PathAddress address) {
        NodePath nodePath = NodePath.fromString(path);
        Node parent = getNode(nodePath.parent(), true, Nodes.visitChildren());
        String name = nodePath.getLastSegment();

        if (parent.hasChild(name)) {
            throw alreadyExists("Cannot add node", navigation.getSiteId(), nodePath);
        }

View Full Code Here

TOP

Related Classes of org.gatein.api.navigation.NodePath

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.