Class STSUniversalUser
- java.lang.Object
- 
- com.tivoli.am.fim.trustserver.sts.STSUniversalUser
 
- 
 public class STSUniversalUser extends java.lang.ObjectJava representation of STSUniversalUser schema.- Version:
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringSTSUniversalUser_java_copyrightstatic java.lang.StringSTSUniversalUser_java_sourceCodeID
 - 
Constructor SummaryConstructors Constructor Description STSUniversalUser()Constructs an empty STSUniversalUser.STSUniversalUser(org.w3c.dom.Node node)Constructs a STSUniversalUser containing the data specified in the givenorg.w3c.dom.Node.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(Attribute attr)Adds the given Attribute to the list of attributes.voidaddAttributeStatement(AttributeStatement attrstmt)Adds the given AttributeStatement to the list of AttributeStatements.voidaddContextAttribute(Attribute attr)Adds the given Attribute to the list of ContextAttributesvoidaddGroup(Group group)Adds the given group.voidaddPrincipalAttribute(Attribute attr)Add a principalAttribute to this STSUniversalUser.voidclear()This method when called will reset and clear all data in the STSUniversalUser.voidclearAttributeList()This method when called will reset and clear all data in the AttributeListvoidclearAttributeStatements()This method when called will reset and clear all data in the AttributeStatementsvoidclearContextAttributes()This method when called will reset and clear all data in the ContextAttributesvoidclearGroupList()This method when called will reset and clear all data in the GroupListvoidclearPrincipal()This method when called will reset and clear all data in the PrincipalvoidclearRequestSecurityToken()This method when called will reset and clear all data in the RequestSecurityTokenvoidcopy(STSUniversalUser stsuu)Performs a shallow copy (by reference) of the given STSUniversalUser object's membersvoidfromXML(java.lang.String xmlString)Populates an STSUniversalUser from XML (in the form of an org.w3c.dom.Node).voidfromXML(org.w3c.dom.Document doc)Populates the STSUniversalUser from XML (in the form of an org.w3c.dom.Document).voidfromXML(org.w3c.dom.Element element)Builds the STSUniversalUser based on the given org.w3c.dom.Node.voidfromXML(org.w3c.dom.Node node)Populates an STSUniversalUser from XML (in the form of an org.w3c.dom.Node).AttributeContainergetAttributeContainer()Return the AttributeContainer associated with this STSUniversalUser.java.util.IteratorgetAttributes()Returns anIteratorthat references all the Attributes in the AttributeList.java.util.IteratorgetAttributeStatements()Returns anIteratorthat references all the AtributStatementsjava.lang.StringgetAttributeValueByName(java.lang.String name)Returns an Attribute value of this STSUniversalUser based on the name provided.ContextAttributesgetContextAttributes()Retrieve the Context atrributes containerAttributeContainergetContextAttributesAttributeContainer()Returns the ContextAttributes AttributeContainer of this STSUniversalUser.java.util.IteratorgetGroups()Returns anIteratorthat references all the Groups in the GroupList.intgetNumberOfAttributes()Returns the number of Attributes in the AttributeListintgetNumberOfGroups()Returns the number of groups in the GroupList.AttributeContainergetPrincipalAttributeContainer()Return the PrincipalAttributeContainer associated with this STSUniversalUser.java.util.IteratorgetPrincipalAttributes()Returns anIteratorthat references all the Principal Attributes in the Principal.java.lang.StringgetPrincipalAttributeValueByName(java.lang.String name)Returns a Principal Attribute value of this STSUniversalUser based on the name provided.java.lang.StringgetPrincipalDomain()This is a convenience method for retrieving the first Principal attribute value that has the name="domain".java.lang.StringgetPrincipalName()This is a convenience method for retrieving the first Principal attribute value that has the name="name".java.lang.StringgetPrincipalRegistryID()This is a convenience method for retrieving the first Principal attribute value that has the name="registryid".java.lang.StringgetPrincipalUUID()This is a convenience method for retrieving the first Principal attribute value that has the name="uuid".RequestSecurityTokengetRequestSecurityToken()Return the RequestSecurityToken associated with this STSUniversalUser.java.lang.StringgetRequestSecurityTokenAttributeByName(java.lang.String name)Returns a RequestSecurityTokenAttribute based on the name provided.AttributeContainergetRequestSecurityTokenAttributeContainer()Return the RequestSecurityTokenAttributeContainer associated with this STSUniversalUser.java.util.IteratorgetRequestSecurityTokenAttributes()Returns an Iterator that references all the attributes of the RequestSecurityToken elementstatic java.lang.StringmaskSTSUUString(java.lang.String clearText)Masks hidden data in a String that contains STSUU elements.intremoveAttribute(java.lang.String name, java.lang.String type)Remove the attributes that match the given name and type, to match a attribute with no type pass null as the type. if * is passed for both name and type ALL attributes are removed.intremoveGroup(java.lang.String name, java.lang.String type)Remove the groups that match the given name and type, to match a group with no type pass null as the type. if * is passed for both name and type ALL groups are removed.intremovePrincipalAttribute(java.lang.String name, java.lang.String type)Remove the attributes that match the given name and type, to match a attribute with no type pass null as the type. if * is passed for both name and type ALL attributes are removed.voidsetContextAttributes(ContextAttributes attributes)Sets the ContextAttributesvoidsetPrincipalDomain(java.lang.String principalDomain)This is a convenience method for creating a Principal attribute with the name="domain" type=null and value=principalDomain.voidsetPrincipalName(java.lang.String principalName)This is a convenience method for updating a Principal attribute with the name="name" type=and value=principalName. voidsetPrincipalRegistryID(java.lang.String principalID)This is a convenience method for creating a Principal attribute with the name="registryid" type=null and value=principalID.voidsetPrincipalUUID(java.lang.String principalUUID)This is a convenience method for creating a Principal attribute with the name="uuid" type=null and value=principalUUID.java.lang.StringtoClearTextString()Produces the same string as toString except any password attribute will be in the clearjava.lang.StringtoString()Returns a String representation of this STSUniversalUser object.org.w3c.dom.DocumenttoXML()Returns this STSUniversalUser as XML in the form of an org.w3c.dom.Document object.
 
- 
- 
- 
Field Detail- 
STSUniversalUser_java_sourceCodeIDpublic static final java.lang.String STSUniversalUser_java_sourceCodeID - See Also:
- Constant Field Values
 
 - 
STSUniversalUser_java_copyrightpublic static final java.lang.String STSUniversalUser_java_copyright 
 
- 
 - 
Constructor Detail- 
STSUniversalUserpublic STSUniversalUser(org.w3c.dom.Node node) throws STSRuntimeExceptionConstructs a STSUniversalUser containing the data specified in the givenorg.w3c.dom.Node.- Parameters:
- node- a STSUniversalUser represented in XML following the STSUniversalUser's XML schema.
- Throws:
- STSRuntimeException
 
 - 
STSUniversalUserpublic STSUniversalUser() Constructs an empty STSUniversalUser.- Throws:
- STSRuntimeException
 
 
- 
 - 
Method Detail- 
fromXMLpublic void fromXML(org.w3c.dom.Node node) Populates an STSUniversalUser from XML (in the form of an org.w3c.dom.Node).- Parameters:
- node- the Node to populate this STSUniversalUser from. If node is null, nothing will be done to this object.
 
 - 
fromXMLpublic void fromXML(java.lang.String xmlString) Populates an STSUniversalUser from XML (in the form of an org.w3c.dom.Node).- Parameters:
- xmlString- the String to populate this STSUniversalUser from. If String is null, nothing will be done to this object.
 
 - 
fromXMLpublic void fromXML(org.w3c.dom.Document doc) Populates the STSUniversalUser from XML (in the form of an org.w3c.dom.Document).- Parameters:
- doc- the Document to populate this STSUniversalUser from. If Document is null, nothing will be done to this object.
 
 - 
fromXMLpublic void fromXML(org.w3c.dom.Element element) Builds the STSUniversalUser based on the given org.w3c.dom.Node.- Parameters:
- element- a STSUniversalUser represented in XML following the STSUniversalUser's XML schema.
 
 - 
copypublic void copy(STSUniversalUser stsuu) Performs a shallow copy (by reference) of the given STSUniversalUser object's members- Parameters:
- stsuu- the STSUniversalUser to copy from.
 
 - 
getPrincipalNamepublic java.lang.String getPrincipalName() This is a convenience method for retrieving the first Principal attribute value that has the name="name".- Returns:
- the principal name as a String object.
 
 - 
getPrincipalRegistryIDpublic java.lang.String getPrincipalRegistryID() This is a convenience method for retrieving the first Principal attribute value that has the name="registryid".- Returns:
- the first principal attribute value with the name 'registryid' as a String object.
 
 - 
getPrincipalUUIDpublic java.lang.String getPrincipalUUID() This is a convenience method for retrieving the first Principal attribute value that has the name="uuid".- Returns:
- the first principal attribute value with the name 'uid' as a String object.
 
 - 
getPrincipalDomainpublic java.lang.String getPrincipalDomain() This is a convenience method for retrieving the first Principal attribute value that has the name="domain".- Returns:
- the first principal attribute value with the name 'domain' as a String object.
 
 - 
setPrincipalNamepublic void setPrincipalName(java.lang.String principalName) This is a convenience method for updating a Principal attribute with the name="name" type=and value=principalName. It will create a new Principal attribute if it does not already exist with name="name" type=null and value=principalName. - Parameters:
- principalName- the principal name as a String.
 
 - 
setPrincipalRegistryIDpublic void setPrincipalRegistryID(java.lang.String principalID) This is a convenience method for creating a Principal attribute with the name="registryid" type=null and value=principalID. All other Principal attributes matching name="registryid" and type=null are removed before creating the new attribute.- Parameters:
- principalID- the principalDN as a String.
 
 - 
setPrincipalUUIDpublic void setPrincipalUUID(java.lang.String principalUUID) throws STSRuntimeExceptionThis is a convenience method for creating a Principal attribute with the name="uuid" type=null and value=principalUUID. All other Principal attributes matching name="uuid" and type=null are removed before creating the new attribute.- Parameters:
- principalUUID- the principalUUID as a String
- Throws:
- STSRuntimeException
 
 - 
setPrincipalDomainpublic void setPrincipalDomain(java.lang.String principalDomain) throws STSRuntimeExceptionThis is a convenience method for creating a Principal attribute with the name="domain" type=null and value=principalDomain. All other Principal attributes matching name="domain" and type=null are removed before creating the new attribute.- Parameters:
- principalDomain- the principalDomain as a String.
- Throws:
- STSRuntimeException
 
 - 
getNumberOfGroupspublic int getNumberOfGroups() Returns the number of groups in the GroupList.- Returns:
- int number of groups.
 
 - 
addGrouppublic void addGroup(Group group) Adds the given group. The name of the group must not be null, if null the group entry is not added.- Parameters:
- group- the Group to be added.
 
 - 
getAttributespublic java.util.Iterator getAttributes() Returns anIteratorthat references all the Attributes in the AttributeList.- Returns:
- Iterator
 
 - 
getPrincipalAttributespublic java.util.Iterator getPrincipalAttributes() Returns anIteratorthat references all the Principal Attributes in the Principal.- Returns:
- Iterator
 
 - 
getAttributeStatementspublic java.util.Iterator getAttributeStatements() Returns anIteratorthat references all the AtributStatements- Returns:
- Iterator
 
 - 
getRequestSecurityTokenAttributespublic java.util.Iterator getRequestSecurityTokenAttributes() Returns an Iterator that references all the attributes of the RequestSecurityToken element- Returns:
- an Iterator that references all the attributes of the RequestSecurityToken element
 
 - 
getPrincipalAttributeContainerpublic AttributeContainer getPrincipalAttributeContainer() Return the PrincipalAttributeContainer associated with this STSUniversalUser.- Returns:
- the PrincipalAttributeContainer associated with this STSUniversalUser. If the PrincipalAttributeContainer is null, an empty AttributeContainer is returned.
 
 - 
getAttributeContainerpublic AttributeContainer getAttributeContainer() Return the AttributeContainer associated with this STSUniversalUser.- Returns:
- the AttributeContainer associated with this STSUniversalUser. If the AttributeContainer is null, an empty AttributeContainer is returned.
 
 - 
getRequestSecurityTokenpublic RequestSecurityToken getRequestSecurityToken() Return the RequestSecurityToken associated with this STSUniversalUser.- Returns:
- the RequestSecurityToken associated with this STSUniversalUser. If the RequestSecurityToken is null, an empty RequestSecurityToken is returned.
 
 - 
getRequestSecurityTokenAttributeContainerpublic AttributeContainer getRequestSecurityTokenAttributeContainer() Return the RequestSecurityTokenAttributeContainer associated with this STSUniversalUser.- Returns:
- the RequestSecurityTokenAttributeContainer associated with this STSUniversalUser.
 
 - 
getAttributeValueByNamepublic java.lang.String getAttributeValueByName(java.lang.String name) Returns an Attribute value of this STSUniversalUser based on the name provided.- Parameters:
- name- a String representing the name of the Attribute.
- Returns:
- the first Attribute value of the named Attribute or null if there is no named Attribute.
 
 - 
getPrincipalAttributeValueByNamepublic java.lang.String getPrincipalAttributeValueByName(java.lang.String name) Returns a Principal Attribute value of this STSUniversalUser based on the name provided.- Parameters:
- name- a String representing the name of the Attribute.
- Returns:
- the first principal Attribute value of the named Attribute or null if there is no named Attribute.
 
 - 
getContextAttributespublic ContextAttributes getContextAttributes() Retrieve the Context atrributes container- Returns:
- the Context atrributes container.
 
 - 
getContextAttributesAttributeContainerpublic AttributeContainer getContextAttributesAttributeContainer() Returns the ContextAttributes AttributeContainer of this STSUniversalUser.- Returns:
- the ContextAttributes AttributeContainer of this STSUniversalUser.
 
 - 
getGroupspublic java.util.Iterator getGroups() Returns anIteratorthat references all the Groups in the GroupList.- Returns:
- Iterator
 
 - 
getNumberOfAttributespublic int getNumberOfAttributes() Returns the number of Attributes in the AttributeList- Returns:
- int number of attributes
 
 - 
getRequestSecurityTokenAttributeByNamepublic java.lang.String getRequestSecurityTokenAttributeByName(java.lang.String name) Returns a RequestSecurityTokenAttribute based on the name provided.- Parameters:
- name- the name of the RST Attribute to return.
- Returns:
- a RequestSecurityTokenAttribute based on the name provided or if the name does not exist, returns null.
 
 - 
addAttributepublic void addAttribute(Attribute attr) Adds the given Attribute to the list of attributes. The name of the Attribute must not be null, if null the Attribute is not added to the list.- Parameters:
- attr- the attribute to be added to the list of attributes.
 
 - 
addContextAttributepublic void addContextAttribute(Attribute attr) Adds the given Attribute to the list of ContextAttributes- Parameters:
- attr-
 
 - 
setContextAttributespublic void setContextAttributes(ContextAttributes attributes) Sets the ContextAttributes- Parameters:
- attr-
 
 - 
addAttributeStatementpublic void addAttributeStatement(AttributeStatement attrstmt) Adds the given AttributeStatement to the list of AttributeStatements.- Parameters:
- attrstmt- the AttributeStatement to be added to the list of AttributeStatements.
 
 - 
toStringpublic java.lang.String toString() throws STSRuntimeExceptionReturns a String representation of this STSUniversalUser object. This method masks private data in the returned String. For a clear text String call the toClearTextString() method.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- a String representation of this STSUniversalUser object.
- Throws:
- STSRuntimeException
 
 - 
maskSTSUUStringpublic static java.lang.String maskSTSUUString(java.lang.String clearText) Masks hidden data in a String that contains STSUU elements. This method uses a pre-defined set of regular expressions to obscure secrets in the String representation of an STSUU.- Returns:
- a masked version of the input String, or the input String if no hidden data patterns were matched.
 
 - 
toClearTextStringpublic java.lang.String toClearTextString() throws STSRuntimeExceptionProduces the same string as toString except any password attribute will be in the clear- Returns:
- this STSUniversalUser as a String with the password in clear text.
- Throws:
- STSRuntimeException
 
 - 
toXMLpublic org.w3c.dom.Document toXML() throws STSRuntimeExceptionReturns this STSUniversalUser as XML in the form of an org.w3c.dom.Document object.- Returns:
- this STSUniversalUser as XML in the form of an org.w3c.dom.Document object.
- Throws:
- STSRuntimeException
 
 - 
removeGrouppublic int removeGroup(java.lang.String name, java.lang.String type)Remove the groups that match the given name and type, to match a group with no type pass null as the type. if * is passed for both name and type ALL groups are removed.- Parameters:
- name- the name of the Attribute as a String.
- type- the type of Attribute as a String.
- Returns:
- int the number of groups removed.
 
 - 
removeAttributepublic int removeAttribute(java.lang.String name, java.lang.String type)Remove the attributes that match the given name and type, to match a attribute with no type pass null as the type. if * is passed for both name and type ALL attributes are removed.- Parameters:
- name- the name of the Attribute as a String.
- type- the type of Attribute as a String.
- Returns:
- int the number of attributes removed.
 
 - 
removePrincipalAttributepublic int removePrincipalAttribute(java.lang.String name, java.lang.String type)Remove the attributes that match the given name and type, to match a attribute with no type pass null as the type. if * is passed for both name and type ALL attributes are removed.- Parameters:
- name- the name of the Attribute as a String.
- type- the type of Attribute as a String.
- Returns:
- int the number of attributes removed.
 
 - 
addPrincipalAttributepublic void addPrincipalAttribute(Attribute attr) Add a principalAttribute to this STSUniversalUser.- Parameters:
- attr- the principal Attribute to be added to this STSUniversalUser.
 
 - 
clearpublic void clear() This method when called will reset and clear all data in the STSUniversalUser.
 - 
clearPrincipalpublic void clearPrincipal() This method when called will reset and clear all data in the Principal
 - 
clearGroupListpublic void clearGroupList() This method when called will reset and clear all data in the GroupList
 - 
clearAttributeListpublic void clearAttributeList() This method when called will reset and clear all data in the AttributeList
 - 
clearRequestSecurityTokenpublic void clearRequestSecurityToken() This method when called will reset and clear all data in the RequestSecurityToken
 - 
clearAttributeStatementspublic void clearAttributeStatements() This method when called will reset and clear all data in the AttributeStatements
 - 
clearContextAttributespublic void clearContextAttributes() This method when called will reset and clear all data in the ContextAttributes
 
- 
 
-