Package no.ugland.utransprod.model

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


      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

    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

   * 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

TOP

Related Classes of no.ugland.utransprod.model.UserRole

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.