Class NameIDPolicyImpl
- java.lang.Object
-
- com.sun.identity.saml2.protocol.impl.NameIDPolicyImpl
-
- All Implemented Interfaces:
NameIDPolicy
public class NameIDPolicyImpl extends Object implements NameIDPolicy
This interface defines methods to retrieve name identifier related properties.
-
-
Constructor Summary
Constructors Constructor Description NameIDPolicyImpl()Constructor createsNameIDPolicyobject.NameIDPolicyImpl(String xmlString)Returns theNameIDPolicyObject.NameIDPolicyImpl(Element element)Constructor createsNameIDPolicyobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFormat()Returns the value ofFormatattribute.StringgetSPNameQualifier()Returns the value of theSPNameQualifierattribute.booleanisAllowCreate()Returns true if the identity provider is allowed to create a new identifier to represent the principal.booleanisMutable()Returns true if object is mutable.voidmakeImmutable()Makes this object immutable.voidsetAllowCreate(boolean value)Sets the value ofAllowCreateattribute.voidsetFormat(String uri)Sets the value of theFormatattribute.voidsetSPNameQualifier(String spNameQualifier)Sets the value ofSPNameQualifierattribute.StringtoXMLString()Returns a String representation of this Object.StringtoXMLString(boolean includeNSPrefix, boolean declareNS)Returns a String representation
-
-
-
Constructor Detail
-
NameIDPolicyImpl
public NameIDPolicyImpl()
Constructor createsNameIDPolicyobject.
-
NameIDPolicyImpl
public NameIDPolicyImpl(Element element) throws SAML2Exception
Constructor createsNameIDPolicyobject.- Parameters:
element- Document Element ofNameIDPolicyObject.- Throws:
SAML2Exception- ifNameIDPolicycannot be created.
-
NameIDPolicyImpl
public NameIDPolicyImpl(String xmlString) throws SAML2Exception
Returns theNameIDPolicyObject.- Parameters:
xmlString- XML String Representation ofNameIDPolicyobject.- Throws:
SAML2Exception- ifNameIDPolicycannot be created.
-
-
Method Detail
-
getFormat
public String getFormat()
Returns the value ofFormatattribute.- Specified by:
getFormatin interfaceNameIDPolicy- Returns:
- the value of
Formatattribute. - See Also:
setFormat(String)
-
setFormat
public void setFormat(String uri) throws SAML2Exception
Sets the value of theFormatattribute.- Specified by:
setFormatin interfaceNameIDPolicy- Parameters:
uri- the new value ofFormatattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
setFormat(String)
-
getSPNameQualifier
public String getSPNameQualifier()
Returns the value of theSPNameQualifierattribute.- Specified by:
getSPNameQualifierin interfaceNameIDPolicy- Returns:
- the value of
SPNameQualifierattribute. - See Also:
NameIDPolicy.setSPNameQualifier(String)
-
setSPNameQualifier
public void setSPNameQualifier(String spNameQualifier) throws SAML2Exception
Sets the value ofSPNameQualifierattribute.- Specified by:
setSPNameQualifierin interfaceNameIDPolicy- Parameters:
spNameQualifier- new value ofSPNameQualifierattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
NameIDPolicy.getSPNameQualifier()
-
setAllowCreate
public void setAllowCreate(boolean value) throws SAML2ExceptionSets the value ofAllowCreateattribute.- Specified by:
setAllowCreatein interfaceNameIDPolicy- Parameters:
value- e the new value ofAllowCreateattribute.- Throws:
SAML2Exception- if the object is immutable.
-
isAllowCreate
public boolean isAllowCreate()
Returns true if the identity provider is allowed to create a new identifier to represent the principal.- Specified by:
isAllowCreatein interfaceNameIDPolicy- Returns:
- value of
AllowCreateattribute.
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation of this Object.- Specified by:
toXMLStringin interfaceNameIDPolicy- Returns:
- String representation of this Object.
- Throws:
SAML2Exception- if cannot create String object.
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
Returns a String representation- Specified by:
toXMLStringin interfaceNameIDPolicy- Parameters:
includeNSPrefix- determines whether or not the namespace qualifier is prepended to the Element when converteddeclareNS- determines whether or not the namespace is declared within the Element.- Returns:
- String representation of this Object.
- Throws:
SAML2Exception- if cannot create String object.
-
makeImmutable
public void makeImmutable()
Makes this object immutable.- Specified by:
makeImmutablein interfaceNameIDPolicy
-
isMutable
public boolean isMutable()
Returns true if object is mutable.- Specified by:
isMutablein interfaceNameIDPolicy- Returns:
- true if object is mutable.
-
-