Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r37 - trunk: src/main/java/com/artilekt/modules/spring src/main/java/com/artilekt/modules/spring/config src/test/java/com/artilekt/modules/spring www

jetmailer
Discussion topic

Back to topic list

svn commit: r37 - trunk: src/main/java/com/artilekt/modules/spring src/main/java/com/artilekt/modules/spring/config src/test/java/com/artilekt/modules/spring www

Reply

Author volenin
Full name Vladimir Olenin
Date 2006-09-24 13:30:55 PDT
Message Author: volenin
Date: 2006-09-24 13:30:55-0700
New Revision: 37

Added:
   trunk/src/main/java/​com/artilekt/modules​/spring/config/
   trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanD​efinitionConfigurer.​java
   trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanD​efinitionVisitor.jav​a
   trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanN​ameResolutionConfigu​rer.java
      - copied, changed from r35, /trunk/src/main/java​/com/artilekt/module​s/spring/BeanNameRes​olutionConfigurer.ja​va
   trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanR​eferenceExternalFact​oryBean.java
   trunk/src/main/java/​com/artilekt/modules​/spring/config/Filte​redBeanDefinitionVis​itor.java
Removed:
   trunk/src/main/java/​com/artilekt/modules​/spring/BeanNameReso​lutionConfigurer.jav​a
Modified:
   trunk/src/test/java/​com/artilekt/modules​/spring/BeanNameReso​lutionConfigurerTest​.java
   trunk/src/test/java/​com/artilekt/modules​/spring/test-beans.x​ml
   trunk/src/test/java/​com/artilekt/modules​/spring/test-beansSe​rvice.xml
   trunk/www/index.html

Log:


Removed: trunk/src/main/java/​com/artilekt/modules​/spring/BeanNameReso​lutionConfigurer.jav​a
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/main/java/com/arti​lekt/modules/spring/​BeanNameResolutionCo​nfigurer.java?view=a​uto&rev=36

Added: trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanD​efinitionConfigurer.​java
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/main/java/com/arti​lekt/modules/spring/​config/BeanDefinitio​nConfigurer.java?vie​w=auto&rev=37
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanD​efinitionConfigurer.​java 2006-09-24 13:30:55-0700
@@ -0,0 +1,51 @@
+package com.artilekt.modules​.spring.config;
+
+import org.springframework.​beans.BeansException​;
+import org.springframework.​beans.factory.BeanDe​finitionStoreExcepti​on;
+import org.springframework.​beans.factory.BeanFa​ctory;
+import org.springframework.​beans.factory.BeanFa​ctoryAware;
+import org.springframework.​beans.factory.BeanNa​meAware;
+import org.springframework.​beans.factory.config​.BeanDefinition;
+import org.springframework.​beans.factory.config​.BeanFactoryPostProc​essor;
+import org.springframework.​beans.factory.config​.ConfigurableListabl​eBeanFactory;
+
+/**
+ * Author: Vladimir Olenin
+ * Date: 24-Sep-2006
+ * Time: 12:10:25
+ */
+public abstract class BeanDefinitionConfigurer
+ implements BeanFactoryPostProcessor, BeanNameAware, BeanFactoryAware {
+ protected String beanName;
+ protected BeanFactory beanFactory;
+
+
+ public void postProcessBeanFacto​ry(ConfigurableLista​bleBeanFactory beanFactoryToProcess) throws BeansException {
+ String[] beanNames = beanFactoryToProcess​.getBeanDefinitionNa​mes();
+ BeanDefinitionVisitor visitor = generateBeanDefiniti​onVisitor();
+ for (int i = 0; i < beanNames.length; i++) {
+ if (!(beanNames[i].equa​ls(this.beanName) && beanFactoryToProcess​.equals(this.beanFac​tory))) {
+ BeanDefinition bd = beanFactoryToProcess​.getBeanDefinition(b​eanNames[i]);
+ try {
+ visitor.visitBeanDef​inition(bd);
+ }
+ catch (BeanDefinitionStoreException ex) {
+ throw new BeanDefinitionStoreE​xception(bd.getResou​rceDescription(), beanNames[i], ex.getMessage());
+ }
+ }
+ }
+ }
+
+
+ protected abstract BeanDefinitionVisitor generateBeanDefiniti​onVisitor();
+
+ //========= Spring Container Lifecycle interfaces =========//
+ public void setBeanName(String name) {
+ this.beanName = name;
+ }
+
+ public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
+ this.beanFactory = beanFactory;
+ }
+
+}

Added: trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanD​efinitionVisitor.jav​a
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/main/java/com/arti​lekt/modules/spring/​config/BeanDefinitio​nVisitor.java?view=a​uto&rev=37
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanD​efinitionVisitor.jav​a 2006-09-24 13:30:55-0700
@@ -0,0 +1,172 @@
+package com.artilekt.modules​.spring.config;
+
+
+import org.springframework.​beans.MutablePropert​yValues;
+import org.springframework.​beans.PropertyValue;​
+import org.springframework.​beans.factory.config​.*;
+import org.springframework.​util.ObjectUtils;
+
+import java.util.*;
+
+/**
+ * Visitor base class for traversing BeanDefinition objects and the
+ * MutablePropertyValues and ConstructorArgumentValues contained in them.
+ * <p/>
+ * <p>The abstract <code>resolveS​tringValue</code​> method has to be implemented
+ * in concrete subclasses, following arbitrary resolution strategies.
+ * <p/>
+ * <p>Used by PropertyPlaceholderConfigurer to parse all String values
+ * contained in a BeanDefinition, resolving any placeholders found.
+ *
+ * @author Vladimir Olenin, Juergen Hoeller
+ * @see org.springframework.​beans.factory.config​.BeanDefinition
+ * @see org.springframework.​beans.factory.config​.BeanDefinition#getP​ropertyValues
+ * @see org.springframework.​beans.factory.config​.BeanDefinition#getC​onstructorArgumentVa​lues
+ * @see #resolveStringValue(String)
+ * @see org.springframework.​beans.factory.config​.PropertyPlaceholder​Configurer
+ * @since 1.2
+ */
+public abstract class BeanDefinitionVisitor {
+
+ /**
+ * Traverse the given BeanDefinition object and the MutablePropertyValues
+ * and ConstructorArgumentValues contained in them.
+ *
+ * @param beanDefinition the BeanDefinition object to traverse
+ * @see #resolveStringValue(String)
+ */
+ public void visitBeanDefinition(​BeanDefinition beanDefinition) {
+ MutablePropertyValues pvs = beanDefinition.getPr​opertyValues();
+ if (pvs != null) {
+ visitPropertyValues(pvs);
+ }
+ ConstructorArgumentValues cas = beanDefinition.getCo​nstructorArgumentVal​ues();
+ if (cas != null) {
+ visitIndexedArgument​Values(cas.getIndexe​dArgumentValues());
+ visitGenericArgument​Values(cas.getGeneri​cArgumentValues());
+ }
+ }
+
+ protected void visitPropertyValues(​MutablePropertyValue​s pvs) {
+ PropertyValue[] pvArray = pvs.getPropertyValues();
+ for (int i = 0; i < pvArray.length; i++) {
+ PropertyValue pv = pvArray[i];
+ Object newVal = resolveValue(pv.getValue());
+ if (!ObjectUtils.nullSa​feEquals(newVal, pv.getValue())) {
+ pvs.addPropertyValue​(pv.getName(), newVal);
+ }
+ }
+ }
+
+ protected void visitIndexedArgumentValues(Map ias) {
+ for (Iterator it = ias.values().iterator(); it.hasNext();) {
+ ConstructorArgumentV​alues.ValueHolder valueHolder =
+ (ConstructorArgument​Values.ValueHolder)i​t.next();
+ Object newVal = resolveValue(valueHo​lder.getValue());
+ if (!ObjectUtils.nullSa​feEquals(newVal, valueHolder.getValue())) {
+ valueHolder.setValue(newVal);
+ }
+ }
+ }
+
+ protected void visitGenericArgumentValues(List gas) {
+ for (Iterator it = gas.iterator(); it.hasNext();) {
+ ConstructorArgumentV​alues.ValueHolder valueHolder =
+ (ConstructorArgument​Values.ValueHolder)i​t.next();
+ Object newVal = resolveValue(valueHo​lder.getValue());
+ if (!ObjectUtils.nullSa​feEquals(newVal, valueHolder.getValue())) {
+ valueHolder.setValue(newVal);
+ }
+ }
+ }
+
+ protected Object resolveValue(Object value) {
+ if (value instanceof BeanDefinition) {
+ visitBeanDefinition(​(BeanDefinition)valu​e);
+ }
+ else if (value instanceof BeanDefinitionHolder) {
+ visitBeanDefinition(​((BeanDefinitionHold​er)value).getBeanDef​inition());
+ }
+ else if (value instanceof RuntimeBeanReference) {
+ RuntimeBeanReference ref = (RuntimeBeanReference)value;
+ Object newBeanRef = resolveRuntimeBeanRe​ference(ref);
+ if (!newBeanRef.equals(ref)) {
+ return newBeanRef;
+ }
+ }
+ else if (value instanceof List) {
+ visitList((List)value);
+ }
+ else if (value instanceof Set) {
+ visitSet((Set)value);
+ }
+ else if (value instanceof Map) {
+ visitMap((Map)value);
+ }
+ else if (value instanceof TypedStringValue) {
+ TypedStringValue typedStringValue = (TypedStringValue)value;
+ String visitdString = resolveStringValue(t​ypedStringValue.getV​alue());
+ typedStringValue.set​Value(visitdString);​
+ }
+ else if (value instanceof String) {
+ return resolveStringValue((​String)value);
+ }
+ return value;
+ }
+
+ protected void visitList(List listVal) {
+ for (int i = 0; i < listVal.size(); i++) {
+ Object elem = listVal.get(i);
+ Object newVal = resolveValue(elem);
+ if (!ObjectUtils.nullSa​feEquals(newVal, elem)) {
+ listVal.set(i, newVal);
+ }
+ }
+ }
+
+ protected void visitSet(Set setVal) {
+ for (Iterator it = new HashSet(setVal).iterator(); it.hasNext();) {
+ Object elem = it.next();
+ Object newVal = resolveValue(elem);
+ if (!ObjectUtils.nullSa​feEquals(newVal, elem)) {
+ setVal.remove(elem);
+ setVal.add(newVal);
+ }
+ }
+ }
+
+ protected void visitMap(Map mapVal) {
+ for (Iterator it = new HashMap(mapVal).entr​ySet().iterator(); it.hasNext();) {
+ Map.Entry entry = (Map.Entry)it.next();
+ Object key = entry.getKey();
+ Object newKey = resolveValue(key);
+ boolean isNewKey = !ObjectUtils.nullSaf​eEquals(key, newKey);
+ Object val = entry.getValue();
+ Object newVal = resolveValue(val);
+ if (isNewKey) {
+ mapVal.remove(key);
+ }
+ if (isNewKey || !ObjectUtils.nullSaf​eEquals(newVal, val)) {
+ mapVal.put(newKey, newVal);
+ }
+ }
+ }
+
+ /**
+ * Resolve the given String value, for example parsing placeholders.
+ *
+ * @param strVal the original String value
+ * @return the resolved String value
+ */
+ protected abstract String resolveStringValue(String strVal);
+
+ /**
+ * Resolve the given RuntimeBeanReference value.
+ *
+ * @param ref the original RuntimeBeanReference value
+ * @return the resolved String value
+ */
+ protected abstract Object resolveRuntimeBeanRe​ference(RuntimeBeanR​eference ref);
+
+
+}

Copied: trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanN​ameResolutionConfigu​rer.java (from r35, /trunk/src/main/java​/com/artilekt/module​s/spring/BeanNameRes​olutionConfigurer.ja​va)
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/main/java/com/arti​lekt/modules/spring/​config/BeanNameResol​utionConfigurer.java​?view=diff&rev=3​7&p1=/trunk/src/​main/java/com/artile​kt/modules/spring/Be​anNameResolutionConf​igurer.java&p2=t​runk/src/main/java/c​om/artilekt/modules/​spring/config/BeanNa​meResolutionConfigur​er.java&r1=35​&r2=37
====================​====================​====================​==================
--- /trunk/src/main/java​/com/artilekt/module​s/spring/BeanNameRes​olutionConfigurer.ja​va (original)
+++ trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanN​ameResolutionConfigu​rer.java 2006-09-24 13:30:55-0700
@@ -1,16 +1,93 @@
-package com.artilekt.modules.spring;
+package com.artilekt.modules​.spring.config;
 
-import org.springframework.​beans.BeansException​;
-import org.springframework.​beans.factory.config​.BeanFactoryPostProc​essor;
-import org.springframework.​beans.factory.config​.ConfigurableListabl​eBeanFactory;
+import org.springframework.​beans.MutablePropert​yValues;
+import org.springframework.​beans.factory.BeanIn​itializationExceptio​n;
+import org.springframework.​beans.factory.config​.BeanDefinitionHolde​r;
+import org.springframework.​beans.factory.config​.RuntimeBeanReferenc​e;
+import org.springframework.​beans.factory.suppor​t.AbstractBeanDefini​tion;
+import org.springframework.​beans.factory.suppor​t.BeanDefinitionRead​erUtils;
+import org.springframework.​beans.factory.suppor​t.RootBeanDefinition​;
+import org.springframework.​util.ClassUtils;
+import org.springframework.​util.ObjectUtils;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * Author: Vladimir Olenin
  * Date: 21-Sep-2006
  * Time: 22:11:57
  */
-public class BeanNameResolutionConfigurer implements BeanFactoryPostProcessor {
- public void postProcessBeanFacto​ry(ConfigurableLista​bleBeanFactory beanFactory) throws BeansException {
- System.out.println("beanFactory = "+beanFactory);
+public class BeanNameResolutionConfigurer extends BeanDefinitionConfigurer {
+ public final static String BEAN_REF_FACTORY_BEAN = "com.artilekt.module​s.spring.config.Bean​ReferenceExternalFac​toryBean";
+ public final static String BEAN_NAME_PATTERN = "([^@]+)@(.+)";
+ public final static String BEAN_NAME_STRING = "$1";
+ public final static String BEAN_FACTORY_NAME_STRING = "$2";
+
+ private Pattern beanNamePattern = Pattern.compile(BEAN​_NAME_PATTERN);
+ private String beanNameString = BEAN_NAME_STRING;
+ private String beanFactoryString = BEAN_FACTORY_NAME_STRING;
+
+ public BeanNameResolutionConfigurer() {}
+
+ protected Object processBeanReference​(RuntimeBeanReferenc​e ref, Matcher matcher) {
+ String beanName = matcher.replaceAll(b​eanNameString);
+ String factoryName = matcher.replaceAll(b​eanFactoryString);
+
+ AbstractBeanDefinition beanDefinition = generateBeanDefinition();
+
+ MutablePropertyValues propertyValues = new MutablePropertyValues();
+ propertyValues.addPr​opertyValue("beanNam​e", beanName);
+ RuntimeBeanReference beanRef = new RuntimeBeanReference​(factoryName);
+ propertyValues.addPr​opertyValue("beanFac​tory", beanRef);
+ beanDefinition.setPr​opertyValues(propert​yValues);
+
+ String lookupBeanName = generateBeanName(bea​nDefinition);
+ return new BeanDefinitionHolder​(beanDefinition, lookupBeanName);
+ }
+
+
+ protected String generateBeanName(Abs​tractBeanDefinition beanDefinition) {
+ return beanDefinition.getBe​anClassName() +
+ BeanDefinitionReader​Utils.GENERATED_BEAN​_NAME_SEPARATOR +
+ ObjectUtils.getIdent​ityHexString(beanDef​inition);
+ }
+
+ protected AbstractBeanDefinition generateBeanDefinition() {
+ try {
+ Class beanClass = ClassUtils.forName(B​EAN_REF_FACTORY_BEAN​);
+ return new RootBeanDefinition(beanClass);
+ }
+ catch (ClassNotFoundException ex) {
+ throw new BeanInitializationException(
+ "Could not load required class [" + BEAN_REF_FACTORY_BEAN + "] BeanNameResolutionConfigurer", ex);
+ }
   }
+
+
+ protected BeanDefinitionVisitor generateBeanDefinitionVisitor() {
+ return new FilteredBeanDefiniti​onVisitor(this.beanN​amePattern) {
+ protected String resolveStringValue(String strVal, Matcher matcher) {
+ return strVal;
+ }
+
+ protected Object resolveRuntimeBeanRe​ference(RuntimeBeanR​eference ref, Matcher matcher) {
+ return processBeanReference(ref, matcher);
+ }
+ };
+ }
+
+ //========= Bean Setup =========//
+ public void setBeanNamePattern(String beanNamePattern) {
+ this.beanNamePattern = Pattern.compile(bean​NamePattern);
+ }
+
+ public void setBeanNameString(String beanNameString) {
+ this.beanNameString = beanNameString;
+ }
+
+ public void setBeanFactoryString(String beanFactoryString) {
+ this.beanFactoryString = beanFactoryString;
+ }
+
 }

Added: trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanR​eferenceExternalFact​oryBean.java
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/main/java/com/arti​lekt/modules/spring/​config/BeanReference​ExternalFactoryBean.​java?view=auto&r​ev=37
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/main/java/​com/artilekt/modules​/spring/config/BeanR​eferenceExternalFact​oryBean.java 2006-09-24 13:30:55-0700
@@ -0,0 +1,52 @@
+package com.artilekt.modules​.spring.config;
+
+import org.springframework.​beans.BeansException​;
+import org.springframework.​beans.factory.BeanFa​ctory;
+import org.springframework.​beans.factory.Factor​yBean;
+import org.springframework.​beans.factory.Initia​lizingBean;
+import org.springframework.​beans.factory.NoSuch​BeanDefinitionExcept​ion;
+
+/**
+ * Author: Vladimir Olenin
+ * Date: 23-Sep-2006
+ * Time: 12:12:43
+ */
+public class BeanReferenceExterna​lFactoryBean implements FactoryBean, InitializingBean {
+ private String beanName;
+ private BeanFactory beanFactory;
+
+ public void afterPropertiesSet() throws Exception {
+ if (this.beanName == null || this.beanFactory == null) {
+ throw new IllegalArgumentExcep​tion("beanName is required");
+ }
+ if (!this.beanFactory.c​ontainsBean(this.bea​nName)) {
+ throw new NoSuchBeanDefinition​Exception(this.beanN​ame, this.beanFactory.toString());
+ }
+ }
+
+ public Object getObject() throws BeansException {
+ return this.beanFactory.get​Bean(this.beanName);​
+ }
+
+ public Class getObjectType() {
+ return this.beanFactory.get​Type(this.beanName);​
+ }
+
+ public boolean isSingleton() {
+ return this.beanFactory.isS​ingleton(this.beanNa​me);
+ }
+
+ //============= Bean Setup ===============//
+ /**
+ * Set the name of the target bean,
+ * potentially in a different bean definition file.
+ */
+ public void setBeanName(String beanName) {
+ this.beanName = beanName;
+ }
+
+ public void setBeanFactory(BeanFactory beanFactory) {
+ this.beanFactory = beanFactory;
+ }
+
+}

Added: trunk/src/main/java/​com/artilekt/modules​/spring/config/Filte​redBeanDefinitionVis​itor.java
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/main/java/com/arti​lekt/modules/spring/​config/FilteredBeanD​efinitionVisitor.jav​a?view=auto&rev=​37
====================​====================​====================​==================
--- (empty file)
+++ trunk/src/main/java/​com/artilekt/modules​/spring/config/Filte​redBeanDefinitionVis​itor.java 2006-09-24 13:30:55-0700
@@ -0,0 +1,38 @@
+package com.artilekt.modules​.spring.config;
+
+import org.springframework.​beans.factory.config​.RuntimeBeanReferenc​e;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Author: Vladimir Olenin
+ * Date: 24-Sep-2006
+ * Time: 13:01:53
+ */
+public abstract class FilteredBeanDefinitionVisitor extends BeanDefinitionVisitor {
+ protected Pattern pattern;
+ private Matcher matcher;
+
+ protected FilteredBeanDefiniti​onVisitor(Pattern pattern) {
+ this.pattern = pattern;
+ matcher = pattern.matcher("");
+ }
+
+ protected String resolveStringValue(String strVal) {
+ matcher.reset(strVal);
+ if (matcher.matches()) return resolveStringValue(strVal, matcher);
+ else return strVal;
+ }
+
+ protected Object resolveRuntimeBeanRe​ference(RuntimeBeanR​eference ref) {
+ matcher.reset(ref.ge​tBeanName());
+ if (matcher.matches()) return resolveRuntimeBeanRe​ference(ref, matcher);
+ else return ref;
+ }
+
+ protected abstract String resolveStringValue(String strVal, Matcher matcher);
+
+ protected abstract Object resolveRuntimeBeanRe​ference(RuntimeBeanR​eference ref, Matcher matcher);
+
+}

Modified: trunk/src/test/java/​com/artilekt/modules​/spring/BeanNameReso​lutionConfigurerTest​.java
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/test/java/com/arti​lekt/modules/spring/​BeanNameResolutionCo​nfigurerTest.java?vi​ew=diff&rev=37​&p1=trunk/src/test​/java/com/artilekt/m​odules/spring/BeanNa​meResolutionConfigur​erTest.java&p2=t​runk/src/test/java/c​om/artilekt/modules/​spring/BeanNameResol​utionConfigurerTest.​java&r1=36&r​2=37
====================​====================​====================​==================
--- trunk/src/test/java/​com/artilekt/modules​/spring/BeanNameReso​lutionConfigurerTest​.java (original)
+++ trunk/src/test/java/​com/artilekt/modules​/spring/BeanNameReso​lutionConfigurerTest​.java 2006-09-24 13:30:55-0700
@@ -23,6 +23,12 @@
 
     obj = fac.getBean("testBeanService");
     System.out.println("fac obj = " + obj);
+
+ obj = factory.getBean("tes​tBeanService");
+ System.out.println("obj service = " + obj);
+
+ obj = factory.getBean("testBean4");
+ System.out.println("obj service = " + obj);
   }
 
 }

Modified: trunk/src/test/java/​com/artilekt/modules​/spring/test-beans.x​ml
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/test/java/com/arti​lekt/modules/spring/​test-beans.xml?view=​diff&rev=37&​p1=trunk/src/test/ja​va/com/artilekt/modu​les/spring/test-bean​s.xml&p2=trunk/s​rc/test/java/com/art​ilekt/modules/spring​/test-beans.xml&​r1=36&r2=37
====================​====================​====================​==================
--- trunk/src/test/java/​com/artilekt/modules​/spring/test-beans.x​ml (original)
+++ trunk/src/test/java/​com/artilekt/modules​/spring/test-beans.x​ml 2006-09-24 13:30:55-0700
@@ -2,10 +2,36 @@
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springfra​mework.org/dtd/sprin​g-beans.dtd">
 
 <beans>
- <bean id="configurer" class="com.artilekt.​modules.spring.BeanN​ameResolutionConfigu​rer"/>
+ <bean id="configurer" class="com.artilekt.​modules.spring.confi​g.BeanNameResolution​Configurer"/>
 
- <bean id="testBean" class="java.lang.String">
+ <bean id="testBean4" class="com.artilekt.​modules.spring.TestC​lass">
+ <constructor-arg value="Test Bean4"/>
+ <property name="linkedTestClass" ref="testBeanService​@com.artilekt.module​s.spring.test"/>
+ </bean>
+
+
+ <bean id="testBean" class="com.artilekt.​modules.spring.TestC​lass">
     <constructor-arg value="Test Bean"/>
   </bean>
 
+ <bean id="testBean2" class="com.artilekt.​modules.spring.TestC​lass">
+ <constructor-arg value="Test Bean2"/>
+ <property name="linkedTestClass" ref="testBean2"/>
+ </bean>
+
+ <bean id="testBean3" class="com.artilekt.​modules.spring.TestC​lass">
+ <constructor-arg value="Test Bean3"/>
+ <property name="linkedTestClass">
+ <bean class="com.artilekt.​modules.spring.confi​g.BeanReferenceExter​nalFactoryBean">
+ <property name="beanFactory" ref="com.artilekt.mo​dules.spring.test"/​>
+ <property name="beanName" value="testBeanService"/>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="testBeanService" class="com.artilekt.​modules.spring.confi​g.BeanReferenceExter​nalFactoryBean">
+ <property name="beanFactory" ref="com.artilekt.mo​dules.spring.test"/​>
+ <property name="beanName" value="testBeanService"/>
+ </bean>
+
 </beans>

Modified: trunk/src/test/java/​com/artilekt/modules​/spring/test-beansSe​rvice.xml
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/sr​c/test/java/com/arti​lekt/modules/spring/​test-beansService.xm​l?view=diff&rev=​37&p1=trunk/src/​test/java/com/artile​kt/modules/spring/te​st-beansService.xml​&p2=trunk/src/tes​t/java/com/artilekt/​modules/spring/test-​beansService.xml​&r1=36&r2=37
====================​====================​====================​==================
--- trunk/src/test/java/​com/artilekt/modules​/spring/test-beansSe​rvice.xml (original)
+++ trunk/src/test/java/​com/artilekt/modules​/spring/test-beansSe​rvice.xml 2006-09-24 13:30:55-0700
@@ -2,7 +2,7 @@
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springfra​mework.org/dtd/sprin​g-beans.dtd">
 
 <beans>
- <bean id="testBeanService" class="java.lang.String">
+ <bean id="testBeanService" class="com.artilekt.​modules.spring.TestC​lass">
     <constructor-arg value="Test Bean Service"/>
   </bean>
 

Modified: trunk/www/index.html
Url: http://jetmailer.tig​ris.org/source/brows​e/jetmailer/trunk/ww​w/index.html?view=di​ff&rev=37&p1​=trunk/www/index.htm​l&p2=trunk/www/i​ndex.html&r1=36​&r2=37
====================​====================​====================​==================
--- trunk/www/index.html (original)
+++ trunk/www/index.html 2006-09-24 13:30:55-0700
@@ -1,107 +1,124 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
- <style type="text/css">
+
+ <style type="text/css">
 /* <![CDATA[ */
 @import "http://www.tigris.or​g/branding/css/tigri​s.css";
 @import "http://www.tigris.or​g/branding/css/inst.​css";
-/* ]]> */
- </style>
- <link rel="stylesheet" type="text/css" href="http://www.tigris.or​g/branding/css/print​.css" media="print" />
-<script src="http://www.tigris.or​g/branding/scripts/t​igris.js" type="text/javascript">
-</script>
- <title>Project Overview</title>
-</head>
-<body>
-
-<p>Here is the first modification...</p>
-
-<p>This is the initial web content for your project. Please customize
-this to fit your project. You don't need to answer all these questions
-or follow this exact format, but we do like to see this kind of
-information before we approve projects for public viewing.
-</p>
-
-<p>Until your project is approved, only you can view it and work on
-it.
-</p>
+/* ]]> */
+ </style>
+ <link rel="stylesheet" type="text/css" href="http://www.tigris.or​g/branding/css/print​.css" media="print">
+
+ <script src="http://www.tigris.or​g/branding/scripts/t​igris.js" type="text/javascript">
+ </script>
+ <title>Project Overview</title>
 
-<ul>
-<li>This index.html will be used if and only if you have the "Use
-Project Home Page" option checked on the "Administer Project" page
-(click the "Admin" tab).</li>
 
-<li>To edit this file, check out your project via CVS and edit www/index.html.
+</head>
 
-<li>You can 'cvs add' and commit other files under the project's "www"
-directory and they will published to your project web site.</li>
+<body>
 
-<li>Also, consider starting a thread in the "dev" mailing list to get
-these discussion started. A good one is an "introduction" thread where
-people post messages about themselves and their interest in the
-project.</li>
+<h3>Mission</h3>
 
-<li>You can add a "Highlights:" line to the top of all web pages by adding a file www/project_highlights.html </li>
-</ul>
+<p>This project is an attempt to create a modularized library of
+reusable components in Java. Spring Framework was chosen as a 'glue'
+that bootstraps the components together. Also, the IoC concepts are
+used throughout all libraries. The goal is, on one hand, promote the
+idea of lightweight, easily pluggable, highly customizable self
+contained modules; and on the other hand provide an example of how such
+systems can be architected and build. In a sense, it's also an
+experiment on effective remote team collaboration: it is a plan at some
+point to try out different eXtreme Programming PM tools (like XPlanner)
+as well as various collaboration solutions in order to improve project
+tracking.</p>
+
+<h3>Where is all the information can be found? </h3>
+
+<p>Currently we are trying to maintain most of the documentation
+through this <a href="http://jetmailer.wordpress.com/">blog</a>.
+In the near future, API, setup and module documentation should start to
+appear in the SVN in the 'static' redistributable format.</p>
+
+<h3>What is the project status?</h3>
+
+<p>As of September 2006 we are working towards the 1.0.0 release, the
+major 'runnable' component of which is the JetMailer. The new versions
+would be released 'as you go', once new modules/functionality are added
+to the library.</p>
+<h3>How can I help?</h3>
+<p>Definitely by contributing and sharing the ideas! Feel free to email
+us at "jqc at artilekt dot com" and we'll discuss it further.</p>
+<p></p>
 
+<p>For example:</p>
 
-<h3>Mission</h3>
+<ul>
 
-<p>What is the goal of this project?
-</p>
+ <li>Develop just enough functionality to scratch a particular
+itch</li>
 
-<p>What is the scope of this project?
-</p>
+ <li>Build a tool just like XYZ, but less broken</li>
 
-<p>For example:</p>
+ <li>Build the best XYZ-tool ever!</li>
 
-<ul>
-<li>Develop just enough functionality to scratch a particular itch</li>
-<li>Build a tool just like XYZ, but less broken</li>
-<li>Build the best XYZ-tool ever!</li>
 </ul>
 
-
 <p>What are high-level features you are sure to build?
 </p>
+
 <ul>
 
-<li>What would you write on a billboard about your project? Users
+ <li>What would you write on a billboard about your project?
+Users
 might only look for a few seconds.</li>
 
-<li>Use the issue tracker to track features and enhancement
+ <li>Use the issue tracker to track features and enhancement
 requests. It is not just for bugs, pre-populate it with feature
-descriptions so that potential contributors know what you would like them
+descriptions so that potential contributors know what you would like
+them
 to work on.</li>
+
 </ul>
 
-<p>What are the high-level assumptions or ground rules for the project?
+<p>What are the high-level assumptions or ground rules for the
+project?
 </p>
 
 <p>For example:
 </p>
 
 <ul>
-<li> we will use programming language X on operating system Y for now.
 
-<li>We will, or will not, consider certain functional areas like
-internationalization, high security, concurrency, etc. The list of
+ <li> we will use programming language X on operating system Y
+for now.
+ </li>
+
+ <li>We will, or will not, consider certain functional areas
+like
+internationalization, high security, concurrency, etc. The list of
 functional areas will depend on what you are trying to do.
+ </li>
 
-<li>Try to keep this part short.
-</ul>
+ <li>Try to keep this part short.
+ </li>
 
+</ul>
 
 <h3>Related resources</h3>
 
 <ul>
-<li>Link to other stuff that you know about. It will help you
+
+ <li>Link to other stuff that you know about. It will help you
 research requirements and provide a useful resource to potential
 contributors.</li>
 
-<li>Why reinvent the wheel? What is better about this wheel? Is there
+ <li>Why reinvent the wheel? What is better about this wheel? Is
+there
 any existing project that you can partner with or reuse?</li>
 
-<li>Where would you go to try to find potential contibutors?</li>
+ <li>Where would you go to try to find potential contibutors?</li>
+
 </ul>
 
 </body>

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r37 - trunk: src/main/java/com/artilekt/modules/spring src/main/java/com/artilekt/modules/spring/config src/test/java/com/artilekt/modules/spring www volenin Vladimir Olenin 2006-09-24 13:30:55 PDT
Messages per page: