Class STSUniversalUser
java.lang.Object
com.tivoli.am.fim.trustserver.sts.STSUniversalUser
Java representation of STSUniversalUser schema.
- Version:
- @VERSION@
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs an empty STSUniversalUser.STSUniversalUser
(Node node) Constructs a STSUniversalUser containing the data specified in the givenorg.w3c.dom.Node
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(Attribute attr) Adds the given Attribute to the list of attributes.void
addAttributeStatement
(AttributeStatement attrstmt) Adds the given AttributeStatement to the list of AttributeStatements.void
addContextAttribute
(Attribute attr) Adds the given Attribute to the list of ContextAttributesvoid
Adds the given group.void
Add a principalAttribute to this STSUniversalUser.void
clear()
This method when called will reset and clear all data in the STSUniversalUser.void
This method when called will reset and clear all data in the AttributeListvoid
This method when called will reset and clear all data in the AttributeStatementsvoid
This method when called will reset and clear all data in the ContextAttributesvoid
This method when called will reset and clear all data in the GroupListvoid
This method when called will reset and clear all data in the Principalvoid
This method when called will reset and clear all data in the RequestSecurityTokenvoid
copy
(STSUniversalUser stsuu) Performs a shallow copy (by reference) of the given STSUniversalUser object's membersvoid
Populates an STSUniversalUser from an IV_CREDS token (in the form of anString
).void
Populates an STSUniversalUser from XML (in the form of an org.w3c.dom.Node).void
Populates the STSUniversalUser from XML (in the form of an org.w3c.dom.Document).void
Builds the STSUniversalUser based on the given org.w3c.dom.Node.void
Populates an STSUniversalUser from XML (in the form of an org.w3c.dom.Node).Return the AttributeContainer associated with this STSUniversalUser.Returns anIterator
that references all the Attributes in the AttributeList.Returns anIterator
that references all the AtributStatementsReturns an Attribute value of this STSUniversalUser based on the name provided.Retrieve the Context atrributes containerReturns the ContextAttributes AttributeContainer of this STSUniversalUser.Returns anIterator
that references all the Groups in the GroupList.int
Returns the number of Attributes in the AttributeListint
Returns the number of groups in the GroupList.Return the PrincipalAttributeContainer associated with this STSUniversalUser.Returns anIterator
that references all the Principal Attributes in the Principal.Returns a Principal Attribute value of this STSUniversalUser based on the name provided.This is a convenience method for retrieving the first Principal attribute value that has the name="domain".This is a convenience method for retrieving the first Principal attribute value that has the name="name".This is a convenience method for retrieving the first Principal attribute value that has the name="registryid".This is a convenience method for retrieving the first Principal attribute value that has the name="uuid".Return the RequestSecurityToken associated with this STSUniversalUser.Returns a RequestSecurityTokenAttribute based on the name provided.Return the RequestSecurityTokenAttributeContainer associated with this STSUniversalUser.Returns an Iterator that references all the attributes of the RequestSecurityToken elementstatic String
maskSTSUUString
(String clearText) Masks hidden data in a String that contains STSUU elements.int
removeAttribute
(String name, 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.int
removeGroup
(String name, 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.int
removePrincipalAttribute
(String name, 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.void
setContextAttributes
(ContextAttributes attributes) Sets the ContextAttributesvoid
setPrincipalDomain
(String principalDomain) This is a convenience method for creating a Principal attribute with the name="domain" type=null and value=principalDomain.void
setPrincipalName
(String principalName) This is a convenience method for updating a Principal attribute with the name="name" type=and value=principalName. void
setPrincipalRegistryID
(String principalID) This is a convenience method for creating a Principal attribute with the name="registryid" type=null and value=principalID.void
setPrincipalUUID
(String principalUUID) This is a convenience method for creating a Principal attribute with the name="uuid" type=null and value=principalUUID.Produces the same string as toString except any password attribute will be in the cleartoString()
Returns a String representation of this STSUniversalUser object.toXML()
Returns this STSUniversalUser as XML in the form of an org.w3c.dom.Document object.
-
Field Details
-
STSUniversalUser_java_sourceCodeID
- See Also:
-
STSUniversalUser_java_copyright
- See Also:
-
ATTR_DN
- See Also:
-
ATTR_DOMAIN
- See Also:
-
IVCREDS_PREFIX
- See Also:
-
CUSTOM_PARAM_UNAUTH_USER_NAME
- See Also:
-
CUSTOM_PARAM_UNAUTH_USER_REGISTRY_ID
- See Also:
-
CUSTOM_PARAM_UNAUTH_USER_UUID
- See Also:
-
-
Constructor Details
-
STSUniversalUser
Constructs 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:
com.tivoli.am.fim.trustserver.sts.STSRuntimeException
-
STSUniversalUser
public STSUniversalUser()Constructs an empty STSUniversalUser.- Throws:
com.tivoli.am.fim.trustserver.sts.STSRuntimeException
-
-
Method Details
-
fromXML
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.
-
fromXML
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.
-
fromXML
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.
-
fromXML
Builds the STSUniversalUser based on the given org.w3c.dom.Node.- Parameters:
element
- a STSUniversalUser represented in XML following the STSUniversalUser's XML schema.
-
fromPAC
Populates an STSUniversalUser from an IV_CREDS token (in the form of anString
).- Parameters:
jsonString
- the iv_creds String to populate this STSUniversalUser from. If String is null or not valid, nothing will be done to this object.
-
copy
Performs a shallow copy (by reference) of the given STSUniversalUser object's members- Parameters:
stsuu
- the STSUniversalUser to copy from.
-
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.
-
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.
-
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.
-
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.
-
setPrincipalName
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.
-
setPrincipalRegistryID
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.
-
setPrincipalUUID
public void setPrincipalUUID(String principalUUID) throws com.tivoli.am.fim.trustserver.sts.STSRuntimeException This 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:
com.tivoli.am.fim.trustserver.sts.STSRuntimeException
-
setPrincipalDomain
public void setPrincipalDomain(String principalDomain) throws com.tivoli.am.fim.trustserver.sts.STSRuntimeException This 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:
com.tivoli.am.fim.trustserver.sts.STSRuntimeException
-
getNumberOfGroups
public int getNumberOfGroups()Returns the number of groups in the GroupList.- Returns:
- int number of groups.
-
addGroup
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.
-
getAttributes
Returns anIterator
that references all the Attributes in the AttributeList.- Returns:
- Iterator
-
getPrincipalAttributes
Returns anIterator
that references all the Principal Attributes in the Principal.- Returns:
- Iterator
-
getAttributeStatements
Returns anIterator
that references all the AtributStatements- Returns:
- 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
-
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.
-
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.
-
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.
-
getRequestSecurityTokenAttributeContainer
Return the RequestSecurityTokenAttributeContainer associated with this STSUniversalUser.- Returns:
- the RequestSecurityTokenAttributeContainer associated with this STSUniversalUser.
-
getAttributeValueByName
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.
-
getPrincipalAttributeValueByName
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.
-
getContextAttributes
Retrieve the Context atrributes container- Returns:
- the Context atrributes container.
-
getContextAttributesAttributeContainer
Returns the ContextAttributes AttributeContainer of this STSUniversalUser.- Returns:
- the ContextAttributes AttributeContainer of this STSUniversalUser.
-
getGroups
Returns anIterator
that references all the Groups in the GroupList.- Returns:
- Iterator
-
getNumberOfAttributes
public int getNumberOfAttributes()Returns the number of Attributes in the AttributeList- Returns:
- int number of attributes
-
getRequestSecurityTokenAttributeByName
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.
-
addAttribute
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.
-
addContextAttribute
Adds the given Attribute to the list of ContextAttributes- Parameters:
attr
-
-
setContextAttributes
Sets the ContextAttributes- Parameters:
attr
-
-
addAttributeStatement
Adds the given AttributeStatement to the list of AttributeStatements.- Parameters:
attrstmt
- the AttributeStatement to be added to the list of AttributeStatements.
-
toString
Returns 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. -
maskSTSUUString
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.
-
toClearTextString
Produces 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:
com.tivoli.am.fim.trustserver.sts.STSRuntimeException
-
toXML
Returns 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:
com.tivoli.am.fim.trustserver.sts.STSRuntimeException
-
removeGroup
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.
-
removeAttribute
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.
-
removePrincipalAttribute
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.
-
addPrincipalAttribute
Add a principalAttribute to this STSUniversalUser.- Parameters:
attr
- the principal Attribute to be added to this STSUniversalUser.
-
clear
public void clear()This method when called will reset and clear all data in the STSUniversalUser. -
clearPrincipal
public void clearPrincipal()This method when called will reset and clear all data in the Principal -
clearGroupList
public void clearGroupList()This method when called will reset and clear all data in the GroupList -
clearAttributeList
public void clearAttributeList()This method when called will reset and clear all data in the AttributeList -
clearRequestSecurityToken
public void clearRequestSecurityToken()This method when called will reset and clear all data in the RequestSecurityToken -
clearAttributeStatements
public void clearAttributeStatements()This method when called will reset and clear all data in the AttributeStatements -
clearContextAttributes
public void clearContextAttributes()This method when called will reset and clear all data in the ContextAttributes
-