JBoss Metadata EJB 7.2.2.Final

org.jboss.metadata.ejb.parser.spec
Class SessionBeanMetaDataParser<T extends AbstractGenericBeanMetaData>

java.lang.Object
  extended by org.jboss.metadata.parser.util.MetaDataElementParser
      extended by org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser<MD>
          extended by org.jboss.metadata.ejb.parser.spec.AbstractIdMetaDataParser<T>
              extended by org.jboss.metadata.ejb.parser.spec.SessionBeanMetaDataParser<T>
All Implemented Interfaces:
XMLStreamConstants
Direct Known Subclasses:
SessionBean30MetaDataParser

public abstract class SessionBeanMetaDataParser<T extends AbstractGenericBeanMetaData>
extends AbstractIdMetaDataParser<T>

Parses and creates metadata out of the <session> element in the ejb-jar.xml

This class parses the common ejb-jar.xml elements. Individual ejb-jar version specific implementations should override the #processElement(org.jboss.metadata.ejb.spec.SessionBeanMetaData, javax.xml.stream.XMLStreamReader, PropertyReplacer) method to parse the version specific ejb-jar.xml elements User: Jaikiran Pai


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.metadata.parser.util.MetaDataElementParser
MetaDataElementParser.DTDInfo
 
Field Summary
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
SessionBeanMetaDataParser()
           
 
Method Summary
protected abstract  T createSessionBeanMetaData()
          Create and return the correct version of SessionBeanMetaData

Individual ejb-jar version specific implementations of this class should implement this method to return the appropriate version specific SessionBeanMetaData

 T parse(XMLStreamReader reader, PropertyReplacer propertyReplacer)
          Creates and returns SessionBeanMetaData after parsing the session element.
protected  void processElement(T sessionBean, XMLStreamReader reader, PropertyReplacer propertyReplacer)
          Parses common (version indepndent) ejb-jar.xml elements and updates the passed ejb metadata appropriately
protected  SessionType processSessionType(String sessionType)
          Returns the SessionType corresponding to the passed sessionType string.
 
Methods inherited from class org.jboss.metadata.ejb.parser.spec.AbstractIdMetaDataParser
processAttribute
 
Methods inherited from class org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser
processElements
 
Methods inherited from class org.jboss.metadata.parser.util.MetaDataElementParser
attributeHasNamespace, duplicateNamedElement, equals, getElementText, getElementText, getElementText, getElementText, hashCode, missingRequired, missingRequiredElement, parseQName, readBooleanAttributeElement, readDTDLocation, readSchemaLocation, readStringAttributeElement, requireNoAttributes, requireNoContent, safeCopyMap, unexpectedAttribute, unexpectedElement, unexpectedValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionBeanMetaDataParser

public SessionBeanMetaDataParser()
Method Detail

createSessionBeanMetaData

protected abstract T createSessionBeanMetaData()
Create and return the correct version of SessionBeanMetaData

Individual ejb-jar version specific implementations of this class should implement this method to return the appropriate version specific SessionBeanMetaData

Returns:

parse

public T parse(XMLStreamReader reader,
               PropertyReplacer propertyReplacer)
                                            throws XMLStreamException
Creates and returns SessionBeanMetaData after parsing the session element.

Specified by:
parse in class AbstractMetaDataParser<T extends AbstractGenericBeanMetaData>
Parameters:
reader -
Returns:
Throws:
XMLStreamException

processElement

protected void processElement(T sessionBean,
                              XMLStreamReader reader,
                              PropertyReplacer propertyReplacer)
                       throws XMLStreamException
Parses common (version indepndent) ejb-jar.xml elements and updates the passed ejb metadata appropriately

Overrides:
processElement in class AbstractMetaDataParser<T extends AbstractGenericBeanMetaData>
Parameters:
sessionBean - The session bean metadata
reader - The XMLStreamReader
Throws:
XMLStreamException

processSessionType

protected SessionType processSessionType(String sessionType)
Returns the SessionType corresponding to the passed sessionType string.

Returns null, if the passed sessionType isn't one of the allowed values for the <session-type> element in ejb-jar.xml

Parameters:
sessionType -
Returns:

JBoss Metadata EJB 7.2.2.Final

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.