Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| EAC Handlers 3.2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.endeca.soleng.eac.toolkit.parsing
Class EacElementDefinitionParser

    java.lang.Object
      org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
          com.endeca.soleng.eac.toolkit.parsing.EacElementDefinitionParser

All Implemented Interfaces:
  org.springframework.beans.factory.xml.BeanDefinitionParser

    public class EacElementDefinitionParser

extends org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

Class used to parse Elements in the App Configuration document. This object is used to parse all elements, relying on the namespace handler to pre-define what object is to be created by the parser and to specify which elements and attributes to parse. This makes it easy for us to re-use code that parses similar/identical attributes and elements on different elements.

Field Summary

Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
`ID_ATTRIBUTE`

Constructor Summary
`EacElementDefinitionParser()`

Method Summary
`protected void` | `doParse(org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Does the parsing of the element, and inserts information about the element into the passed BeanDefinitionBuilder.
`protected java.lang.Class<?>` | `getBeanClass(org.w3c.dom.Element element)`
`java.lang.String[]` | `getCustomAttrs()`
`java.lang.String[]` | `getCustomElements()`
`java.lang.String` | `getId()`
`boolean` | `getIsAbstract()`
`java.lang.String` | `getParentBeanId()`
`protected void` | `parseArgElements(java.lang.String elemName, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Element parsing method for multi-assign elements, which are passed using a List (e.g.
`protected void` | `parseAttributes(java.lang.String[] attributeNames, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Parses attributes from an element, setting them as properties in a bean definition builder.
`protected void` | `parseAttributesAsBeanReferences(java.lang.String[] attributeNames, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Parses attributes from an element, setting them as bean references in a bean definition builder.
`protected void` | `parseAttributesAsBeanReferences(java.lang.String attributeName, java.lang.String propertyName, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Parses attributes from an element, setting them as bean references in a bean definition builder.
`protected void` | `parseChildElements(java.lang.String elemName, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Element parsing method for child elements.
`protected void` | `parseClasspath(org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Element parsing method for multi-assign elements, which are passed using a List (e.g.
`protected void` | `parseElements(java.lang.String[] elementNames, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Parses child elements from an element, setting them as properties in a bean definition builder.
`protected org.springframework.beans.factory.support.AbstractBeanDefinition` | `parseInternal(org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext)` Creates a `BeanDefinitionBuilder` instance for the `bean Class` and passes it to the `doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)` strategy method.
`protected void` | `parseListElements(java.lang.String listName, java.lang.String elemName, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Element parsing method for multi-assign elements, which are passed using a List
`protected void` | `parsePropertyElements(java.lang.String elemName, org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)` Element parsing method for multi-assign elements that are passed using a Map (e.g.
`protected java.lang.String` | `resolveId(org.w3c.dom.Element element, org.springframework.beans.factory.support.AbstractBeanDefinition definition, org.springframework.beans.factory.xml.ParserContext parserContext)` Resolve the ID for the supplied `BeanDefinition`.
`void` | `setBeanClass(java.lang.Class<?> newClass)`
`void` | `setCustomAttrs(java.lang.String[] attrs)`
`void` | `setCustomElements(java.lang.String[] elems)`
`void` | `setId(java.lang.String ID)`
`void` | `setIsAbstract(boolean ab)`
`void` | `setParentBeanId(java.lang.String parent)`

Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
`parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EacElementDefinitionParser

    public EacElementDefinitionParser()

Method Detail

### setId

    public void setId(java.lang.String ID)

### getId

    public java.lang.String getId()

### setParentBeanId

    public void setParentBeanId(java.lang.String parent)

### getParentBeanId

    public java.lang.String getParentBeanId()

### setBeanClass

    public void setBeanClass(java.lang.Class<?> newClass)

### getBeanClass

    protected java.lang.Class<?> getBeanClass(org.w3c.dom.Element element)

### setIsAbstract

    public void setIsAbstract(boolean ab)

### getIsAbstract

    public boolean getIsAbstract()

### setCustomAttrs

    public void setCustomAttrs(java.lang.String[] attrs)

### getCustomAttrs

    public java.lang.String[] getCustomAttrs()

### setCustomElements

    public void setCustomElements(java.lang.String[] elems)

### getCustomElements

    public java.lang.String[] getCustomElements()

### parseInternal

    protected org.springframework.beans.factory.support.AbstractBeanDefinition parseInternal(org.w3c.dom.Element element,
                                                                                             org.springframework.beans.factory.xml.ParserContext parserContext)

  Creates a `BeanDefinitionBuilder` instance for the `bean Class` and passes it to the `doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)` strategy method.

  Specified by:
    `parseInternal` in class `org.springframework.beans.factory.xml.AbstractBeanDefinitionParser`
  Parameters:
    `element` - the element that is to be parsed into a single BeanDefinition
    `parserContext` - the object encapsulating the current state of the parsing process
  Returns:
    the BeanDefinition resulting from the parsing of the supplied `Element`
  Throws:
    `java.lang.IllegalStateException` - if the bean `Class` returned from `getBeanClass(org.w3c.dom.Element)` is `null`
  See Also:
    `doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)`

### doParse

    protected void doParse(org.w3c.dom.Element element,
                           org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Does the parsing of the element, and inserts information about the element into the passed BeanDefinitionBuilder.

### parseAttributes

    protected void parseAttributes(java.lang.String[] attributeNames,
                                   org.w3c.dom.Element element,
                                   org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Parses attributes from an element, setting them as properties in a bean definition builder.

  Parameters:
    `attributeNames` - Array of attribute names to parse from the element.
    `element` - Element to parse.
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parseAttributesAsBeanReferences

    protected void parseAttributesAsBeanReferences(java.lang.String[] attributeNames,
                                                   org.w3c.dom.Element element,
                                                   org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Parses attributes from an element, setting them as bean references in a bean definition builder.

  Parameters:
    `attributeNames` - Array of attribute names to parse from the element.
    `element` - Element to parse.
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parseAttributesAsBeanReferences

    protected void parseAttributesAsBeanReferences(java.lang.String attributeName,
                                                   java.lang.String propertyName,
                                                   org.w3c.dom.Element element,
                                                   org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Parses attributes from an element, setting them as bean references in a bean definition builder.

  Parameters:
    `attributeName` - Array of attribute names to parse from the element.
    `element` - Element to parse.
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parseElements

    protected void parseElements(java.lang.String[] elementNames,
                                 org.w3c.dom.Element element,
                                 org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Parses child elements from an element, setting them as properties in a bean definition builder.

  Parameters:
    `elementNames` - Array of element names to parse from the element.
    `element` - Element to parse.
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parsePropertyElements

    protected void parsePropertyElements(java.lang.String elemName,
                                         org.w3c.dom.Element element,
                                         org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Element parsing method for multi-assign elements that are passed using a Map (e.g. "properties" and "customDirectories")

  Parameters:
    `elemName` - Name of the child element to parse.
    `element` - Element to parse
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parseArgElements

    protected void parseArgElements(java.lang.String elemName,
                                    org.w3c.dom.Element element,
                                    org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Element parsing method for multi-assign elements, which are passed using a List (e.g. "args" and "java-options")

  Parameters:
    `elemName` - Name of the child element to parse.
    `element` - Element to parse
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parseClasspath

    protected void parseClasspath(org.w3c.dom.Element element,
                                  org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Element parsing method for multi-assign elements, which are passed using a List (e.g. "args" and "java-options")

  Parameters:
    `elemName` - Name of the child element to parse.
    `element` - Element to parse
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parseListElements

    protected void parseListElements(java.lang.String listName,
                                     java.lang.String elemName,
                                     org.w3c.dom.Element element,
                                     org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Element parsing method for multi-assign elements, which are passed using a List

  Parameters:
    `listName` - Name of the parent element to parse.
    `elemName` - Name of the child element to parse.
    `element` - Element to parse
    `bean` - BeanDefinitionBuilder to which parsed properties are added.

### parseChildElements

    protected void parseChildElements(java.lang.String elemName,
                                      org.w3c.dom.Element element,
                                      org.springframework.beans.factory.support.BeanDefinitionBuilder bean)

  Element parsing method for child elements.

  Parameters:
    `element` - Element to parse
    `bean` - BeanDefinitionBuilder to which parsed child object references are added.

### resolveId

    protected java.lang.String resolveId(org.w3c.dom.Element element,
                                         org.springframework.beans.factory.support.AbstractBeanDefinition definition,
                                         org.springframework.beans.factory.xml.ParserContext parserContext)
                                  throws org.springframework.beans.factory.BeanDefinitionStoreException

  Resolve the ID for the supplied `BeanDefinition`.

  When using `generation`, a name is generated automatically. Otherwise, the ID is extracted from the "id" attribute, potentially with a `fallback` to a generated id.

  Overrides:
    `resolveId` in class `org.springframework.beans.factory.xml.AbstractBeanDefinitionParser`
  Parameters:
    `element` - the element that the bean definition has been built from
    `definition` - the bean definition to be registered
    `parserContext` - the object encapsulating the current state of the parsing process; provides access to a `BeanDefinitionRegistry`
  Returns:
    the resolved id
  Throws:
    `org.springframework.beans.factory.BeanDefinitionStoreException` - if no unique name could be generated for the given bean definition

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| EAC Handlers 3.2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006, 2012, Oracle and/or its affiliates. All rights reserved.

    @VERSION
    PRODUCT: EAC Handlers (eacHandlers)
    VERSION: 3.2.2
    BUILD:   NONEDEV
    ARCH_OS: n/a
    DATE:    2012-02-28T13:13:26-0500