Examples of CurrentUser


Examples of com.ursu.client.model.CurrentUser

  @Override
  public LoginResult execute(Login action, ExecutionContext context)
      throws ActionException {
    UserDao dao = new UserDao();
    CurrentUser result = null;
    HttpSession session = requestProvider.get().getSession();
   
      result = dao.loginUser(action.getUsername(), action.getPassword());
      if(result != null)
      {
View Full Code Here

Examples of net.tralfamadore.admin.util.CurrentUser


    @Test
    public void testLocalCurrentUserInfo() {
        final String userName = "testUser";
        final CurrentUser currentUser = new CurrentUser();
        currentUser.setUser(userName);

        new NonStrictExpectations() {{
            FacesContext.getCurrentInstance(); result = facesContext;
            facesContext.getApplication(); result = application;
            facesContext.getELContext(); result = elContext;
View Full Code Here

Examples of net.tralfamadore.admin.util.CurrentUser

    @Override
    public String getCurrentUser() {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ELResolver elResolver = FacesContext.getCurrentInstance().getApplication().getELResolver();
        Object o = elResolver.getValue(facesContext.getELContext(), null, "currentUser");
        CurrentUser user = (CurrentUser) o;

//        facesContext.getExternalContext().getSessionMap().get("cmfCurrentUser");

        return user == null ? null : user.getUser();
    }
View Full Code Here

Examples of org.apache.deltaspike.data.api.audit.CurrentUser

        }
    }

    private Object resolvePrincipal(Object entity, Property<Object> property)
    {
        CurrentUser principal = AnnotationInstanceProvider.of(CurrentUser.class);
        Class<?> propertyClass = property.getJavaClass();
        Set<Bean<?>> beans = manager.getBeans(propertyClass, principal);
        if (!beans.isEmpty() && beans.size() == 1)
        {
            Bean<?> bean = beans.iterator().next();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.