Package org.jboss.portal.identity

Examples of org.jboss.portal.identity.Role


                           Principal p = (Principal)en.nextElement();
                           String roleName = p.getName();
                           log.debug("$$Processing role principal object related to current user: " + roleName);
                           //check if such role is present

                           Role role = null;
                           try
                           {
                              role  = getRoleModule().findRoleByName(roleName);
                           }
                           catch (Exception e)
                           {
                              //
                           }

                           if (role == null)
                           {
                              try
                              {
                                 role = getRoleModule().createRole(roleName, roleName);
                              }
                              catch (Throwable e)
                              {
                                 log.warn("Error when trying to synchronize role: " + roleName, e);
                                 continue;
                              }
                           }

                           rolesToAssign.add(role);
                           userRoles.addMember(createIdentity(role.getName()));
                        }
                     }
                  }

                  if (defaultAssignedRole != null)
View Full Code Here


                        Principal p = (Principal)en.nextElement();
                        String roleName = p.getName();
                        log.debug("$$Processing role principal object related to current user: " + roleName);
                        //check if such role is present

                        Role role = null;
                        try
                        {
                           role  = getRoleModule().findRoleByName(roleName);
                        }
                        catch (Exception e)
View Full Code Here

      {
         return super.equals(obj);
      }


      Role r = (Role)obj;
      if (r.getId().toString().equals(getId().toString()))
      {
         return true;
      }
      return false;
   }
View Full Code Here

   {


      public int compare(Object o1, Object o2)
      {
         Role r1 = (Role)o1;
         Role r2 = (Role)o2;

         String name1 = r1.getName();
         String name2 = r2.getName();

         return name1.compareToIgnoreCase(name2);
      }
View Full Code Here

         {
            throw new IdentityException("Failed to close LDAP connection", e);
         }
      }

      Role resultRole =  findRoleByName(name);

      fireRoleCreatedEvent(resultRole.getId(), resultRole.getName());

      return resultRole;
   }
View Full Code Here

   }

   public Set findRoleMembers(String roleName, int offset, int limit, String userNameFilter) throws IdentityException
   {

      Role role = getRoleModule().findRoleByName(roleName);
      //if exception was thrown - propagate it, if not....
      if (role != null)
      {
         Set users = getUsers(role, userNameFilter);
View Full Code Here

   }

   public Set findRoleMembers(String roleName, int offset, int limit, String userNameFilter) throws IdentityException
   {
      //throw new UnsupportedOperationException("Not yet implemented");
      Role role = getRoleModule().findRoleByName(roleName);
      //if exception was thrown - propagate it, if not....
      if (role != null)
      {
         Set users = getUsers(role, userNameFilter);
View Full Code Here

      userIds.add(user.getId());

      for (Iterator iterator = roles.iterator(); iterator.hasNext();)
      {
         Role role = (Role)iterator.next();
         roleIds.add(role.getId());
      }

      fireMembershipChangedEvent(userIds, roleIds);
   }
View Full Code Here

TOP

Related Classes of org.jboss.portal.identity.Role

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.