Package wt.org
Class WTPrincipal
java.lang.Object
wt.fc._WTObject
wt.fc.WTObject
wt.fc._Item
wt.fc.Item
wt.org._WTPrincipal
wt.org.WTPrincipal
- All Implemented Interfaces:
Externalizable,Serializable,Principal,wt.access._AccessControlled,wt.access._PolicyAccessControlled,wt.access._SecurityLabeled,AccessControlled,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.recent.RecentlyVisited,wt.type._TypeManaged,wt.type.TypeManaged,wt.ufid._Federatable,wt.ufid.Federatable
- Direct Known Subclasses:
wt.org._WTGroup,wt.org._WTUser
@GenAsPersistable(superClass=Item.class,interfaces={wt.fc.BusinessInformation.class,wt.ufid.Federatable.class,java.security.Principal.class,wt.recent.RecentlyVisited.class,wt.type.TypeManaged.class},versions={1585326919551007717L,6390037358360073537L,1644197448890091130L,-969545486651487794L},properties={@GeneratedProperty(name="name",type=java.lang.String.class,javaDoc="Name of the principal (user, group, or organization). This is a required attribute.",accessors=@PropertyAccessors(setExceptions={UserNotFoundException.class,WTPropertyVetoException.class}),constraints=@PropertyConstraints(required=true)),@GeneratedProperty(name="disabled",type=boolean.class,initialValue="false",accessors=@PropertyAccessors(setExceptions={WTException.class,WTPropertyVetoException.class})),@GeneratedProperty(name="dn",type=java.lang.String.class,accessors=@PropertyAccessors(setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="repository",type=java.lang.String.class,accessors=@PropertyAccessors(setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="repairNeeded",type=boolean.class,initialValue="false",accessors=@PropertyAccessors(setExceptions={})),@GeneratedProperty(name="inflated",type=boolean.class,initialValue="false",accessors=@PropertyAccessors(getAccess=PROTECTED,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="additionalAttributes",type=java.util.HashMap.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false),javaDoc="The attribute holds a map of all additional attributes (not known previously to Windchill and its values."),@GeneratedProperty(name="attributes",type=wt.org.AttributeHolder.class,accessors=@PropertyAccessors(setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="internal",type=boolean.class,initialValue="false"),@GeneratedProperty(name="status",type=PrincipalStatus.class,javaDoc="The attribute holds the status of a principal object"),@GeneratedProperty(name="remoteDirectoryServerId",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),constraints=@PropertyConstraints(upperLimit=4000),javaDoc="The attribute holds the attribute value mapped to remoteDirectoryServerId ")})
public abstract class WTPrincipal
extends wt.org._WTPrincipal
Abstract class that represents a user or a group of users.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a clone and specifically sets the inflated flag set to TRUE so it won't auto-inflate subsequently when calling getters.booleanDetermines if the current principal is equal to the one passed as argument.getName()Gets the value of the attribute: NAME.Returns the organization associated to the principal, if the organization is found and the session user has access to the organization If the organization is not found it return null.final StringReturns a display-friendly name/identifier for the principal.Returns a unique, display-friendly identifier for the principal.Methods 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
-
getName
Gets the value of the attribute: NAME. Name of the principal (user, group, or organization). This is a required attribute.
Supported API: true -
equals
Determines if the current principal is equal to the one passed as argument. Two principals are considered equal if they have the same name.
Supported API: true -
getOrganization
Returns the organization associated to the principal, if the organization is found and the session user has access to the organization If the organization is not found it return null. If the organization is found, but the session user does not have access to the organization, this method throws an AccessControlException
Supported API: true- Returns:
- WTOrganization
- Throws:
WTException
-
cloneAsInflated
Creates a clone and specifically sets the inflated flag set to TRUE so it won't auto-inflate subsequently when calling getters.
Supported API: true- Returns:
- WTPrincipal - Cloned principal
- Throws:
WTException
-
getUniqueDisplayIdentifier
Returns a unique, display-friendly identifier for the principal. Labels and internal representations are localized using session locale.
The value returned is determined by the type of principal:- Pseudo-roles ALL or OWNER: These are internally handled as WTUser instances. See
WTUser.getUniqueDisplayIdentifier(wt.inf.container.WTContainer) - User: See
WTUser.getUniqueDisplayIdentifier(wt.inf.container.WTContainer) - Group - external/user-defined group or internal/system group: See
WTGroup.getUniqueDisplayIdentifier() - Organization: See
WTOrganization.getUniqueDisplayIdentifier() - Role Principal: See
WTRolePrincipal.getUniqueDisplayIdentifier()
If the session user does not have access to the principal, thewt.access.accessResource.SECURED_INFORMATIONmessage is returned instead.
Supported API: true- Returns:
- String - Unique display identifier generated based on the above specifications
- Throws:
WTException
- Pseudo-roles ALL or OWNER: These are internally handled as WTUser instances. See
-
getPrincipalDisplayIdentifier
Returns a display-friendly name/identifier for the principal. Labels and internal representations are localized using session locale.
While there are many attributes needed to make a principal uniquely identifiable, all those attributes are not included in the identifier returned by this API. If indeed a unique display identity is what is required, usegetUniqueDisplayIdentifier()
The name returned is determined by the type of principal:- Pseudo-roles ALL or OWNER: Returns the localized value corresponding to these names
For example: "All" or "Owner" - User: Returns the user's full name
- External/user-defined group: Returns the group's name. In the case of "ORG ADMIN" group, the localized value for "Organization Administrator" is returned
- Internal/System group: For role group, the localized name of the role is returned (for example "Team Members", "Guest", etc.). For internal organization group, the name of the organization is returned. For other system groups, the group's name is returned as-is
- Role Principal: Returns the localized name of the role principal. If this role principal is for an internal organization group, the name of the organization is returned instead.
- Organization: Returns the organization's name
- All other cases: Returns the principal's name
wt.access.accessResource.SECURED_INFORMATIONmessage is displayed in the place of organization's name.
Supported API: true- Returns:
- String - Unique display identifier generated based on the above specifications
- Throws:
WTException
- Pseudo-roles ALL or OWNER: Returns the localized value corresponding to these names
-