com.sun.identity.um
Class StaticGroup

java.lang.Object
  |
  +--com.sun.identity.um.Common
        |
        +--com.sun.identity.um.StaticGroup

public final class StaticGroup
extends Common

The AMStaticGroup class provides methods to manage static group


Method Summary
 void addUsers(java.util.Set users)
          Adds users to the static group.
 long getNumberOfUsers()
          Gets number of users in the group.
 java.util.Set getUserDNs()
          Gets the DNs of users in the group.
 boolean isSubscribable()
          Returns true if the group is subscribable.
 void removeUsers(java.util.Set users)
          Removes users from the static group.
 java.util.Set searchUsers(java.lang.String wildcard)
          Searches for users in this group using wildcards and attribute values.
 void setSubscribable(boolean subscribable)
          Sets subscribability of the group.
 
Methods inherited from class com.sun.identity.um.Common
assignServices, delete, delete, getAssignedServices, getAttributes, getAttributes, getDN, getOrganizationDN, getParentDN, getServiceAttributes, getServiceStatus, isExists, modifyService, removeAttributes, setAttributes, setServiceStatus, store, unassignServices
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNumberOfUsers

public long getNumberOfUsers()
                      throws UMException,
                             SSOException
Gets number of users in the group.
Returns:
Number of users in the group.
Throws:
UMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

getUserDNs

public java.util.Set getUserDNs()
                         throws UMException,
                                SSOException
Gets the DNs of users in the group.
Returns:
The names of users' DNs in the group.
Throws:
UMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

searchUsers

public java.util.Set searchUsers(java.lang.String wildcard)
                          throws UMException,
                                 SSOException
Searches for users in this group using wildcards and attribute values. Wildcards can be specified such as a*, *, *a.
Parameters:
wildcard - wildcard pattern to be used in the search
Returns:
Set of DNs of Users matching the search
Throws:
UMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

addUsers

public void addUsers(java.util.Set users)
              throws UMException,
                     SSOException
Adds users to the static group.
Parameters:
users - The set of user DN's to be added to the static group.
Throws:
UMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

removeUsers

public void removeUsers(java.util.Set users)
                 throws UMException,
                        SSOException
Removes users from the static group.
Parameters:
users - The set of user DN's to be removed from the static group.
Throws:
UMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

isSubscribable

public boolean isSubscribable()
                       throws UMException,
                              SSOException
Returns true if the group is subscribable.
Returns:
true if the group is subscribable.
Throws:
UMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid

setSubscribable

public void setSubscribable(boolean subscribable)
                     throws UMException,
                            SSOException
Sets subscribability of the group.
Parameters:
subscribable - true if the group is subscribable.
Throws:
UMException - if an error is encountered when trying to access/retrieve data from the data store
SSOException - if the sign on is no longer valid