Examples of UserRole


Examples of eja.ejb.entities.UserRole

public class RoleConverter implements Converter {


    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        UserRole role = new UserRole();
        role.setName(value);
       
        return role;
    }
View Full Code Here

Examples of eja.ejb.entities.UserRole

        return role;
    }

    @Override
    public String getAsString(FacesContext context, UIComponent component, Object value) {
        UserRole role = (UserRole) value;
        return role.getName().toString();
    }
View Full Code Here

Examples of models.entities.UserRole

                Logger.debug("Failed to get contact " + contactId + " from UserDto.");
            }
        }
        if (user.getRole() == null || !user.getRole().equals(role)) {
            try {
                UserRole role = DaoManager.getUserRoleDao().findByName(this.role);
                if (role != null) {
                    user.setRole(role);
                }
            } catch (DataAccessException e) {
                Logger.debug("Failed to get role from UserDto.");
View Full Code Here

Examples of net.sf.chellow.physical.UserRole

      } catch (UnknownHostException e) {
        throw new InternalException(e);
      }
      throw new UnauthorizedException();
    }
    UserRole role = user.getRole();
    String roleCode = role.getCode();
    if (roleCode.equals(UserRole.VIEWER)) {
      if (pathInfo.startsWith("/reports/")
          && pathInfo.endsWith("/output/")
          && (method.equals(HttpMethod.GET) || method
              .equals(HttpMethod.HEAD))) {
View Full Code Here

Examples of net.userSystem.userRole.domain.UserRole

  {
    String id=getRequest().getParameter("id");
    if(id!=null&&!"".equals(id)){
      userRole=userRoleService.getUserRoleById(id);
    }else{
      userRole=new UserRole();
    }
    return SUCCESS;
  }
View Full Code Here

Examples of no.ugland.utransprod.model.UserRole

                .lazyLoad(
                        login.getApplicationUser(),
                        new LazyLoadEnum[][] {{LazyLoadEnum.USER_ROLES,LazyLoadEnum.NONE}});
        Set<UserRole> roles = login.getApplicationUser().getUserRoles();
        UserType userType;
        UserRole userRole = null;

        if (roles != null) {
            if (roles.size() > 1) {
                userRole = (UserRole) JOptionPane.showInputDialog(null,
                        "Velg rolle", "Velg rolle",
                        JOptionPane.QUESTION_MESSAGE, null, roles.toArray(),
                        null);
            } else if (roles.size() == 1) {
                userRole = roles.iterator().next();
            }
        }
        if (userRole != null) {
            userType = userRole.getUserType();
            login.setUserType(userType);
            try {
                Class<?> windowClass = Class.forName(userType
                        .getStartupWindow());
                MainWindow mainWindow = (MainWindow)injector.getInstance(windowClass);
View Full Code Here

Examples of no.ugland.utransprod.model.UserRole

      userType.setDescription("Avvik");
      List<UserType> userTypes = userTypeManager.findByObject(userType);
      userType = userTypes.get(0);

      Set<UserRole> userRoles = new HashSet<UserRole>();
      UserRole userRole = new UserRole(null, userType, user);
      userRoles.add(userRole);
      user.setUserRoles(userRoles);

      applicationUserManager.saveObject(user);
    }
View Full Code Here

Examples of no.ugland.utransprod.model.UserRole

    UserType selectedUserType = (UserType) JOptionPane.showInputDialog(
        window.getComponent(), "Velg profil", "Legg til profil",
        JOptionPane.INFORMATION_MESSAGE, null, userTypes.toArray(),
        null);
    if (selectedUserType != null && presentationModel != null) {
      UserRole userRole = new UserRole(null, selectedUserType,
          ((ApplicationUserModel) presentationModel.getBean())
              .getObject());
      userRoleList.add(userRole);
      presentationModel.setBufferedValue(
          ApplicationUserModel.PROPERTY_USER_ROLE_LIST, userRoleList);
View Full Code Here

Examples of no.ugland.utransprod.model.UserRole

   * fjern brukertype
   *
   * @param presentationModel
   */
  void removeUserType(PresentationModel presentationModel) {
    UserRole userRole = (UserRole) userRoleSelectionList.getSelection();
    if (userRole != null) {
      userRoleList.remove(userRole);

      presentationModel.setBufferedValue(
          ApplicationUserModel.PROPERTY_USER_ROLE_LIST, userRoleList);
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.UserRole

       
        GrantedAuthority[] authorities =
            new GrantedAuthorityImpl[userData.getRoles().size()];
        int i = 0;
        for (Iterator it = userData.getRoles().iterator(); it.hasNext();) {
            UserRole role = (UserRole)it.next();
            authorities[i++] = new GrantedAuthorityImpl(role.getRole());
        }
       
        return new org.acegisecurity.userdetails.User(
            userData.getUserName(), userData.getPassword(), true, authorities);
    }
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.