org.apache.cocoon.spring.configurator.impl
Class WildcardBeanMap

java.lang.Object
  extended by org.apache.cocoon.spring.configurator.impl.BeanMap
      extended by org.apache.cocoon.spring.configurator.impl.WildcardBeanMap
All Implemented Interfaces:
Map<Object,Object>, BeanFactoryAware

public class WildcardBeanMap
extends BeanMap

Similar to the BeanMap it collects beans from a BeanFactory. But instead of checking the type of the bean, its bean name is matched against a wildcard expression (e.g. some.beans.*).

See Also:
BeanMap

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  String wildcard
           
 
Fields inherited from class org.apache.cocoon.spring.configurator.impl.BeanMap
beanClass, beanFactory, beanMap, checkParent, hasProperties, initialized, keyProperty, stripPrefix
 
Constructor Summary
WildcardBeanMap()
           
 
Method Summary
 String getWildcard()
           
protected  String[] lookupBeans(ListableBeanFactory factory)
          Find all beans that match the wildcard expression.
 void setWildcard(String wildcard)
           
protected  Object stripPrefix(String beanName)
           
 
Methods inherited from class org.apache.cocoon.spring.configurator.impl.BeanMap
checkInit, clear, containsKey, containsValue, entrySet, equals, get, getBeanNames, hashCode, isEmpty, keySet, load, put, putAll, remove, setBeanFactory, setCheckParent, setHasProperties, setKeyProperty, setStripPrefix, setType, size, toString, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

wildcard

protected String wildcard
Constructor Detail

WildcardBeanMap

public WildcardBeanMap()
Method Detail

getWildcard

public String getWildcard()

setWildcard

public void setWildcard(String wildcard)

lookupBeans

protected String[] lookupBeans(ListableBeanFactory factory)
Find all beans that match the wildcard expression. Expression resolving is done based on the default Spring wildcard pattern matching PatternMatchUtils.simpleMatch(String, String).

Overrides:
lookupBeans in class BeanMap
See Also:
BeanMap.lookupBeans(org.springframework.beans.factory.ListableBeanFactory)

stripPrefix

protected Object stripPrefix(String beanName)
Overrides:
stripPrefix in class BeanMap


Copyright © 1999-2009 The Apache Software Foundation. All Rights Reserved.