Class AdviceImpl
- java.lang.Object
 - 
- com.sun.identity.saml2.assertion.impl.AdviceImpl
 
 
- 
- All Implemented Interfaces:
 Advice
public class AdviceImpl extends Object implements Advice
TheAdvicecontains 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. AnAdvicecontains a mixture of zero or moreAssertion,EncryptedAssertion,AssertionIDRef, andAssertionURIRef. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringADVICE_ELEMENTstatic StringASSERTION_ELEMENTstatic StringASSERTION_ID_REF_ELEMENTstatic StringASSERTION_URI_REF_ELEMENTstatic StringENCRYPTED_ASSERTION_ELEMENT 
- 
Constructor Summary
Constructors Constructor Description AdviceImpl()Default constructorAdviceImpl(String xml)This constructor is used to buildAdviceobject from a XML string.AdviceImpl(Element element)This constructor is used to buildAdviceobject 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 ListgetAdditionalInfo()Returns a list of additional informationListgetAssertionIDRefs()Returns a list ofAssertionIDRefListgetAssertions()Returns a list ofAssertionListgetAssertionURIRefs()Returns a list ofAssertionURIRefListgetEncryptedAssertions()Returns a list ofEncryptedAssertionbooleanisMutable()Returns true if the object is mutablevoidmakeImmutable()Makes the object immutablevoidsetAdditionalInfo(List info)Sets a list of additional informationvoidsetAssertionIDRefs(List idRefs)Sets a list ofAssertionIDRefvoidsetAssertions(List assertions)Sets a list ofAssertionvoidsetAssertionURIRefs(List uriRefs)Sets a list ofAssertionURIRefvoidsetEncryptedAssertions(List encryptedAssertions)Sets a list ofEncryptedAssertionStringtoXMLString()Returns a String representationStringtoXMLString(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 buildAdviceobject from a XML string.- Parameters:
 xml- Ajava.lang.Stringrepresenting aAdviceobject- Throws:
 SAMLException- if it could not process the XML stringSAML2Exception
 
- 
AdviceImpl
public AdviceImpl(Element element) throws SAML2Exception
This constructor is used to buildAdviceobject from a block of existing XML that has already been built into a DOM.- Parameters:
 element- Aorg.w3c.dom.Elementrepresenting DOM tree forAdviceobject- Throws:
 SAMLException- if it could not process the ElementSAML2Exception
 
 - 
 
- 
Method Detail
- 
getAssertions
public List getAssertions()
Returns a list ofAssertion- Specified by:
 getAssertionsin interfaceAdvice- Returns:
 - a list of 
Assertion 
 
- 
setAssertions
public void setAssertions(List assertions) throws SAML2Exception
Sets a list ofAssertion- Specified by:
 setAssertionsin interfaceAdvice- Parameters:
 assertions- a list ofAssertion- Throws:
 SAML2Exception- if the object is immutable
 
- 
getAssertionIDRefs
public List getAssertionIDRefs()
Returns a list ofAssertionIDRef- Specified by:
 getAssertionIDRefsin interfaceAdvice- Returns:
 - a list of 
AssertionIDRef 
 
- 
setAssertionIDRefs
public void setAssertionIDRefs(List idRefs) throws SAML2Exception
Sets a list ofAssertionIDRef- Specified by:
 setAssertionIDRefsin interfaceAdvice- Parameters:
 idRefs- a list ofAssertionIDRef- Throws:
 SAML2Exception- if the object is immutable
 
- 
getAssertionURIRefs
public List getAssertionURIRefs()
Returns a list ofAssertionURIRef- Specified by:
 getAssertionURIRefsin interfaceAdvice- Returns:
 - a list of 
AssertionURIRef 
 
- 
setAssertionURIRefs
public void setAssertionURIRefs(List uriRefs) throws SAML2Exception
Sets a list ofAssertionURIRef- Specified by:
 setAssertionURIRefsin interfaceAdvice- Parameters:
 uriRefs- a list ofAssertionURIRef- Throws:
 SAML2Exception- if the object is immutable
 
- 
getEncryptedAssertions
public List getEncryptedAssertions()
Returns a list ofEncryptedAssertion- Specified by:
 getEncryptedAssertionsin interfaceAdvice- Returns:
 - a list of 
EncryptedAssertion 
 
- 
setEncryptedAssertions
public void setEncryptedAssertions(List encryptedAssertions) throws SAML2Exception
Sets a list ofEncryptedAssertion- Specified by:
 setEncryptedAssertionsin 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:
 getAdditionalInfoin interfaceAdvice- Returns:
 - a list of additional information
 
 
- 
setAdditionalInfo
public void setAdditionalInfo(List info) throws SAML2Exception
Sets a list of additional information- Specified by:
 setAdditionalInfoin 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:
 toXMLStringin 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:
 toXMLStringin interfaceAdvice- Returns:
 - A String representation
 - Throws:
 SAML2Exception- if something is wrong during conversion
 
- 
makeImmutable
public void makeImmutable()
Makes the object immutable- Specified by:
 makeImmutablein interfaceAdvice
 
 - 
 
 -