Package org.springframework.beans.factory.parsing

Examples of org.springframework.beans.factory.parsing.CompositeComponentDefinition



  public BeanDefinition parse(Element element, ParserContext parserContext) {
    Object source = parserContext.extractSource(element);

    CompositeComponentDefinition compDefinition = new CompositeComponentDefinition(element.getTagName(), source);
    parserContext.pushContainingComponent(compDefinition);
   
    RootBeanDefinition annMappingDef = new RootBeanDefinition(DefaultAnnotationHandlerMapping.class);
    annMappingDef.setSource(source);
    annMappingDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
View Full Code Here


    private void createConcurrencyControlFilterAndSessionRegistry(Element element) {
        final String ATT_EXPIRY_URL = "expired-url";
        final String ATT_SESSION_REGISTRY_ALIAS = "session-registry-alias";
        final String ATT_SESSION_REGISTRY_REF = "session-registry-ref";

        CompositeComponentDefinition compositeDef =
            new CompositeComponentDefinition(element.getTagName(), pc.extractSource(element));
        pc.pushContainingComponent(compositeDef);

        BeanDefinitionRegistry beanRegistry = pc.getRegistry();

        String sessionRegistryId = element.getAttribute(ATT_SESSION_REGISTRY_REF);
View Full Code Here

    private static final String ATT_ERASE_CREDENTIALS = "erase-credentials";

    public BeanDefinition parse(Element element, ParserContext pc) {
        Assert.state(!pc.getRegistry().containsBeanDefinition(BeanIds.AUTHENTICATION_MANAGER),
                "AuthenticationManager has already been registered!");
        pc.pushContainingComponent(new CompositeComponentDefinition(element.getTagName(), pc.extractSource(element)));

        BeanDefinitionBuilder providerManagerBldr = BeanDefinitionBuilder.rootBeanDefinition(ProviderManager.class);

        String alias = element.getAttribute(ATT_ALIAS);
View Full Code Here

    private static final String ATT_REF = "ref";
    private static final String ATT_MODE = "mode";
    private static final String ATT_ADVICE_ORDER = "order";

    public BeanDefinition parse(Element element, ParserContext pc) {
        CompositeComponentDefinition compositeDef =
            new CompositeComponentDefinition(element.getTagName(), pc.extractSource(element));
        pc.pushContainingComponent(compositeDef);

        Object source = pc.extractSource(element);
        // The list of method metadata delegates
        ManagedList<BeanMetadataElement> delegates = new ManagedList<BeanMetadataElement>();
View Full Code Here

  protected static final String PREFETCH_ATTRIBUTE = "prefetch";


  public BeanDefinition parse(Element element, ParserContext parserContext) {
    CompositeComponentDefinition compositeDef =
      new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element));
    parserContext.pushContainingComponent(compositeDef);

    NodeList childNodes = element.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
      Node child = childNodes.item(i);
View Full Code Here

     * <p>
     * By the end of this method, the default <tt>FilterChainProxy</tt> bean should have been registered and will have
     * the map of filter chains defined, with the "universal" match pattern mapped to the list of beans which have been parsed here.
     */
    public BeanDefinition parse(Element element, ParserContext pc) {
        CompositeComponentDefinition compositeDef =
            new CompositeComponentDefinition(element.getTagName(), pc.extractSource(element));
        pc.pushContainingComponent(compositeDef);
        final Object source = pc.extractSource(element);

        final String portMapperName = createPortMapper(element, pc);
        final UrlMatcher matcher = createUrlMatcher(element);
View Full Code Here

  /**
   * Return a {@link CompositeComponentDefinition} for this element.
   * @return the composite component definition
   */
  public CompositeComponentDefinition getComponentDefinition() {
    return new CompositeComponentDefinition(this.element.getTagName(), this.source);
  }
View Full Code Here

    assertThat(this.helper.getSource(), is(this.source));
  }

  @Test
  public void shouldGetComponentDefinition() throws Exception {
    CompositeComponentDefinition componentDefinition = this.helper.getComponentDefinition();
    assertThat(componentDefinition.getName(), is(this.tagName));
    assertThat(componentDefinition.getSource(), is(this.source));
  }
View Full Code Here

  private void handleRetryListenersElement(Element element, MutablePropertyValues propertyValues,
      ParserContext parserContext, BeanDefinition enclosing) {
    Element listenersElement = DomUtils.getChildElementByTagName(element, "retry-listeners");
    if (listenersElement != null) {
      CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(listenersElement.getTagName(),
          parserContext.extractSource(element));
      parserContext.pushContainingComponent(compositeDef);
      ManagedList<BeanMetadataElement> retryListenerBeans = new ManagedList<BeanMetadataElement>();
      retryListenerBeans.setMergeEnabled(listenersElement.hasAttribute(MERGE_ATTR)
          && Boolean.valueOf(listenersElement.getAttribute(MERGE_ATTR)));
View Full Code Here

    }

    List<Element> listenersElements = DomUtils.getChildElementsByTagName(element, "listeners");
    if (listenersElements.size() == 1) {
      Element listenersElement = listenersElements.get(0);
      CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(listenersElement.getTagName(),
          parserContext.extractSource(element));
      parserContext.pushContainingComponent(compositeDef);
      ManagedList<BeanDefinition> listeners = new ManagedList<BeanDefinition>();
      listeners.setMergeEnabled(listenersElement.hasAttribute(MERGE_ATTR)
          && Boolean.valueOf(listenersElement.getAttribute(MERGE_ATTR)));
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.parsing.CompositeComponentDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.