Class SAMLSubjectParser
- java.lang.Object
-
- org.keycloak.saml.common.parsers.AbstractStaxParser<T,SAMLAssertionQNames>
-
- org.keycloak.saml.processing.core.parsers.saml.assertion.AbstractStaxSamlAssertionParser<SubjectType>
-
- org.keycloak.saml.processing.core.parsers.saml.assertion.SAMLSubjectParser
-
- All Implemented Interfaces:
StaxParser
public class SAMLSubjectParser extends AbstractStaxSamlAssertionParser<SubjectType> implements StaxParser
Parse the saml subject- Since:
- Oct 12, 2010
-
-
Field Summary
-
Fields inherited from class org.keycloak.saml.processing.core.parsers.saml.assertion.AbstractStaxSamlAssertionParser
LOOKUP
-
Fields inherited from class org.keycloak.saml.common.parsers.AbstractStaxParser
expectedStartElement, LOGGER
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SAMLSubjectParsergetInstance()protected SubjectTypeinstantiateElement(XMLEventReader xmlEventReader, StartElement element)Instantiates the target Java class representing the current element.
Precondition: Current event is theStartElement
Postcondition: Current event is theStartElementor theEndElementcorresponding to theStartElementprotected voidprocessSubElement(XMLEventReader xmlEventReader, SubjectType target, SAMLAssertionQNames element, StartElement elementDetail)Processes the subelement of the element processed inAbstractStaxParser.instantiateElement(javax.xml.stream.XMLEventReader, javax.xml.stream.events.StartElement)method.
Precondition: Current event: Last before theStartElementcorresponding to the processed subelement, i.e.-
Methods inherited from class org.keycloak.saml.processing.core.parsers.saml.assertion.AbstractStaxSamlAssertionParser
getElementFromName
-
Methods inherited from class org.keycloak.saml.common.parsers.AbstractStaxParser
isUnknownElement, parse, validateStartElement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.saml.common.parsers.StaxParser
parse
-
-
-
-
Method Detail
-
getInstance
public static SAMLSubjectParser getInstance()
-
instantiateElement
protected SubjectType instantiateElement(XMLEventReader xmlEventReader, StartElement element) throws ParsingException
Description copied from class:AbstractStaxParserInstantiates the target Java class representing the current element.
Precondition: Current event is theStartElement
Postcondition: Current event is theStartElementor theEndElementcorresponding to theStartElement- Specified by:
instantiateElementin classAbstractStaxParser<SubjectType,SAMLAssertionQNames>element- The XML event that was just read from thexmlEventReader- Returns:
- Throws:
ParsingException
-
processSubElement
protected void processSubElement(XMLEventReader xmlEventReader, SubjectType target, SAMLAssertionQNames element, StartElement elementDetail) throws ParsingException
Description copied from class:AbstractStaxParserProcesses the subelement of the element processed inAbstractStaxParser.instantiateElement(javax.xml.stream.XMLEventReader, javax.xml.stream.events.StartElement)method.
Precondition: Current event: Last before theStartElementcorresponding to the processed subelement, i.e. event obtained byIterator.next()is theStartElementof the subelement being processed
Postcondition: Event obtained byIterator.next()is either the sameStartElement(i.e. no change in position which causes this subelement to be skipped), the correspondingEndElement, or the event after the correspondingEndElement.Note that in case of recursive nesting the same element, the corresponding end element MUST be consumed in this method.
- Specified by:
processSubElementin classAbstractStaxParser<SubjectType,SAMLAssertionQNames>target- Target object (the one created by theAbstractStaxParser.instantiateElement(javax.xml.stream.XMLEventReader, javax.xml.stream.events.StartElement)method.element- The constant corresponding to the current start element.elementDetail- The XML event that was just read from thexmlEventReader- Throws:
ParsingException
-
-