Package org.exoplatform.services.security

Examples of org.exoplatform.services.security.ConversationState


            uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.fail.update.user", null, ApplicationMessage.ERROR));
            return false;
        }
        enableChangePassword(false);

        ConversationState state = ConversationState.getCurrent();
        if (username.equals(((User) state.getAttribute(CacheUserProfileFilter.USER_PROFILE)).getUserName())) {
            state.setAttribute(CacheUserProfileFilter.USER_PROFILE, user);
        }
        return true;
    }
View Full Code Here


    public UIUserInfoPortlet() throws Exception {
    }

    public User getUser() {
        ConversationState state = ConversationState.getCurrent();
        return (User) state.getAttribute(CacheUserProfileFilter.USER_PROFILE);
    }
View Full Code Here

         user.setEmail(newEmail);
         uiApp.addMessage(new ApplicationMessage("UIAccountProfiles.msg.update.success", null));
         service.getUserHandler().saveUser(user, true);

         UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
         ConversationState state = ConversationState.getCurrent();
         if (userName.equals(((User)state.getAttribute(CacheUserProfileFilter.USER_PROFILE)).getUserName()))
         {
            state.setAttribute(CacheUserProfileFilter.USER_PROFILE, user);
            uiWorkingWS.updatePortletsByName("UserInfoPortlet");
         }
         uiWorkingWS.updatePortletsByName("OrganizationPortlet");
      }
View Full Code Here

         return false;
      }
      service.getUserHandler().saveUser(user, true);
      enableChangePassword(false);
     
      ConversationState state = ConversationState.getCurrent();
      if (username.equals(((User)state.getAttribute(CacheUserProfileFilter.USER_PROFILE)).getUserName()))
      {
         state.setAttribute(CacheUserProfileFilter.USER_PROFILE, user);
      }
      return true;
   }
View Full Code Here

      {
         return OrganizationUtils.getGroupLabel(navigation.getOwnerId());
      }
      else if (navigation.getOwnerType().equals(PortalConfig.USER_TYPE))
      {
         ConversationState state = ConversationState.getCurrent();
         User user = (User)state.getAttribute(CacheUserProfileFilter.USER_PROFILE);
         return user.getFullName();
      }
      return "";
   }
View Full Code Here

      super.setUp();

      sesProv =
         (ThreadLocalSessionProviderService)container
            .getComponentInstanceOfType(ThreadLocalSessionProviderService.class);
      sesProv.setSessionProvider(null, new SessionProvider(new ConversationState(new Identity("root"))));
      binder = (ResourceBinder)container.getComponentInstanceOfType(ResourceBinder.class);
      resourceNumber = binder.getSize();
      RequestHandler handler = (RequestHandler)container.getComponentInstanceOfType(RequestHandler.class);

      testRoot = root.addNode("testRoot", "nt:unstructured");
View Full Code Here

      handler = (RequestHandler)container.getComponentInstanceOfType(RequestHandler.class);

      SessionProviderService sessionProviderService =
         (SessionProviderService)container.getComponentInstanceOfType(ThreadLocalSessionProviderService.class);
      assertNotNull(sessionProviderService);
      sessionProviderService.setSessionProvider(null, new SessionProvider(new ConversationState(new Identity("root"))));
   }
View Full Code Here

      handler = (RequestHandler) container.getComponentInstanceOfType(RequestHandler.class);

      SessionProviderService sessionProviderService =
               (SessionProviderService) container.getComponentInstanceOfType(ThreadLocalSessionProviderService.class);
      assertNotNull(sessionProviderService);
      sessionProviderService.setSessionProvider(null, new SessionProvider(new ConversationState(new Identity("root"))));
   }
View Full Code Here

      initRepository();
      SessionProviderService sessionProviderService =
         (SessionProviderService)container.getComponentInstanceOfType(ThreadLocalSessionProviderService.class);
      assertNotNull(sessionProviderService);
      sessionProviderService
         .setSessionProvider(null, new SessionProvider(new ConversationState(new Identity("admin"))));
      WebDavServiceImpl webDavServiceImpl =
         (WebDavServiceImpl)container.getComponentInstanceOfType(WebDavServiceImpl.class);
      assertNotNull(webDavServiceImpl);
      resourceBinder = (ResourceBinder)container.getComponentInstanceOfType(ResourceBinder.class);
      assertNotNull(resourceBinder);
View Full Code Here

      // login via Authenticator
      Authenticator authr = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
      String validUser =
         authr.validateUser(new Credential[]{new UsernameCredential("root"), new PasswordCredential("exo")});
      Identity id = authr.createIdentity(validUser);
      ConversationState s = new ConversationState(id);
      ConversationState.setCurrent(s);

      ctx = new BasicAppContext(repService.getDefaultRepository());

      // System.out.println("CTX "+ctx);
View Full Code Here

TOP

Related Classes of org.exoplatform.services.security.ConversationState

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.