Package wt.org
Class WTGroup
java.lang.Object
wt.fc._WTObject
wt.fc.WTObject
wt.fc._Item
wt.fc.Item
wt.org._WTPrincipal
wt.org.WTPrincipal
wt.org._WTGroup
wt.org.WTGroup
- All Implemented Interfaces:
Externalizable,Serializable,Principal,wt.access._AccessControlled,wt.access._AccessControlList,wt.access._AdHocControlled,wt.access._PolicyAccessControlled,wt.access._SecurityLabeled,AccessControlled,wt.access.AccessControlList,AdHocControlled,wt.access.PolicyAccessControlled,SecurityLabeled,wt.admin._DomainAdministered,DomainAdministered,wt.fc._NetFactor,wt.fc._ObjectMappable,wt.fc._Persistable,wt.fc.adminlock._AdministrativelyLockable,AdministrativelyLockable,wt.fc.BusinessInformation,NetFactor,ObjectMappable,Persistable,wt.federation._FederatedLinkHolder,wt.federation._RemotelyLinkable,wt.federation.FederatedLinkHolder,wt.federation.RemotelyLinkable,DisplayIdentification,wt.inf.container._WTContained,WTContained,wt.recent.RecentlyVisited,wt.type._ConstraintFilterable,wt.type._TypeManaged,wt.type.ConstraintFilterable,wt.type.TypeManaged,wt.ufid._Federatable,wt.ufid.Federatable
- Direct Known Subclasses:
wt.org._Profile,_ProxyGroup,wt.org._WTOrganization
@GenAsPersistable(superClass=WTPrincipal.class,interfaces={AdHocControlled.class,WTContained.class,wt.type.ConstraintFilterable.class},versions={8929811468740089592L,1254554970577068071L},properties={@GeneratedProperty(name="description",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE),constraints=@PropertyConstraints(upperLimit=4000)),@GeneratedProperty(name="replicate",type=boolean.class,initialValue="false")},iconProperties=@IconProperties(standardIcon="netmarkets/images/group.gif",openIcon="netmarkets/images/group.gif"))
public class WTGroup
extends wt.org._WTGroup
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:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMember(WTPrincipal principal) Adds a member to the group.addMembers(WTPrincipal[] principals) Add members to the group.
Supported API: trueReturns a unique, display-friendly identifier for the group.protected voidinitialize(String name) Supports initialization, following construction of an instance.protected voidinitialize(String name, String dn, String service) Supports initialization, following construction of an instance.protected voidinitialize(String name, DirectoryContextProvider context) Supports initialization, following construction of an instance.booleanisMember(WTPrincipal principal) Tells whether a principal belongs to a group: returns true if it belongs, false otherwise.members()Returns all the members of the group.static WTGroupnewWTGroup(String name) Constructor: constructs a group given its name.static WTGroupnewWTGroup(String name, String dn, String service) Constructor: constructs a group given its name, dn, and Info*Engine service.static WTGroupnewWTGroup(String name, DirectoryContextProvider context) Constructor: constructs a group given its name and the organization with which it will be associated.Returns the groups to which the group belongs.parentGroups(boolean flatten) Returns the groups to which the group belongs.booleanremoveMember(WTPrincipal principal) Removes a member from the group.voidsetDisabled(boolean disabled)
Supported API: trueMethods inherited from class wt.org.WTPrincipal
cloneAsInflated, getName, getOrganization, getPrincipalDisplayIdentifierMethods inherited from class wt.fc.WTObject
getDisplayIdentifier, getDisplayIdentity, getDisplayTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface wt.fc.Persistable
checkAttributes
-
Method Details
-
newWTGroup
Constructor: constructs a group given its name.
Supported API: true- Parameters:
name-- Returns:
- WTGroup
- Throws:
WTException
-
initialize
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Overrides:
initializein classWTPrincipal- Parameters:
name-- Throws:
WTException
-
newWTGroup
Constructor: constructs a group given its name, dn, and Info*Engine service.
Supported API: true- Parameters:
name-dn-service-- Returns:
- WTGroup
- Throws:
WTException
-
initialize
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
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
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
name-context-- Throws:
WTException
-
getBusinessType
Supported API: true- Specified by:
getBusinessTypein interfacewt.fc.BusinessInformation- Overrides:
getBusinessTypein classWTPrincipal- Returns:
- String
-
setDisabled
Supported API: true- Overrides:
setDisabledin classWTPrincipal- Parameters:
disabled-- Throws:
WTExceptionWTPropertyVetoException
-
addMember
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
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
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
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
Returns all the members of the group.
Supported API: true- Returns:
- Enumeration Enumeration returns all the nested groups and the members for this group.
- Throws:
WTException
-
parentGroups
Returns the groups to which the group belongs. The result is a principal reference enumeration.
Supported API: true- Returns:
- Enumeration returns the parent groups
- Throws:
WTException
-
parentGroups
Returns the groups to which the group belongs. The result is a principal reference enumeration.
Supported API: true- Parameters:
flatten- If false, only immediate parent groups will be returned If true, all nested groups for which principal is a member will be returned, e.g. the parent groups of principal's parent groups, and the parent groups of those groups, etc.,- Returns:
- Enumeration
- Throws:
WTException
-
getUniqueDisplayIdentifier
Returns a unique, display-friendly identifier for the group. Labels and internal representations are localized using session locale.
The unique identifier generated is made up of the attributes of the group, depending on the type of group it is:- External/user-defined group: Return value is of the form "Group name (Context name)" where Context name is
the name of the Site or organization context where the group is defined.
For example:
Designers (ACME)
Designers (Site)
Note, however, that for a group in the Site context, the unique display identifier is not truly unique. Multiple groups (in different directory services) can have the same name but different distinguished names. - Role group (internal/system group): Return value is of the form "Localized role name (Context name)" where
Context name is the name of the Site, or organization context, or Team, where the group is defined"
For example:
Change Admin I (Product - ACME_PRODUCT)
Product Creator (ACME) - Organization group (internal/system group representing the context team members from the organization): Returns the organization's name
- All other cases: Returns the group's name as-is
If the session user does not have access to the principal, thewt.access.accessResource.SECURED_INFORMATIONmessage is returned instead. The same message may be displayed in the place of organization name, within the returned identifier, if the session user does not have access to the organization.
Supported API: true- Overrides:
getUniqueDisplayIdentifierin classWTPrincipal- Returns:
- String - Unique display identifier generated based on the above specifications
- Throws:
WTException
- External/user-defined group: Return value is of the form "Group name (Context name)" where Context name is
the name of the Site or organization context where the group is defined.
-