public class STSUniversalUser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
STSUniversalUser_java_copyright |
static java.lang.String |
STSUniversalUser_java_sourceCodeID |
Constructor and Description |
---|
STSUniversalUser()
Constructs an empty STSUniversalUser.
|
STSUniversalUser(org.w3c.dom.Node node)
Constructs a STSUniversalUser containing the data specified in the given
org.w3c.dom.Node . |
Modifier and Type | Method and Description |
---|---|
void |
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 ContextAttributes
|
void |
addGroup(Group group)
Adds the given group.
|
void |
addPrincipalAttribute(Attribute attr)
Add a principalAttribute to this STSUniversalUser.
|
void |
clear()
This method when called will reset and clear all data in the STSUniversalUser.
|
void |
clearAttributeList()
This method when called will reset and clear all data in the AttributeList
|
void |
clearAttributeStatements()
This method when called will reset and clear all data in the AttributeStatements
|
void |
clearContextAttributes()
This method when called will reset and clear all data in the ContextAttributes
|
void |
clearGroupList()
This method when called will reset and clear all data in the GroupList
|
void |
clearPrincipal()
This method when called will reset and clear all data in the Principal
|
void |
clearRequestSecurityToken()
This method when called will reset and clear all data in the RequestSecurityToken
|
void |
copy(STSUniversalUser stsuu)
Performs a shallow copy (by reference) of the given STSUniversalUser
object's members
|
void |
fromJSON(java.lang.String jsonString)
Populates an STSUniversalUser from JSON (in the form of an
String ). |
void |
fromXML(org.w3c.dom.Document doc)
Populates the STSUniversalUser from XML (in the form of an
org.w3c.dom.Document).
|
void |
fromXML(org.w3c.dom.Element element)
Builds the STSUniversalUser based on the given org.w3c.dom.Node.
|
void |
fromXML(org.w3c.dom.Node node)
Populates an STSUniversalUser from XML (in the form of an
org.w3c.dom.Node).
|
void |
fromXML(java.lang.String xmlString)
Populates an STSUniversalUser from XML (in the form of an
org.w3c.dom.Node).
|
AttributeContainer |
getAttributeContainer()
Return the AttributeContainer associated with this STSUniversalUser.
|
java.util.Iterator |
getAttributes()
Returns an
Iterator that references all the Attributes in
the AttributeList. |
java.util.Iterator |
getAttributeStatements()
Returns an
Iterator that references all the
AtributStatements |
java.lang.String |
getAttributeValueByName(java.lang.String name)
Returns an Attribute value of this STSUniversalUser based on the name
provided.
|
ContextAttributes |
getContextAttributes()
Retrieve the Context atrributes container
|
AttributeContainer |
getContextAttributesAttributeContainer()
Returns the ContextAttributes AttributeContainer of this
STSUniversalUser.
|
java.util.Iterator |
getGroups()
Returns an
Iterator that references all the Groups in the
GroupList. |
int |
getNumberOfAttributes()
Returns the number of Attributes in the AttributeList
|
int |
getNumberOfGroups()
Returns the number of groups in the GroupList.
|
AttributeContainer |
getPrincipalAttributeContainer()
Return the PrincipalAttributeContainer associated with this
STSUniversalUser.
|
java.util.Iterator |
getPrincipalAttributes()
Returns an
Iterator that references all the Principal
Attributes in the Principal. |
java.lang.String |
getPrincipalAttributeValueByName(java.lang.String name)
Returns a Principal Attribute value of this STSUniversalUser based on the
name provided.
|
java.lang.String |
getPrincipalDomain()
This is a convenience method for retrieving the first Principal attribute
value that has the name="domain".
|
java.lang.String |
getPrincipalName()
This is a convenience method for retrieving the first Principal attribute
value that has the name="name".
|
java.lang.String |
getPrincipalRegistryID()
This is a convenience method for retrieving the first Principal attribute
value that has the name="registryid".
|
java.lang.String |
getPrincipalUUID()
This is a convenience method for retrieving the first Principal attribute
value that has the name="uuid".
|
RequestSecurityToken |
getRequestSecurityToken()
Return the RequestSecurityToken associated with this STSUniversalUser.
|
java.lang.String |
getRequestSecurityTokenAttributeByName(java.lang.String name)
Returns a RequestSecurityTokenAttribute based on the name provided.
|
AttributeContainer |
getRequestSecurityTokenAttributeContainer()
Return the RequestSecurityTokenAttributeContainer associated with this
STSUniversalUser.
|
java.util.Iterator |
getRequestSecurityTokenAttributes()
Returns an Iterator that references all the attributes of the
RequestSecurityToken element
|
static void |
main(java.lang.String[] args)
STSUniversalUser test application.
|
static java.lang.String |
maskSTSUUString(java.lang.String clearText)
Masks hidden data in a String that contains STSUU elements.
|
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.
|
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.
|
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.
|
void |
setContextAttributes(ContextAttributes attributes)
Sets the ContextAttributes
|
void |
setPrincipalDomain(java.lang.String principalDomain)
This is a convenience method for creating a Principal attribute with the
name="domain" type=null and value=principalDomain.
|
void |
setPrincipalName(java.lang.String principalName)
This is a convenience method for updating a Principal attribute with the
name="name" type=
|
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.
|
void |
setPrincipalUUID(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.String |
toClearTextString()
Produces the same string as toString except any password attribute will
be in the clear
|
java.lang.String |
toJSON()
Returns this STSUniversalUser as JSON in the form of an
String . |
java.lang.String |
toString()
Returns a String representation of this STSUniversalUser object.
|
org.w3c.dom.Document |
toXML()
Returns this STSUniversalUser as XML in the form of an
org.w3c.dom.Document object.
|
public static final java.lang.String STSUniversalUser_java_sourceCodeID
public static final java.lang.String STSUniversalUser_java_copyright
public STSUniversalUser(org.w3c.dom.Node node) throws STSRuntimeException
org.w3c.dom.Node
.node
- a STSUniversalUser represented in XML following the
STSUniversalUser's XML schema.STSRuntimeException
public STSUniversalUser()
STSRuntimeException
public void fromXML(org.w3c.dom.Node node)
node
- the Node to populate this STSUniversalUser from. If node is
null, nothing will be done to this object.public void fromXML(java.lang.String xmlString)
xmlString
- the String to populate this STSUniversalUser from. If String is
null, nothing will be done to this object.public void fromJSON(java.lang.String jsonString)
String
).jsonString
- the String to populate this STSUniversalUser from. If
String is null, nothing will be done to this object.public void fromXML(org.w3c.dom.Document doc)
doc
- the Document to populate this STSUniversalUser from. If
Document is null, nothing will be done to this object.public void fromXML(org.w3c.dom.Element element)
element
- a STSUniversalUser represented in XML following the
STSUniversalUser's XML schema.public void copy(STSUniversalUser stsuu)
stsuu
- the STSUniversalUser to copy from.public java.lang.String getPrincipalName()
public java.lang.String getPrincipalRegistryID()
public java.lang.String getPrincipalUUID()
public java.lang.String getPrincipalDomain()
public void setPrincipalName(java.lang.String principalName)
principalName
- the principal name as a String.public void setPrincipalRegistryID(java.lang.String principalID)
principalID
- the principalDN as a String.public void setPrincipalUUID(java.lang.String principalUUID) throws STSRuntimeException
principalUUID
- the principalUUID as a StringSTSRuntimeException
public void setPrincipalDomain(java.lang.String principalDomain) throws STSRuntimeException
principalDomain
- the principalDomain as a String.STSRuntimeException
public int getNumberOfGroups()
public void addGroup(Group group)
group
- the Group to be added.public java.util.Iterator getAttributes()
Iterator
that references all the Attributes in
the AttributeList.public java.util.Iterator getPrincipalAttributes()
Iterator
that references all the Principal
Attributes in the Principal.public java.util.Iterator getAttributeStatements()
Iterator
that references all the
AtributStatementspublic java.util.Iterator getRequestSecurityTokenAttributes()
public AttributeContainer getPrincipalAttributeContainer()
public AttributeContainer getAttributeContainer()
public RequestSecurityToken getRequestSecurityToken()
public AttributeContainer getRequestSecurityTokenAttributeContainer()
public java.lang.String getAttributeValueByName(java.lang.String name)
name
- a String representing the name of the Attribute.public java.lang.String getPrincipalAttributeValueByName(java.lang.String name)
name
- a String representing the name of the Attribute.public ContextAttributes getContextAttributes()
public AttributeContainer getContextAttributesAttributeContainer()
public java.util.Iterator getGroups()
Iterator
that references all the Groups in the
GroupList.public int getNumberOfAttributes()
public java.lang.String getRequestSecurityTokenAttributeByName(java.lang.String name)
name
- the name of the RST Attribute to return.public void addAttribute(Attribute attr)
attr
- the attribute to be added to the list of attributes.public void addContextAttribute(Attribute attr)
attr
- public void setContextAttributes(ContextAttributes attributes)
attr
- public void addAttributeStatement(AttributeStatement attrstmt)
attrstmt
- the AttributeStatement to be added to the list of
AttributeStatements.public java.lang.String toString() throws STSRuntimeException
toString
in class java.lang.Object
STSRuntimeException
public static java.lang.String maskSTSUUString(java.lang.String clearText)
public java.lang.String toClearTextString() throws STSRuntimeException
STSRuntimeException
public org.w3c.dom.Document toXML() throws STSRuntimeException
STSRuntimeException
public java.lang.String toJSON()
String
.null
if STSUniversalUser XML document can not be parsed.public int removeGroup(java.lang.String name, java.lang.String type)
name
- the name of the Attribute as a String.type
- the type of Attribute as a String.public int removeAttribute(java.lang.String name, java.lang.String type)
name
- the name of the Attribute as a String.type
- the type of Attribute as a String.public int removePrincipalAttribute(java.lang.String name, java.lang.String type)
name
- the name of the Attribute as a String.type
- the type of Attribute as a String.public void addPrincipalAttribute(Attribute attr)
attr
- the principal Attribute to be added to this STSUniversalUser.public void clear()
public void clearPrincipal()
public void clearGroupList()
public void clearAttributeList()
public void clearRequestSecurityToken()
public void clearAttributeStatements()
public void clearContextAttributes()
public static void main(java.lang.String[] args)
args
- arguments to the application. Not used in this case.