Package org.gatein.api.security

Examples of org.gatein.api.security.User


    private PortalRequestImpl(PortalRequestContext context) {
        this.context = context;
        String userId = context.getRemoteUser();

        this.user = (userId == null) ? User.anonymous() : new User(userId);
        this.siteId = Util.from(context.getSiteKey());
        this.nodePath = NodePath.fromString(context.getNodePath());

        ExoContainer exoContainer = context.getApplication().getApplicationServiceContainer();
        this.portal = (Portal)exoContainer.getComponentInstanceOfType(Portal.class);
View Full Code Here


    private PortalRequestImpl(PortalRequestContext context) {
        this.context = context;
        String userId = context.getRemoteUser();

        this.user = (userId == null) ? User.anonymous() : new User(userId);
        this.siteId = Util.from(context.getSiteKey());
        this.nodePath = NodePath.fromString(context.getNodePath());

        ExoContainer exoContainer = context.getApplication().getApplicationServiceContainer();
        this.portal = (Portal)exoContainer.getComponentInstanceOfType(Portal.class);
View Full Code Here

            case PORTAL:
                return new PageId(siteKey.getName(), pageKey.getName());
            case GROUP:
                return new PageId(new Group(siteKey.getName()), pageKey.getName());
            case USER:
                return new PageId(new User(siteKey.getName()), pageKey.getName());
            default:
                throw new AssertionError();
        }
    }
View Full Code Here

            case PORTAL:
                return new SiteId(siteKey.getName());
            case GROUP:
                return new SiteId(new Group(siteKey.getName()));
            case USER:
                return new SiteId(new User(siteKey.getName()));
            default:
                throw new AssertionError();
        }
    }
View Full Code Here

            case PORTAL:
                return new PageId(siteKey.getName(), pageKey.getName());
            case GROUP:
                return new PageId(new Group(siteKey.getName()), pageKey.getName());
            case USER:
                return new PageId(new User(siteKey.getName()), pageKey.getName());
            default:
                throw new AssertionError();
        }
    }
View Full Code Here

            case PORTAL:
                return new SiteId(siteKey.getName());
            case GROUP:
                return new SiteId(new Group(siteKey.getName()));
            case USER:
                return new SiteId(new User(siteKey.getName()));
            default:
                throw new AssertionError();
        }
    }
View Full Code Here

        return _getSites(DASHBOARD_QUERY, address, emptySites, offset, limit);
    }

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

    @Managed("/dashboards/{user-name}")
    @ManagedRole("administrators")
    @ManagedOperation(name = OperationNames.ADD_RESOURCE, description = "Adds a given site")
    public ModelObject addDashboard(@MappedPath("user-name") String userName, @MappedAttribute("template") String template, @ManagedContext PathAddress address) {
        SiteId siteId = new SiteId(new User(userName));
        return _addSite(address, siteId, template);
    }
View Full Code Here

    @Managed("/dashboards/{user-name}")
    @ManagedRole("administrators")
    @ManagedOperation(name = OperationNames.REMOVE_RESOURCE, description = "Removes the given dashboard")
    public void removeDashboard(@MappedPath("user-name") String userName, @ManagedContext OperationContext context) {
        SiteId id = new SiteId(new User(userName));
        _removeSite(id, context);
    }
View Full Code Here

    @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

TOP

Related Classes of org.gatein.api.security.User

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.