Package org.gatein.api.site

Examples of org.gatein.api.site.SiteId


    @Managed("/dashboards/{user-name}")
    @ManagedRole("administrators")
    @ManagedOperation(name = OperationNames.UPDATE_RESOURCE, description = "Updates a given space")
    public ModelObject updateDashboard(@MappedPath("user-name") String userName, @ManagedContext ModelObject siteModel, @ManagedContext OperationContext context) {
        SiteId id = new SiteId(new User(userName));
        return _updateSite(id, siteModel, context);
    }
View Full Code Here


        return _updateSite(id, siteModel, context);
    }

    @Managed("/dashboards/{user-name}/pages")
    public PageManagementResource getDashboardPages(@MappedPath("user-name") String userName, @ManagedContext OperationContext context) {
        SiteId id = new SiteId(new User(userName));
        return pagesResource(id, context);
    }
View Full Code Here

        return pagesResource(id, context);
    }

    @Managed("/dashboards/{user-name}/navigation")
    public NavigationManagementResource getDashboardNavigation(@MappedPath("user-name") String userName, @ManagedContext OperationContext context) {
        SiteId id = new SiteId(new User(userName));
        return navigationResource(id, context);
    }
View Full Code Here

    private void setCurrentPortalRequest(OperationContext context) {
        final ManagedUser managedUser = context.getUser();
        final PathAddress address = context.getAddress();

        // 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();
View Full Code Here

    }

    private static SiteId getSiteId(PathAddress address) {
        String siteName = address.resolvePathTemplate("site-name");
        if (siteName != null) {
            return new SiteId(siteName);
        }

        String groupName = address.resolvePathTemplate("group-name");
        if (groupName != null) {
            return new SiteId(new Group(groupName));
        }

        String userName = address.resolvePathTemplate("user-name");
        if (userName != null) {
            return new SiteId(new User(userName));
        }

        return null;
    }
View Full Code Here

            String siteTypeString = nonNullString(nodeModel, "page", "siteType");
            SiteType siteType = SiteType.forName(siteTypeString);
            if (siteType == null) {
                throw invalidValue(siteTypeString, "page", "siteType");
            }
            return new PageId(new SiteId(siteType, siteName), pageName);
        } else {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of org.gatein.api.site.SiteId

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.