Class AdviceImpl
- java.lang.Object
-
- com.sun.identity.saml2.assertion.impl.AdviceImpl
-
- All Implemented Interfaces:
Advice
public class AdviceImpl extends Object implements Advice
TheAdvice
contains any additional information that the SAML authority wishes to provide. This information may be ignored by applications without affecting either the semantics or the validity of the assertion. AnAdvice
contains a mixture of zero or moreAssertion
,EncryptedAssertion
,AssertionIDRef
, andAssertionURIRef
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADVICE_ELEMENT
static String
ASSERTION_ELEMENT
static String
ASSERTION_ID_REF_ELEMENT
static String
ASSERTION_URI_REF_ELEMENT
static String
ENCRYPTED_ASSERTION_ELEMENT
-
Constructor Summary
Constructors Constructor Description AdviceImpl()
Default constructorAdviceImpl(String xml)
This constructor is used to buildAdvice
object from a XML string.AdviceImpl(Element element)
This constructor is used to buildAdvice
object from a block of existing XML that has already been built into a DOM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List
getAdditionalInfo()
Returns a list of additional informationList
getAssertionIDRefs()
Returns a list ofAssertionIDRef
List
getAssertions()
Returns a list ofAssertion
List
getAssertionURIRefs()
Returns a list ofAssertionURIRef
List
getEncryptedAssertions()
Returns a list ofEncryptedAssertion
boolean
isMutable()
Returns true if the object is mutablevoid
makeImmutable()
Makes the object immutablevoid
setAdditionalInfo(List info)
Sets a list of additional informationvoid
setAssertionIDRefs(List idRefs)
Sets a list ofAssertionIDRef
void
setAssertions(List assertions)
Sets a list ofAssertion
void
setAssertionURIRefs(List uriRefs)
Sets a list ofAssertionURIRef
void
setEncryptedAssertions(List encryptedAssertions)
Sets a list ofEncryptedAssertion
String
toXMLString()
Returns a String representationString
toXMLString(boolean includeNSPrefix, boolean declareNS)
Returns a String representation
-
-
-
Field Detail
-
ADVICE_ELEMENT
public static String ADVICE_ELEMENT
-
ASSERTION_URI_REF_ELEMENT
public static String ASSERTION_URI_REF_ELEMENT
-
ASSERTION_ID_REF_ELEMENT
public static String ASSERTION_ID_REF_ELEMENT
-
ASSERTION_ELEMENT
public static String ASSERTION_ELEMENT
-
ENCRYPTED_ASSERTION_ELEMENT
public static String ENCRYPTED_ASSERTION_ELEMENT
-
-
Constructor Detail
-
AdviceImpl
public AdviceImpl()
Default constructor
-
AdviceImpl
public AdviceImpl(String xml) throws SAML2Exception
This constructor is used to buildAdvice
object from a XML string.- Parameters:
xml
- Ajava.lang.String
representing aAdvice
object- Throws:
SAMLException
- if it could not process the XML stringSAML2Exception
-
AdviceImpl
public AdviceImpl(Element element) throws SAML2Exception
This constructor is used to buildAdvice
object from a block of existing XML that has already been built into a DOM.- Parameters:
element
- Aorg.w3c.dom.Element
representing DOM tree forAdvice
object- Throws:
SAMLException
- if it could not process the ElementSAML2Exception
-
-
Method Detail
-
getAssertions
public List getAssertions()
Returns a list ofAssertion
- Specified by:
getAssertions
in interfaceAdvice
- Returns:
- a list of
Assertion
-
setAssertions
public void setAssertions(List assertions) throws SAML2Exception
Sets a list ofAssertion
- Specified by:
setAssertions
in interfaceAdvice
- Parameters:
assertions
- a list ofAssertion
- Throws:
SAML2Exception
- if the object is immutable
-
getAssertionIDRefs
public List getAssertionIDRefs()
Returns a list ofAssertionIDRef
- Specified by:
getAssertionIDRefs
in interfaceAdvice
- Returns:
- a list of
AssertionIDRef
-
setAssertionIDRefs
public void setAssertionIDRefs(List idRefs) throws SAML2Exception
Sets a list ofAssertionIDRef
- Specified by:
setAssertionIDRefs
in interfaceAdvice
- Parameters:
idRefs
- a list ofAssertionIDRef
- Throws:
SAML2Exception
- if the object is immutable
-
getAssertionURIRefs
public List getAssertionURIRefs()
Returns a list ofAssertionURIRef
- Specified by:
getAssertionURIRefs
in interfaceAdvice
- Returns:
- a list of
AssertionURIRef
-
setAssertionURIRefs
public void setAssertionURIRefs(List uriRefs) throws SAML2Exception
Sets a list ofAssertionURIRef
- Specified by:
setAssertionURIRefs
in interfaceAdvice
- Parameters:
uriRefs
- a list ofAssertionURIRef
- Throws:
SAML2Exception
- if the object is immutable
-
getEncryptedAssertions
public List getEncryptedAssertions()
Returns a list ofEncryptedAssertion
- Specified by:
getEncryptedAssertions
in interfaceAdvice
- Returns:
- a list of
EncryptedAssertion
-
setEncryptedAssertions
public void setEncryptedAssertions(List encryptedAssertions) throws SAML2Exception
Sets a list ofEncryptedAssertion
- Specified by:
setEncryptedAssertions
in interfaceAdvice
- Parameters:
encryptedAssertions
- a list ofEncryptedAssertion
- Throws:
SAML2Exception
- if the object is immutable
-
getAdditionalInfo
public List getAdditionalInfo()
Returns a list of additional information- Specified by:
getAdditionalInfo
in interfaceAdvice
- Returns:
- a list of additional information
-
setAdditionalInfo
public void setAdditionalInfo(List info) throws SAML2Exception
Sets a list of additional information- Specified by:
setAdditionalInfo
in interfaceAdvice
- Parameters:
info
- a list of additional information- Throws:
SAML2Exception
- if the object is immutable
-
toXMLString
public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
Returns a String representation- Specified by:
toXMLString
in interfaceAdvice
- 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
- Throws:
SAML2Exception
- if something is wrong during conversion
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation- Specified by:
toXMLString
in interfaceAdvice
- Returns:
- A String representation
- Throws:
SAML2Exception
- if something is wrong during conversion
-
makeImmutable
public void makeImmutable()
Makes the object immutable- Specified by:
makeImmutable
in interfaceAdvice
-
-