incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r365769 - in /incubator/graffito/trunk/jcr/spring: ./ conf/ conf/jcrmapping/ repo/ repo/repository/ repo/repository/nodetypes/ src/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/portals/ src/java/org/apache/portals/graffi...
Date Tue, 03 Jan 2006 23:20:08 GMT
Author: clombart
Date: Tue Jan  3 15:19:48 2006
New Revision: 365769

URL: http://svn.apache.org/viewcvs?rev=365769&view=rev
Log: (empty)

Added:
    incubator/graffito/trunk/jcr/spring/   (with props)
    incubator/graffito/trunk/jcr/spring/.classpath   (with props)
    incubator/graffito/trunk/jcr/spring/.project   (with props)
    incubator/graffito/trunk/jcr/spring/conf/
    incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml   (with props)
    incubator/graffito/trunk/jcr/spring/conf/jackrabbit-repo.xml   (with props)
    incubator/graffito/trunk/jcr/spring/conf/jcrmapping/
    incubator/graffito/trunk/jcr/spring/conf/jcrmapping/graffito-jcr-mapping.dtd   (with props)
    incubator/graffito/trunk/jcr/spring/conf/jcrmapping/jcrmapping.xml   (with props)
    incubator/graffito/trunk/jcr/spring/locator.ent   (with props)
    incubator/graffito/trunk/jcr/spring/locator.path   (with props)
    incubator/graffito/trunk/jcr/spring/maven.xml   (with props)
    incubator/graffito/trunk/jcr/spring/project.properties   (with props)
    incubator/graffito/trunk/jcr/spring/project.xml   (with props)
    incubator/graffito/trunk/jcr/spring/repo/
    incubator/graffito/trunk/jcr/spring/repo/repository/
    incubator/graffito/trunk/jcr/spring/repo/repository/nodetypes/
    incubator/graffito/trunk/jcr/spring/repo/repository/nodetypes/custom_nodetypes.xml   (with props)
    incubator/graffito/trunk/jcr/spring/src/
    incubator/graffito/trunk/jcr/spring/src/java/
    incubator/graffito/trunk/jcr/spring/src/java/log4j.properties   (with props)
    incubator/graffito/trunk/jcr/spring/src/java/org/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/application/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/application/Main.java   (with props)
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/ArticleService.java   (with props)
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/NewsService.java   (with props)
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/ArticleServiceImpl.java   (with props)
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/NewsServiceImpl.java   (with props)
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/Article.java   (with props)
    incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/News.java   (with props)

Propchange: incubator/graffito/trunk/jcr/spring/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan  3 15:19:48 2006
@@ -0,0 +1,2 @@
+
+target

Added: incubator/graffito/trunk/jcr/spring/.classpath
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/.classpath?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/.classpath (added)
+++ incubator/graffito/trunk/jcr/spring/.classpath Tue Jan  3 15:19:48 2006
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<classpath>
+  <classpathentry excluding="" kind="src" path="src/java">
+  </classpathentry>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/graffito/jars/graffito-commons-1.0-a1-dev.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/graffito/jars/graffito-jcr-mapping-1.0-a1-dev.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/springmodules/jars/springmodules-jcr-dev-20051212.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/springmodules/jars/springmodules-jcr-jackrabbit-dev-20051212.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/springmodules/jars/springmodules-sandbox-jcr-dev-20051212.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-full-2.0.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/org.apache.jackrabbit/jars/jackrabbit-1.0-SNAPSHOT.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/org.apache.jackrabbit/jars/jackrabbit-commons-1.0-SNAPSHOT.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/concurrent/jars/concurrent-1.3.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-jta-1.0-M1.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jsr170/jars/jcr-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/lucene/jars/lucene-1.4.3.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xercesImpl-2.6.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xmlParserAPIs-2.0.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/org.apache.derby/jars/derby-10.1.1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.7.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.1.jar">
+  </classpathentry>
+  <classpathentry kind="output" path="target/classes">
+  </classpathentry>
+</classpath>
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/.classpath
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/.project
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/.project?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/.project (added)
+++ incubator/graffito/trunk/jcr/spring/.project Tue Jan  3 15:19:48 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<projectDescription>
+  <name>graffito-jcr-spring</name>
+  <comment>This subproject contains the Graffito JCR Spring support</comment>
+  <projects>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/.project
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml (added)
+++ incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml Tue Jan  3 15:19:48 2006
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
+    "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+	JSR-170 configuration support. Note that the transaction managers are defined
+	in separate files.
+	    
+    $Id: applicationContext-repository.xml,v 1.2 2005/10/10 09:20:42 costin Exp $
+    -->    
+<beans default-lazy-init="true">
+	
+		
+	<bean id="repository" class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
+		<!-- normal factory beans params -->
+		<property name="configuration" value="file:./conf/jackrabbit-repo.xml"/>
+		<property name="homeDir" value="./repo"/>
+	</bean>
+	
+	<bean id="jcrSessionFactory" class="org.springmodules.jcr.JcrSessionFactory">
+		<property name="repository" ref="repository"/>
+		<property name="credentials">
+			<bean class="javax.jcr.SimpleCredentials">
+				<constructor-arg index="0" value="bogus"/>
+				<!-- create the credentials using a bean factory -->
+				<constructor-arg index="1">
+					<bean factory-bean="password"
+					      factory-method="toCharArray"/>
+				</constructor-arg>
+			</bean>			
+		</property>
+        <property name="namespaces">
+			<props>
+				<prop key="graffito">http://incubator.apache.org/graffito</prop>
+			</props>
+		</property>		
+	</bean>
+		
+	<bean id="jcrTransactionManager"
+		class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
+		<property name="sessionFactory" ref="jcrSessionFactory"/>
+	</bean>
+		
+	<!-- create the password to return it as a char[] -->
+	<bean id="password" class="java.lang.String">
+		<constructor-arg index="0" value="pass"/>
+	</bean>
+	
+	<bean id="providerManager" class="org.springmodules.jcr.support.ServiceSessionHolderProviderManager"/>
+		
+	<bean id="jcrMappingDescriptor" class="org.apache.portals.graffito.jcr.mapper.impl.DigesterMapperImpl">
+		<constructor-arg index="0" value="./conf/jcrmapping/jcrmapping.xml"/>
+	</bean>
+	
+	<bean id="jcrMappingTemplate" class="org.springmodules.jcr.mapping.JcrMappingTemplate">
+		<property name="sessionFactory" ref="jcrSessionFactory"/>
+		<property name="providerManager" ref="providerManager"/>
+		<property name="mapper" ref="jcrMappingDescriptor"/>
+		<property name="allowCreate" value="true"/>
+	</bean>
+	
+	<bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" 
+		abstract="true">
+		<property name="transactionManager">
+			<ref bean="jcrTransactionManager"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>
+				<prop key="*">PROPAGATION_REQUIRED</prop>
+			</props>
+		</property>
+	</bean>	
+	
+	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.impl.NewsServiceImpl" 
+	      class="org.apache.portals.graffito.jcr.spring.demo.components.impl.NewsServiceImpl" >
+		<property name="jcrMappingTemplate" ref="jcrMappingTemplate"/>			
+	</bean>		
+	
+	   	
+	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.NewsService" parent="baseTransactionProxy" 
+	      name="org.apache.portals.graffito.jcr.spring.demo.components.NewsService" >
+		<property name="proxyInterfaces">
+			<value>org.apache.portals.graffito.jcr.spring.demo.components.NewsService</value>
+		</property>
+		<property name="target">
+			<ref bean="org.apache.portals.graffito.jcr.spring.demo.components.impl.NewsServiceImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>
+				
+				<prop key="*">PROPAGATION_REQUIRED</prop>
+			</props>
+		</property>
+	</bean>	   
+	
+	
+	
+	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.impl.ArticleServiceImpl" 
+	      class="org.apache.portals.graffito.jcr.spring.demo.components.impl.ArticleServiceImpl" >
+		<property name="jcrMappingTemplate" ref="jcrMappingTemplate"/>			
+		<property name="newsService" ref="org.apache.portals.graffito.jcr.spring.demo.components.NewsService"/>			
+	</bean>		
+	
+	   	
+	<bean id="org.apache.portals.graffito.jcr.spring.demo.components.ArticleService" parent="baseTransactionProxy" 
+	      name="org.apache.portals.graffito.jcr.spring.demo.components.ArticleService" >
+		<property name="proxyInterfaces">
+			<value>org.apache.portals.graffito.jcr.spring.demo.components.ArticleService</value>
+		</property>
+		<property name="target">
+			<ref bean="org.apache.portals.graffito.jcr.spring.demo.components.impl.ArticleServiceImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>
+				
+				<prop key="*">PROPAGATION_REQUIRED</prop>
+			</props>
+		</property>
+	</bean>	   
+			
+</beans>
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/conf/applicationContext-repository.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/conf/jackrabbit-repo.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/conf/jackrabbit-repo.xml?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/conf/jackrabbit-repo.xml (added)
+++ incubator/graffito/trunk/jcr/spring/conf/jackrabbit-repo.xml Tue Jan  3 15:19:48 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Repository>
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+        <param name="path" value="${rep.home}/repository"/>
+    </FileSystem>
+    <Security appName="Jackrabbit">
+        <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"/>
+		<LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule"/>
+	</Security>
+	
+    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />
+    <Workspace name="${wsp.name}">
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${wsp.home}"/>
+        </FileSystem>
+        <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager" />
+        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+            <param name="path" value="${wsp.home}/index"/>
+        </SearchIndex>
+    </Workspace>
+    <Versioning rootPath="${rep.home}/versions">
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${rep.home}/versions"/>
+        </FileSystem>
+        <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager" />
+    </Versioning>
+
+</Repository>

Propchange: incubator/graffito/trunk/jcr/spring/conf/jackrabbit-repo.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/conf/jcrmapping/graffito-jcr-mapping.dtd
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/conf/jcrmapping/graffito-jcr-mapping.dtd?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/conf/jcrmapping/graffito-jcr-mapping.dtd (added)
+++ incubator/graffito/trunk/jcr/spring/conf/jcrmapping/graffito-jcr-mapping.dtd Tue Jan  3 15:19:48 2006
@@ -0,0 +1,84 @@
+<!--
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<!ELEMENT graffito-jcr (class-descriptor*)>
+<!--
+    Class descriptor - Each class descriptor describes the mapping strategy used for one a java class
+    * className : the className
+    * jcrNodeType : the primary jcr node type, it can be nt:unstructured
+-->
+<!ELEMENT class-descriptor (field-descriptor*, bean-descriptor*, collection-descriptor*)>
+
+<!ATTLIST class-descriptor
+	className CDATA #REQUIRED
+	jcrNodeType CDATA #IMPLIED >
+
+<!--
+    Field descriptor - A field descriptor maps one atomic object attribute (primitive types, String, Long, ...)  into a JCR property
+    * fieldName : the field/attribute name
+    * jcrName : the jcr property name (optional). If it is not defined, fieldname is used to specify the jcr property name
+    * id : specifies if the field is an id. Id is optional. If the class contains an id field, some process can run faster
+    * path : specified if the fiels is the object path
+-->
+
+<!ELEMENT field-descriptor EMPTY>
+<!ATTLIST field-descriptor
+	fieldName CDATA #REQUIRED
+	jcrName CDATA #IMPLIED 
+	id (true | false) "false"
+	path (true | false) "false"
+>
+
+<!--
+    Bean descriptor - A bean descriptor maps one "complex" object attribute into a JCR node.
+    * fieldName : the field/attribute name
+    * jcrName : the jcr node name (optional). If it is not defined, fieldname is used to specify the jcr node name
+    * proxy : Use lazy loading or not. if true, this attributes is not loaded when the main object is retrieved. it will be loaded when the get method is called.
+    
+-->
+<!ELEMENT bean-descriptor EMPTY>
+<!ATTLIST bean-descriptor
+	fieldName CDATA #REQUIRED
+	jcrName CDATA #IMPLIED 
+	proxy (true | false) "false"
+>
+
+<!--
+    Collection descriptor - A collection descriptor maps one object attribute based on a collection (or a map) into a series of JCR nodes.
+    * fieldName : the field/attribute name (matching to the collection attribute)
+    * jcrName : the jcr property name (optional). If it is not defined, fieldname is used to specify the jcr node name
+    * proxy : Use lazy loading or not. if true, this attributes is not loaded when the main object is retrieve. it will be loaded when the get method is called.
+    * elementClassName : contains a fully qualified class name.	This class is the Object type of the persistent collection elements.
+    * collectionClassName : contains a fully qualified class name. This class must be the Java type of the Collection attribute. 	
+                            This attribute must only specified if the attribute type is not a java.util.Collection (or subclass). 
+                            The declared class must implement ManageableCollection to let the persistence engine handles this type of collection.
+    * collectionConverter : The class name converter. This is the collection mapping strategy to used. 
+                            If this attribute is not specify, the default collection mapping strategy is used (DefaultCollectionConverterImpl)                             
+    
+-->
+
+<!ELEMENT collection-descriptor EMPTY>
+<!ATTLIST collection-descriptor
+	fieldName CDATA #REQUIRED
+	jcrName CDATA #IMPLIED 
+	proxy (true | false) "false"
+	elementClassName CDATA #REQUIRED
+	collectionClassName CDATA #IMPLIED
+	collectionConverter CDATA #IMPLIED	
+>

Propchange: incubator/graffito/trunk/jcr/spring/conf/jcrmapping/graffito-jcr-mapping.dtd
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/conf/jcrmapping/jcrmapping.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/conf/jcrmapping/jcrmapping.xml?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/conf/jcrmapping/jcrmapping.xml (added)
+++ incubator/graffito/trunk/jcr/spring/conf/jcrmapping/jcrmapping.xml Tue Jan  3 15:19:48 2006
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE graffito-jcr PUBLIC "-//The Apache Software Foundation//DTD Repository//EN" "./conf/jcrmapping/graffito-jcr-mapping.dtd">
+<graffito-jcr>
+    
+  
+	<class-descriptor className="org.apache.portals.graffito.jcr.spring.demo.model.News" 
+	                  jcrNodeType="graffito:News">
+		<field-descriptor fieldName="path" path="true" />
+		<field-descriptor fieldName="creationDate" jcrName="graffito:creationDate" />
+		<field-descriptor fieldName="content" jcrName="graffito:content" />
+	</class-descriptor>
+
+	<class-descriptor className="org.apache.portals.graffito.jcr.spring.demo.model.Article" 
+	                  jcrNodeType="graffito:Article">		
+		<field-descriptor fieldName="path" path="true" />
+		<field-descriptor fieldName="title" jcrName="graffito:title" />
+		<field-descriptor fieldName="description" jcrName="graffito:description" />		
+		<field-descriptor fieldName="author" jcrName="graffito:author" />
+		<field-descriptor fieldName="creationDate" jcrName="graffito:creationDate" />
+		<field-descriptor fieldName="content" jcrName="graffito:content" />						
+	</class-descriptor>
+
+</graffito-jcr>
+ 
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/conf/jcrmapping/jcrmapping.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/locator.ent
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/locator.ent?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/locator.ent (added)
+++ incubator/graffito/trunk/jcr/spring/locator.ent Tue Jan  3 15:19:48 2006
@@ -0,0 +1,2 @@
+<!-- derive locator.ent from parent -->
+<!ENTITY % locator-ent SYSTEM "file:../../locator.ent"> %locator-ent;

Propchange: incubator/graffito/trunk/jcr/spring/locator.ent
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/locator.path
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/locator.path?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/locator.path (added)
+++ incubator/graffito/trunk/jcr/spring/locator.path Tue Jan  3 15:19:48 2006
@@ -0,0 +1 @@
+../../
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/locator.path
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/maven.xml?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/maven.xml (added)
+++ incubator/graffito/trunk/jcr/spring/maven.xml Tue Jan  3 15:19:48 2006
@@ -0,0 +1,22 @@
+<!-- 
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<project xmlns:j="jelly:core"
+         xmlns:define="jelly:define"
+  	     xmlns:maven="jelly:maven"
+        >
+</project>
+
+

Propchange: incubator/graffito/trunk/jcr/spring/maven.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/project.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/project.properties?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/project.properties (added)
+++ incubator/graffito/trunk/jcr/spring/project.properties Tue Jan  3 15:19:48 2006
@@ -0,0 +1,42 @@
+# Copyright 2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#-----------------------------------------------------------------------------------------------------
+# MAVEN REPORISTORIES
+#-----------------------------------------------------------------------------------------------------
+maven.repo.remote = http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/, http://dist.codehaus.org/, http://cvs.apache.org/repository
+
+#-----------------------------------------------------------------------------------------------------
+# MULTIPROJECTS
+#-----------------------------------------------------------------------------------------------------
+maven.multiproject.type=jar
+maven.license.licenseFile=../../LICENSE.TXT
+#-----------------------------------------------------------------------------------------------------
+# DOC : SITE & PDF DOC
+#-----------------------------------------------------------------------------------------------------
+maven.docs.dest=${basedir}/../../site/jcr-spring
+
+# Display the date on the Maven web site
+maven.xdoc.date = left
+
+maven.xdoc.version = ${pom.currentVersion}
+maven.pdf.navigationFile=navigation_pdf.xml
+
+#-----------------------------------------------------------------------------------------------------
+# COMPILE 
+#-----------------------------------------------------------------------------------------------------
+maven.compile.deprecation=on
+#maven.compile.source=1.4
+#maven.compile.target=1.4
+#maven.test.source=1.4

Propchange: incubator/graffito/trunk/jcr/spring/project.properties
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/project.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/project.xml?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/project.xml (added)
+++ incubator/graffito/trunk/jcr/spring/project.xml Tue Jan  3 15:19:48 2006
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	Copyright 2004 The Apache Software Foundation
+	
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+
+<project>
+	<extend>${basedir}/../../project.xml</extend>
+	<pomVersion>3</pomVersion>
+	<id>graffito-jcr-spring</id>
+	<groupId>graffito</groupId>
+	<name>Graffito JCR Spring Support</name>
+	<currentVersion>1.0-a1-dev</currentVersion>
+	<package>org.apache.portals.graffito</package>
+	<description>This subproject contains the Graffito JCR Spring support</description>
+	<shortDescription>Graffito JCR Mapping Tools</shortDescription>
+
+	<repository>
+		<connection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr/spring</connection>
+		<developerConnection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr/spring</developerConnection>
+		<url>http://svn.apache.org/viewcvs</url>
+	</repository>
+
+	<dependencies>
+		<dependency>
+			<id>graffito-commons</id>
+			<groupId>graffito</groupId>
+			<version>1.0-a1-dev</version>
+		</dependency>
+		<dependency>
+			<id>graffito-jcr-mapping</id>
+			<groupId>graffito</groupId>
+			<version>1.0-a1-dev</version>
+		</dependency>	
+		<dependency>
+			<id>springframework:spring</id>
+			<version>1.2.4</version>
+		</dependency>		
+				
+		<dependency>
+			<id>springmodules-jcr</id>
+			<groupId>springmodules</groupId>
+			<version>dev-20051212</version>
+		</dependency>	
+		<dependency>
+			<id>springmodules-jcr-jackrabbit</id>
+			<groupId>springmodules</groupId>
+			<version>dev-20051212</version>
+		</dependency>							
+		<dependency>
+			<id>springmodules-sandbox-jcr</id>
+			<groupId>springmodules</groupId>
+			<version>dev-20051212</version>
+		</dependency>								
+		<dependency>
+			<id>cglib</id>
+			<version>full-2.0.2</version>
+		</dependency>
+		
+		<dependency>
+			<id>aopalliance</id>
+			<version>1.0</version>
+		</dependency>    		
+		
+		<dependency>
+			<groupId>org.apache.jackrabbit</groupId>
+			<artifactId>jackrabbit</artifactId>
+			<version>1.0-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.jackrabbit</groupId>
+			<artifactId>jackrabbit-commons</artifactId>
+			<version>1.0-SNAPSHOT</version>
+		</dependency>		
+		
+		<dependency>
+			<groupId>concurrent</groupId>
+			<artifactId>concurrent</artifactId>
+			<version>1.3.4</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<properties>
+				<scope>test</scope>
+			</properties>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>geronimo-spec</groupId>
+			<artifactId>geronimo-spec-jta</artifactId>
+			<version>1.0-M1</version>
+		</dependency>
+		<dependency>
+			<groupId>jsr170</groupId>
+			<artifactId>jcr</artifactId>
+			<version>1.0</version>
+			<url>http://jcp.org/en/jsr/detail?id=170</url>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.8</version>
+		</dependency>
+		<dependency>
+			<groupId>lucene</groupId>
+			<artifactId>lucene</artifactId>
+			<version>1.4.3</version>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>2.6.2</version>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xmlParserAPIs</artifactId>
+			<version>2.0.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.derby</groupId>
+			<artifactId>derby</artifactId>
+			<version>10.1.1.0</version>
+		</dependency>
+		
+		
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<typeId>jar</typeId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.7.0</version>
+			
+		</dependency>
+		
+		<dependency>
+			<groupId>commons-digester</groupId>
+			<typeId>jar</typeId>
+			<artifactId>commons-digester</artifactId>
+			<version>1.7</version>
+			
+		</dependency>
+		<dependency>
+			<id>commons-logging</id>
+			<version>1.0.2</version>
+			<url>http://jakarta.apache.org/commons/logging.html</url>
+		</dependency>
+		<dependency>
+			<groupId>commons-lang</groupId>
+			<artifactId>commons-lang</artifactId>
+			<version>2.1</version>
+			<type>jar</type>
+			<properties>
+				<war.bundle>true</war.bundle>
+			</properties>
+		</dependency>
+		
+
+	</dependencies>
+
+	<build>
+		<sourceDirectory>src/java</sourceDirectory>
+
+		<unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
+		<unitTest>
+			<excludes>
+				<exclude>org/apache/portals/graffito/jcr/testmodel/**/*.java</exclude>
+				<exclude>**/*TestBase.java</exclude>
+			</excludes>
+			<resources>
+				<resource>
+					<directory>${basedir}/src/test</directory>
+					<excludes>
+						<exclude>**/*.java</exclude>
+					</excludes>
+				</resource>
+			</resources>
+		</unitTest>
+
+		<resources>
+			<resource>
+				<directory>${basedir}/src/java</directory>
+				<excludes>
+					<exclude>**/*.java</exclude>
+				</excludes>
+			</resource>
+		</resources>
+
+
+  </build>
+  <reports>
+       <report>maven-javadoc-plugin</report>
+       <report>maven-changelog-plugin</report>    
+       <report>maven-file-activity-plugin</report>
+       <report>maven-jcoverage-plugin</report>
+       <report>maven-changelog-plugin</report>
+       <report>maven-changes-plugin</report>
+       <!-- <report>maven-checkstyle-plugin</report> -->
+       <report>maven-junit-report-plugin</report>
+       <report>maven-jxr-plugin</report>
+       <report>maven-pmd-plugin</report>
+       
+       
+  </reports>
+</project>

Propchange: incubator/graffito/trunk/jcr/spring/project.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/repo/repository/nodetypes/custom_nodetypes.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/repo/repository/nodetypes/custom_nodetypes.xml?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/repo/repository/nodetypes/custom_nodetypes.xml (added)
+++ incubator/graffito/trunk/jcr/spring/repo/repository/nodetypes/custom_nodetypes.xml Tue Jan  3 15:19:48 2006
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ *                     as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+<nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:test="http://www.apache.org/jackrabbit/test" 
+	       xmlns:mix="http://www.jcp.org/jcr/mix/1.0"   xmlns:graffito="http://incubator.apache.org/graffito">
+  <nodeType name="graffito:News" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+    <supertypes>
+      <supertype>mix:versionable</supertype>
+      <supertype>nt:base</supertype>
+    </supertypes>
+    <propertyDefinition name="*" requiredType="undefined" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" multiple="false" />
+    <propertyDefinition name="graffito:creationDate" requiredType="Date" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />
+	<propertyDefinition name="graffito:content" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />
+  </nodeType>
+  <nodeType name="graffito:Article" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+    <supertypes>
+      <supertype>mix:versionable</supertype>
+      <supertype>nt:base</supertype>
+    </supertypes>
+    <propertyDefinition name="*" requiredType="undefined" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" multiple="false" />
+    <propertyDefinition name="graffito:creationDate" requiredType="Date" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />
+	<propertyDefinition name="graffito:content" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />
+	<propertyDefinition name="graffito:title" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />	
+	<propertyDefinition name="graffito:description" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />	
+	<propertyDefinition name="graffito:author" requiredType="String" autoCreated="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />	
+
+  </nodeType>
+
+</nodeTypes>
+

Propchange: incubator/graffito/trunk/jcr/spring/repo/repository/nodetypes/custom_nodetypes.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/log4j.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/log4j.properties?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/log4j.properties (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/log4j.properties Tue Jan  3 15:19:48 2006
@@ -0,0 +1,38 @@
+/* ========================================================================
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================================
+ */
+
+# ------------------------------------------------------------------------
+#
+# Logging Configuration
+#
+# $Id: Log4j.properties,v 1.3 2004/12/22 20:37:04 christophe Exp $
+#
+# ------------------------------------------------------------------------
+
+log4j.rootLogger = WARN, console
+
+log4j.category.org.apache.portals.graffito.jcr= INFO, console
+log4j.additivity.org.apache.portals.graffito.jcr=false
+
+#
+# Console
+#
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+
+# Pattern to output the caller's file name and line number.
+log4j.appender.console.layout.ConversionPattern=%5p: %m%n
\ No newline at end of file

Propchange: incubator/graffito/trunk/jcr/spring/src/java/log4j.properties
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/application/Main.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/application/Main.java?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/application/Main.java (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/application/Main.java Tue Jan  3 15:19:48 2006
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.spring.demo.application;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+
+import org.apache.portals.graffito.jcr.spring.demo.components.ArticleService;
+import org.apache.portals.graffito.jcr.spring.demo.components.NewsService;
+import org.apache.portals.graffito.jcr.spring.demo.model.Article;
+import org.apache.portals.graffito.jcr.spring.demo.model.News;
+import org.springframework.context.support.AbstractApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.springframework.core.io.DefaultResourceLoader;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.ResourceLoader;
+
+/**
+ * Starting point for the Jcr example. It loads the applicationContext and calls
+ * method on the defined beans.
+ * 
+ * @author Costin Leau
+ *
+ */
+public class Main
+{
+
+	public static void main(String[] args)
+	{
+
+		System.out.println("Init Spring");
+		AbstractApplicationContext context = new FileSystemXmlApplicationContext("conf/applicationContext-repository.xml");
+		ResourceLoader loader = new DefaultResourceLoader();
+
+		System.out.println("Add article");
+		ArticleService service = (ArticleService) context .getBean("org.apache.portals.graffito.jcr.spring.demo.components.ArticleService");
+		Article article = new Article();
+		article.setPath("/article1");
+		article.setAuthor("Christophe");
+		article.setContent("This is an interesting content");
+		article.setCreationDate(new Date());
+		article.setDescription("This is the article description");
+		article.setTitle("Article Title");
+
+		service.createArticle(article);
+
+		System.out.println("Check News");
+		NewsService newsService = (NewsService) context .getBean("org.apache.portals.graffito.jcr.spring.demo.components.NewsService");
+		Iterator news = newsService.getNews().iterator();
+		while (news.hasNext())
+		{
+			News newsFound = (News) news.next();
+			System.out.println("News found : " + newsFound.getContent());
+		}
+		context.close();
+	}
+
+}

Propchange: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/application/Main.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/ArticleService.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/ArticleService.java?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/ArticleService.java (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/ArticleService.java Tue Jan  3 15:19:48 2006
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.portals.graffito.jcr.spring.demo.components;
+
+import java.util.Collection;
+
+import org.apache.portals.graffito.jcr.spring.demo.model.Article;
+/**
+ *
+ * VERY Simple article management
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ *
+ */
+public interface ArticleService
+{
+	public void createArticle(Article article);
+
+	public Collection getArticles();
+}

Propchange: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/ArticleService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/NewsService.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/NewsService.java?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/NewsService.java (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/NewsService.java Tue Jan  3 15:19:48 2006
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.portals.graffito.jcr.spring.demo.components;
+
+import java.util.Collection;
+
+import org.apache.portals.graffito.jcr.spring.demo.model.News;
+/**
+ *
+ * VERY Simple news management
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ *
+ */
+public interface NewsService
+{
+	public void createNews(News news);
+
+	public Collection getNews();
+}

Propchange: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/NewsService.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/ArticleServiceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/ArticleServiceImpl.java?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/ArticleServiceImpl.java (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/ArticleServiceImpl.java Tue Jan  3 15:19:48 2006
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.portals.graffito.jcr.spring.demo.components.impl;
+
+import java.util.Collection;
+import java.util.Date;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.derby.impl.sql.catalog.SYSTABLESRowFactory;
+import org.apache.portals.graffito.jcr.query.Filter;
+import org.apache.portals.graffito.jcr.query.Query;
+import org.apache.portals.graffito.jcr.query.QueryManager;
+import org.apache.portals.graffito.jcr.spring.demo.components.ArticleService;
+import org.apache.portals.graffito.jcr.spring.demo.components.NewsService;
+import org.apache.portals.graffito.jcr.spring.demo.model.Article;
+import org.apache.portals.graffito.jcr.spring.demo.model.News;
+import org.springmodules.jcr.mapping.JcrMappingTemplate;
+
+/**
+ * Default implementation for {@link org.apache.portals.graffito.jcr.spring.demo.components.ArticleService}
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ *
+ */
+public class ArticleServiceImpl implements ArticleService {
+    private static final Log log = LogFactory.getLog(ArticleServiceImpl.class);
+
+    private JcrMappingTemplate jcrMappingtemplate;
+    private NewsService newsService;
+
+    
+    public void createArticle(Article article)
+	{
+    	
+        jcrMappingtemplate.insert(article);
+        jcrMappingtemplate.save();
+        
+        
+        News news = new News();
+        news.setContent("A new article has been created by " + article.getAuthor());
+        news.setCreationDate(new Date());
+        news.setPath("/news-" + System.currentTimeMillis());
+        newsService.createNews(news);
+	}
+    
+	public Collection getArticles()
+	{
+
+		QueryManager queryManager = jcrMappingtemplate.getQueryManager();
+	    Filter filter = queryManager.createFilter(Article.class);
+	    
+	    Query query = queryManager.createQuery(filter);
+		return jcrMappingtemplate.getObjects(query);
+	}
+
+
+	public NewsService getNewsService()
+	{
+		return newsService;
+	}
+
+	public void setNewsService(NewsService newsService)
+	{
+		this.newsService = newsService;
+	}
+
+	/**
+     * @return Returns the template.
+     */
+    public JcrMappingTemplate getJcrMappingTemplate() {
+        return jcrMappingtemplate;
+    }
+
+    /**
+     * @param template The template to set.
+     */
+    public void setJcrMappingTemplate(JcrMappingTemplate template) {
+        this.jcrMappingtemplate = template;
+    }
+    
+    
+    
+}

Propchange: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/ArticleServiceImpl.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/NewsServiceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/NewsServiceImpl.java?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/NewsServiceImpl.java (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/NewsServiceImpl.java Tue Jan  3 15:19:48 2006
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.portals.graffito.jcr.spring.demo.components.impl;
+
+import java.util.Collection;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.portals.graffito.jcr.query.Filter;
+import org.apache.portals.graffito.jcr.query.Query;
+import org.apache.portals.graffito.jcr.query.QueryManager;
+import org.apache.portals.graffito.jcr.spring.demo.components.NewsService;
+import org.apache.portals.graffito.jcr.spring.demo.model.News;
+import org.springmodules.jcr.mapping.JcrMappingTemplate;
+
+/**
+ * Default implementation for {@link org.apache.portals.graffito.jcr.spring.demo.components.ArticleService}
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ *
+ */
+public class NewsServiceImpl implements NewsService {
+    private static final Log log = LogFactory.getLog(NewsServiceImpl.class);
+
+    private JcrMappingTemplate jcrMappingtemplate;
+
+    public void createNews(News news)
+	{
+        jcrMappingtemplate.insert(news);
+        jcrMappingtemplate.save();
+	
+	}
+    
+	public Collection getNews()
+	{
+
+		QueryManager queryManager = jcrMappingtemplate.getQueryManager();
+	    Filter filter = queryManager.createFilter(News.class);
+	    
+	    Query query = queryManager.createQuery(filter);
+		return jcrMappingtemplate.getObjects(query);
+	}
+
+
+	/**
+     * @return Returns the template.
+     */
+    public JcrMappingTemplate getJcrMappingTemplate() {
+        return jcrMappingtemplate;
+    }
+
+    /**
+     * @param template The template to set.
+     */
+    public void setJcrMappingTemplate(JcrMappingTemplate template) {
+        this.jcrMappingtemplate = template;
+    }
+    
+    
+    
+}

Propchange: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/components/impl/NewsServiceImpl.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/Article.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/Article.java?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/Article.java (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/Article.java Tue Jan  3 15:19:48 2006
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.spring.demo.model;
+
+
+import java.util.*;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Simple Article class
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ * 
+ */
+public class Article 
+{
+    protected final static Log log =  LogFactory.getLog(Article.class);
+    
+    protected String path;
+    protected String title;
+    protected String description;   
+    protected String author; 
+    protected Date creationDate; 
+    protected String content;
+    
+       
+	public String getPath()
+	{
+		return path;
+	}
+	public void setPath(String path)
+	{
+		this.path = path;
+	}
+	public String getAuthor()
+	{
+		return author;
+	}
+	public void setAuthor(String author)
+	{
+		this.author = author;
+	}
+	public String getContent()
+	{
+		return content;
+	}
+	public void setContent(String content)
+	{
+		this.content = content;
+	}
+	public Date getCreationDate()
+	{
+		return creationDate;
+	}
+	public void setCreationDate(Date creationDate)
+	{
+		this.creationDate = creationDate;
+	}
+	public String getDescription()
+	{
+		return description;
+	}
+	public void setDescription(String description)
+	{
+		this.description = description;
+	}
+	public String getTitle()
+	{
+		return title;
+	}
+	public void setTitle(String title)
+	{
+		this.title = title;
+	}
+
+
+}
+

Propchange: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/Article.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/News.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/News.java?rev=365769&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/News.java (added)
+++ incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/News.java Tue Jan  3 15:19:48 2006
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.portals.graffito.jcr.spring.demo.model;
+
+
+import java.util.*;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Simple New class
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ * 
+ */
+public class News 
+{
+    protected final static Log log =  LogFactory.getLog(News.class);
+    
+    protected String path;
+    protected Date creationDate; 
+    protected String content;
+    
+    
+    
+	public String getPath()
+	{
+		return path;
+	}
+	public void setPath(String path)
+	{
+		this.path = path;
+	}
+	public String getContent()
+	{
+		return content;
+	}
+	public void setContent(String content)
+	{
+		this.content = content;
+	}
+	public Date getCreationDate()
+	{
+		return creationDate;
+	}
+	public void setCreationDate(Date creationDate)
+	{
+		this.creationDate = creationDate;
+	}
+
+}
+

Propchange: incubator/graffito/trunk/jcr/spring/src/java/org/apache/portals/graffito/jcr/spring/demo/model/News.java
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message