Package org.gatein.management.api

Examples of org.gatein.management.api.ManagedUser


   public ManagedUser getUser()
   {
      final String user = externalContext.getRemoteUser();
      if (user != null)
      {
         return new ManagedUser()
         {
            @Override
            public String getUserName()
            {
               return user;
View Full Code Here


        return new User(managedUser.getUserName());
    }

    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();
        // 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;
        }

        User user = (managedUser == null || managedUser.getUserName() == null) ? User.anonymous() : new User(managedUser.getUserName());

        final PortalContainer container = PortalContainer.getInstance();
        final WebAppController controller = (WebAppController) container.getComponentInstanceOfType(WebAppController.class);
        URIResolver uriResolver = new URIResolver() {
            @Override
View Full Code Here

TOP

Related Classes of org.gatein.management.api.ManagedUser

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.