incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r380244 - in /incubator/graffito/trunk/jcr/jcr-mapping/xdocs: engine-introduction.xml engine-setup.xml engine-spring.xml simple-strategies/collection-strategy.xml simple-strategies/introduction-strategies.xml
Date Thu, 23 Feb 2006 22:21:38 GMT
Author: clombart
Date: Thu Feb 23 14:21:35 2006
New Revision: 380244

URL: http://svn.apache.org/viewcvs?rev=380244&view=rev
Log:
Still working on the documentation

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-spring.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml?rev=380244&r1=380243&r2=380244&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml Thu Feb 23 14:21:35
2006
@@ -55,7 +55,7 @@
 										
 	<class-descriptor className="[Reference to a class to map]" ...">
 								
-		... Contains the reference to the class attribute ...
+		... Contains the references to the class attributes ...
 										
 	</class-descriptor>
 									

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml?rev=380244&r1=380243&r2=380244&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml Thu Feb 23 14:21:35 2006
@@ -24,12 +24,55 @@
 		<section name="The Persistence Manager Setup">
 			
 			<subsection name = "Basic setup">
+				<p>When you start your application, you need the following code to initialize correctly
the Persistence Manager.</p>
+				<source>
+import javax.jcr.Session;
+import javax.jcr.Repository;
+					
+import org.apache.portals.graffito.jcr.mapper.Mapper;
+import org.apache.portals.graffito.jcr.mapper.impl.DigesterMapperImpl;				
+					
+import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverterProvider;
+import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.DefaultAtomicTypeConverterProvider;
+					
+import org.apache.portals.graffito.jcr.persistence.objectconverter.ObjectConverter;
+import org.apache.portals.graffito.jcr.persistence.objectconverter.impl.ObjectConverterImpl;
+
+import org.apache.portals.graffito.jcr.query.QueryManager;
+import org.apache.portals.graffito.jcr.query.impl.QueryManagerImpl;
+import org.apache.portals.graffito.jcr.repository.RepositoryUtil;
+				
+// 1. Instantiate a JCR session
 			
+Repository repository = RepositoryUtil.getRepository("repositoryTest");
+Session session = RepositoryUtil.login(repository, "superuser", "superuser");
+					
+// 2. Specify the different mapping files
+					
+String[] files = { "./src/test-config/jcrmapping.xml", 
+			"./src/test-config/jcrmapping-atomic.xml",
+			"./src/test-config/jcrmapping-beandescriptor.xml"};
+
+// 3. Initialise the PersistenceManager dependencies
+				
+Mapper mapper = new DigesterMapperImpl(files).buildMapper();
+AtomicTypeConverterProvider converterProvider = new DefaultAtomicTypeConverterProvider();
+Map atomicTypeConverters = converterProvider.getAtomicTypeConverters();
+QueryManager queryManager = new QueryManagerImpl(mapper, atomicTypeConverters);
+ObjectConverter objectConverter = new ObjectConverterImpl(mapper, converterProvider);
+				
+// 4. Intantiate the PersistenceManager
+				
+PersistenceManager persistenceManager = new PersistenceManagerImpl(mapper, objectConverter,
queryManager, session);	
+					
+					
+</source>	
+				<p>See the page <a href="api/api-intro.html">here</a> to get a complete
overview on the Persistence Manager API.</p>
 			</subsection>
 			
 			<subsection name="Platform/Framework integration">
 				<p>You can also get more information on the Spring support <a href="engine-spring.html">here</a>.</p>
-				<p>Of course, other kind of integration contribution are welcome.</p>
+				<p>Of course, support for other containers are welcome.</p>
 			</subsection>
 			
 		</section>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-spring.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-spring.xml?rev=380244&r1=380243&r2=380244&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-spring.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-spring.xml Thu Feb 23 14:21:35 2006
@@ -22,7 +22,7 @@
 	</properties>
 	<body>
 		<section name="Spring Integration ">
-			<p>TO DO</p>
+			<p>We are currently working on the Spring integration. You can follow our work in
the folder <code>[graffito-trunk-folder]/jcr/spring</code>.</p>
 		</section>
 	</body>
 </document>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml?rev=380244&r1=380243&r2=380244&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml
Thu Feb 23 14:21:35 2006
@@ -62,10 +62,15 @@
 	... other subnodes for page1 ... 
 				]]></source>		  
 				</p>						
-				<p>Creating a subnode like this example (mysite/page1/paragraphs) is the default
behavior. See the section <a href="../advanced-strategies/advanced-collections-strategy.html">Reviewing
the collection-descriptor</a> to get other collection-field mapping strategies.</p>
+				<p>Creating subnodes like this example (mysite/page1/paragraphs) is the default
behavior. See the section <a href="../advanced-strategies/advanced-collections-strategy.html">Reviewing
the collection-descriptor</a> to get other collection-field mapping strategies.</p>
 								
 								
 			</subsection>
+			<subsection name="Supported Collection Types">
+				<p>Current supported collection types are Collection, List, ArrayList and Vector.
It is also possible other Collection or Map types with the ManageableCollection interface.
See the section <a href="../advanced-strategies/advanced-collections-strategy.html">Reviewing
the collection-descriptor</a> to get more information on the ManageableCollection.</p>
+				<p></p>
+			</subsection>	
+			
 		</section>
 	</body>
 </document>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml?rev=380244&r1=380243&r2=380244&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml
Thu Feb 23 14:21:35 2006
@@ -35,8 +35,8 @@
 					<li>The PageInfo class contains the title and the page description. We are using
the pageInfo here to see all mapping features (see the bean-descriptors). In real application,
this class is not necessary :-)</li>
 					<li>Each paragraph contains a path and a text field.</li>
 				</ul>	
-				<p align="center"> <img src="./images/sample-model-doc.png" ></img></p>
-			</p>	
+			</p>					
+			<p align="center"><img src="../images/sample-model-doc.png" ></img></p>
		
 			<p>
 				This object model could be too simple for real applications and it is used here just
to simplify the description of the different mapping strategies. 
 			</p>	



Mime
View raw message