Class NewIDImpl
- java.lang.Object
-
- com.sun.identity.saml2.protocol.impl.NewIDImpl
-
-
Field Summary
Fields Modifier and Type Field Description StringelementName
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NewEncryptedIDencrypt(Key recipientPublicKey, String dataEncAlgorithm, int dataEncStrength, String recipientEntityID)Returns anNewEncryptedIDobject.StringgetValue()Returns the value of theNewIDURI.StringtoXMLString()Returns a String representation of this Object.StringtoXMLString(boolean includeNSPrefix, boolean declareNS)Returns a String representation
-
-
-
Field Detail
-
elementName
public final String elementName
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NewIDImpl
public NewIDImpl(Element element) throws SAML2Exception
Constructor to create theNewIDObject.- Parameters:
element- Document Element ofNewIDObject.- Throws:
SAML2Exception- ifNewIDcannot be created.
-
NewIDImpl
public NewIDImpl(String value) throws SAML2Exception
Constructor to create theNewIDObject.- Parameters:
value- of theNewID.- Throws:
SAML2Exception- ifNewIDcannot be created.
-
-
Method Detail
-
getValue
public String getValue()
Returns the value of theNewIDURI.- Specified by:
getValuein interfaceNewID- Returns:
- value of the
NewIDURI. - See Also:
NewIDImpl(String)
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation of this Object.- Specified by:
toXMLStringin interfaceNewID- Returns:
- a String representation of this Object.
- Throws:
SAML2Exception- if cannot convert to String.
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
Returns a String representation- Specified by:
toXMLStringin interfaceNewID- 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:
- a String representation of this Object.
- Throws:
SAML2Exception- if cannot convert to String.
-
encrypt
public NewEncryptedID encrypt(Key recipientPublicKey, String dataEncAlgorithm, int dataEncStrength, String recipientEntityID) throws SAML2Exception
Returns anNewEncryptedIDobject.- Specified by:
encryptin interfaceNewID- Parameters:
recipientPublicKey- Public key used to encrypt the data encryption (secret) key, it is the public key of the recipient of the XML document to be encrypted.dataEncAlgorithm- Data encryption algorithm.dataEncStrength- Data encryption strength.recipientEntityID- Unique identifier of the recipient, it is used as the index to the cached secret key so that the key can be reused for the same recipient; It can be null in which case the secret key will be generated every time and will not be cached and reused. Note that the generation of a secret key is a relatively expensive operation.- Returns:
NewEncryptedIDobject- Throws:
SAML2Exception- if error occurs during the encryption process.
-
-