wt.org
Class WTGroup

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.fc.Item
          extended bywt.org.WTPrincipal
              extended bywt.org.WTGroup
All Implemented Interfaces:
AccessControlled, AccessControlList, AdHocControlled, BusinessInformation, DisplayIdentification, DomainAdministered, Externalizable, Federatable, NetFactor, ObjectMappable, Persistable, Principal, RecentlyVisited, RemotelyLinkable, Serializable
Direct Known Subclasses:
ProxyGroup, WTOrganization

public class WTGroup
extends WTPrincipal
implements AdHocControlled, 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

Field Summary
private static String[] ATTRIBUTE_NAMES
           
private static String CLASSNAME
           
private static String[] DEFAULT_DIR_ATTRIBUTE_NAMES
           
private static String defaultAdapter
           
private  String description
           
static String DESCRIPTION
           
private static String[] DIR_ATTRIBUTE_KEYS
           
private  AclEntrySet entrySet
           
static long EXTERNALIZATION_VERSION_UID
           
private static String INTROSPECTION_RESOURCE
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static Hashtable serviceMaps
           
protected static long VERSION_50_UID
           
 
Fields inherited from class wt.org.WTPrincipal
ALL, DISABLED, DN, INFLATED, NAME, OWNER, REPAIR_NEEDED, REPOSITORY
 
Fields inherited from class wt.fc.Item
VERSION_40_UID, VERSION_51_UID
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.access.AdHocControlled
ENTRY_SET
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.fc.BusinessInformation
BUSINESS_TYPE, IDENTITY
 
Fields inherited from interface wt.ufid.Federatable
FEDERATABLE_INFO
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
WTGroup()
           
 
Method Summary
private  void _inflate()
           
 boolean addMember(WTPrincipal principal)
          Adds a member to the group.
 WTPrincipal[] addMembers(WTPrincipal[] principals)
          Add members to the group.
protected  void copyAttributes(WTPrincipal target)
          

Supported API: false
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 HashMap getAttributeMap(String service)
          

Supported API: false
 String getBusinessType()
          

Supported API: true
 String getConceptualClassname()
          Deprecated.  
 String getDescription()
          

Supported API: false
 String getDn()
          Gets the value of the attribute: DN.
 AclEntrySet getEntrySet()
          Gets the value of the attribute: ENTRY_SET.
 HashMap getFieldValueMap()
          

Supported API: false
 String getRepository()
          Gets the value of the attribute: REPOSITORY.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
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.
 void mapAttributes(HashMap attributes)
          

Supported API: false
 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.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(WTGroup thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 boolean removeMember(WTPrincipal principal)
          Removes a member from the group.
 void setDescription(String description)
          

Supported API: false
 void setDisabled(boolean disabled)
          

Supported API: true
 void setDn(String dn)
          Sets the value of the attribute: DN.
 void setEntrySet(AclEntrySet a_EntrySet)
          Sets the value of the attribute: ENTRY_SET.
 void setRepository(String repository)
          Sets the value of the attribute: REPOSITORY.
 String toString()
          If the object has been persisted, return it's ObjectIdentifier.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.org.WTPrincipal
_mangleName, _setDisabled, _unmangleName, getDn, getFederatableInfo, getIdentificationObject, getIdentity, getName, getOrganization, getRepository, inflate, initialize, isDefaultDomain, isDisabled, isInflated, isRepairNeeded, readVersion, setDn, setFederatableInfo, setInflated, setName, setRepairNeeded, setRepository
 
Methods inherited from class wt.fc.Item
getDomainRef, isInheritedDomain, readVersion, setDomainRef, setInheritedDomain
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

description

private String description

entrySet

private AclEntrySet entrySet

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

INTROSPECTION_RESOURCE

private static final String INTROSPECTION_RESOURCE
See Also:
Constant Field Values

VERSION_50_UID

protected static final long VERSION_50_UID
See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

ATTRIBUTE_NAMES

private static final String[] ATTRIBUTE_NAMES

DIR_ATTRIBUTE_KEYS

private static final String[] DIR_ATTRIBUTE_KEYS

DEFAULT_DIR_ATTRIBUTE_NAMES

private static final String[] DEFAULT_DIR_ATTRIBUTE_NAMES

defaultAdapter

private static String defaultAdapter

serviceMaps

private static Hashtable serviceMaps
Constructor Detail

WTGroup

public WTGroup()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class WTPrincipal
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class WTPrincipal
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WTGroup thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class WTPrincipal
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class WTPrincipal
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

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 BusinessInformation
Overrides:
getBusinessType in class WTPrincipal
Returns:
String

getDescription

public String getDescription()
                      throws WTException


Supported API: false

Returns:
String
Throws:
WTException

setDescription

public void setDescription(String description)
                    throws WTException,
                           WTPropertyVetoException


Supported API: false

Parameters:
description -
Throws:
WTException
WTPropertyVetoException

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
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

getAttributeMap

public HashMap getAttributeMap(String service)
                        throws WTException


Supported API: false

Specified by:
getAttributeMap in class WTPrincipal
Parameters:
service -
Returns:
HashMap
Throws:
WTException

getFieldValueMap

public HashMap getFieldValueMap()
                         throws WTException


Supported API: false

Specified by:
getFieldValueMap in class WTPrincipal
Returns:
HashMap
Throws:
WTException

mapAttributes

public void mapAttributes(HashMap attributes)
                   throws WTException,
                          WTPropertyVetoException


Supported API: false

Specified by:
mapAttributes in class WTPrincipal
Parameters:
attributes -
Throws:
WTException
WTPropertyVetoException

copyAttributes

protected void copyAttributes(WTPrincipal target)
                       throws WTException,
                              WTPropertyVetoException


Supported API: false

Specified by:
copyAttributes in class WTPrincipal
Parameters:
target -
Throws:
WTException
WTPropertyVetoException

getEntrySet

public AclEntrySet getEntrySet()
Gets the value of the attribute: ENTRY_SET.

Supported API: false

Specified by:
getEntrySet in interface AdHocControlled
Returns:
AclEntrySet

setEntrySet

public void setEntrySet(AclEntrySet a_EntrySet)
Sets the value of the attribute: ENTRY_SET.

Supported API: false

Specified by:
setEntrySet in interface AdHocControlled
Parameters:
a_EntrySet -

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Specified by:
equals in interface Principal
Overrides:
equals in class WTPrincipal
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class WTPrincipal
Returns:
int

toString

public String toString()
Description copied from class: WTObject
If the object has been persisted, return it's ObjectIdentifier. If it has not yet been persisted, simply return it's conceptual (modeled) name.

Specified by:
toString in interface Principal
Overrides:
toString in class WTObject
Returns:
String

getDn

public String getDn()
Description copied from class: WTPrincipal
Gets the value of the attribute: DN.

Supported API: false

Overrides:
getDn in class WTPrincipal
Returns:
String

setDn

public void setDn(String dn)
Description copied from class: WTPrincipal
Sets the value of the attribute: DN.

Supported API: false

Overrides:
setDn in class WTPrincipal
Parameters:
dn -

getRepository

public String getRepository()
Description copied from class: WTPrincipal
Gets the value of the attribute: REPOSITORY.

Supported API: false

Overrides:
getRepository in class WTPrincipal
Returns:
String

setRepository

public void setRepository(String repository)
Description copied from class: WTPrincipal
Sets the value of the attribute: REPOSITORY.

Supported API: false

Overrides:
setRepository in class WTPrincipal
Parameters:
repository -

_inflate

private void _inflate()