wt.org
Class WTGroup

java.lang.Object
  extended by wt.fc.WTObject
      extended by wt.fc.Item
          extended by wt.org.WTPrincipal
              extended by wt.org.WTGroup
All Implemented Interfaces:
Externalizable, Serializable, Principal, AccessControlled, wt.access.AccessControlList, wt.access.AdHocControlled, wt.access.PolicyAccessControlled, wt.access.SecurityLabeled, wt.admin.DomainAdministered, wt.fc.BusinessInformation, NetFactor, ObjectMappable, Persistable, wt.federation.FederatedLinkHolder, wt.federation.RemotelyLinkable, DisplayIdentification, WTContained, wt.recent.RecentlyVisited, wt.ufid.Federatable
Direct Known Subclasses:
ProxyGroup, WTOrganization

public class WTGroup
extends WTPrincipal
implements wt.access.AdHocControlled, WTContained, Externalizable

Group of users.

Use the newWTGroup static factory method(s), not the WTGroup constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
 boolean addMember(WTPrincipal principal)
          Adds a member to the group.
 WTPrincipal[] addMembers(WTPrincipal[] principals)
          Add members to the group.
 String getBusinessType()
          

Supported API: true
protected  void initialize(String name)
          Supports initialization, following construction of an instance.
protected  void initialize(String name, DirectoryContextProvider context)
          Supports initialization, following construction of an instance.
protected  void initialize(String name, String dn, String service)
          Supports initialization, following construction of an instance.
 boolean isMember(WTPrincipal principal)
          Tells whether a principal belongs to a group: returns true if it belongs, false otherwise.
 Enumeration members()
          Returns all the members of the group.
static WTGroup newWTGroup(String name)
          Constructor: constructs a group given its name.
static WTGroup newWTGroup(String name, DirectoryContextProvider context)
          Constructor: constructs a group given its name and the organization with which it will be associated.
static WTGroup newWTGroup(String name, String dn, String service)
          Constructor: constructs a group given its name, dn, and Info*Engine service.
 Enumeration parentGroups()
          Returns the groups to which the group belongs.
 boolean removeMember(WTPrincipal principal)
          Removes a member from the group.
 void setDisabled(boolean disabled)
          

Supported API: true
 
Methods inherited from class wt.org.WTPrincipal
getPrincipalDisplayIdentifier
 
Methods inherited from class wt.fc.WTObject
getDisplayIdentifier, getDisplayIdentity, getDisplayType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newWTGroup

public static WTGroup newWTGroup(String name)
                          throws WTException
Constructor: constructs a group given its name.

Supported API: true

Parameters:
name -
Returns:
WTGroup
Throws:
WTException

initialize

protected void initialize(String name)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
name -
Throws:
WTException

newWTGroup

public static WTGroup newWTGroup(String name,
                                 String dn,
                                 String service)
                          throws WTException
Constructor: constructs a group given its name, dn, and Info*Engine service.

Supported API: true

Parameters:
name -
dn -
service -
Returns:
WTGroup
Throws:
WTException

initialize

protected void initialize(String name,
                          String dn,
                          String service)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
name -
dn -
service -
Throws:
WTException

newWTGroup

public static WTGroup newWTGroup(String name,
                                 DirectoryContextProvider context)
                          throws WTException
Constructor: constructs a group given its name and the organization with which it will be associated. The group will be stored in the same directory service as the organization, and it will be stored as an immediate child of the organization's LDAP entry.

Supported API: true

Parameters:
name -
context -
Returns:
WTGroup
Throws:
WTException

initialize

protected void initialize(String name,
                          DirectoryContextProvider context)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
name -
context -
Throws:
WTException

getBusinessType

public String getBusinessType()


Supported API: true

Returns:
String

setDisabled

public void setDisabled(boolean disabled)
                 throws WTException,
                        WTPropertyVetoException


Supported API: true

Parameters:
disabled -
Throws:
WTException
WTPropertyVetoException

addMember

public boolean addMember(WTPrincipal principal)
                  throws WTException
Adds a member to the group. Returns true if user is added; false if user already belongs to group.

Supported API: true

Parameters:
principal -
Returns:
boolean
Throws:
WTException

addMembers

public WTPrincipal[] addMembers(WTPrincipal[] principals)
                         throws WTException
Add members to the group. Returns an array containing the principals that were not already members of the group.

Supported API: true

Parameters:
principals -
Returns:
WTPrincipal[]
Throws:
WTException

removeMember

public boolean removeMember(WTPrincipal principal)
                     throws WTException
Removes a member from the group. Returns true if user is removed; false if user doesn't belong to group.

Supported API: true

Parameters:
principal -
Returns:
boolean
Throws:
WTException

isMember

public boolean isMember(WTPrincipal principal)
                 throws WTException
Tells whether a principal belongs to a group: returns true if it belongs, false otherwise.

Supported API: true

Parameters:
principal -
Returns:
boolean
Throws:
WTException

members

public Enumeration members()
                    throws WTException
Returns all the members of the group.

Supported API: true

Returns:
Enumeration
Throws:
WTException

parentGroups

public Enumeration parentGroups()
                         throws WTException
Returns the groups to which the group belongs. The result is a principal reference enumeration.

Supported API: true

Returns:
Enumeration
Throws:
WTException