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 Details

    • 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
      Overrides:
      initialize in class WTPrincipal
      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
      Specified by:
      getBusinessType in interface wt.fc.BusinessInformation
      Overrides:
      getBusinessType in class WTPrincipal
      Returns:
      String
    • setDisabled

      public void setDisabled(boolean disabled) throws WTException, WTPropertyVetoException


      Supported API: true
      Overrides:
      setDisabled in class WTPrincipal
      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 Enumeration returns all the nested groups and the members for this group.
      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 returns the parent groups
      Throws:
      WTException
    • parentGroups

      public Enumeration parentGroups(boolean flatten) throws WTException
      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

      public String getUniqueDisplayIdentifier() throws WTException
      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, the wt.access.accessResource.SECURED_INFORMATION message 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:
      getUniqueDisplayIdentifier in class WTPrincipal
      Returns:
      String - Unique display identifier generated based on the above specifications
      Throws:
      WTException