cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r491860 - in /incubator/cayenne/main/trunk/doc: pom.xml src/main/resources/doc/Documentation/User Guide/Installation/JAR Files and Dependencies/index.html src/main/resources/doc/Documentation/User Guide/Lifecycle Callbacks/index.html
Date Tue, 02 Jan 2007 17:29:46 GMT
Author: aadamchik
Date: Tue Jan  2 09:29:45 2007
New Revision: 491860

URL: http://svn.apache.org/viewvc?view=rev&rev=491860
Log:
fixing docs pom; updating docs from wiki

Modified:
    incubator/cayenne/main/trunk/doc/pom.xml
    incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Installation/JAR
Files and Dependencies/index.html
    incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Lifecycle
Callbacks/index.html

Modified: incubator/cayenne/main/trunk/doc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/doc/pom.xml?view=diff&rev=491860&r1=491859&r2=491860
==============================================================================
--- incubator/cayenne/main/trunk/doc/pom.xml (original)
+++ incubator/cayenne/main/trunk/doc/pom.xml Tue Jan  2 09:29:45 2007
@@ -226,7 +226,7 @@
 				<plugins>
 					<plugin>
 						<groupId>org.apache.cayenne.maven.plugin</groupId>
-						<artifactId>build-maven-plugin</artifactId>
+						<artifactId>maven-cayenne-build-plugin</artifactId>
 						<executions>
 							<execution>
 								<id>docs</id>

Modified: incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Installation/JAR
Files and Dependencies/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User%20Guide/Installation/JAR%20Files%20and%20Dependencies/index.html?view=diff&rev=491860&r1=491859&r2=491860
==============================================================================
--- incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Installation/JAR
Files and Dependencies/index.html (original)
+++ incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Installation/JAR
Files and Dependencies/index.html Tue Jan  2 09:29:45 2007
@@ -54,8 +54,7 @@
 <li><a href="../../../../Documentation/User Guide/DataViews/index.html">DataViews</a></li>
 </ul>
 </div>
-<div id="ConfluenceContent">
-<p>This sections explains where all the relevant jar files are located. It also lists
Cayenne dependencies.</p>
+<div id="ConfluenceContent"><p>This sections explains where all the relevant
jar files are located. It also lists Cayenne dependencies.</p>
 
 <h3><a name="JARFilesandDependencies-CayenneRuntimeFramework"></a>Cayenne
Runtime Framework</h3>
 
@@ -64,7 +63,6 @@
 <ul>
 	<li><span class="nobr"><a href="http://objectstyle.org/ashwood/" title="Visit
page outside Confluence" rel="nofollow">ObjectStyle Ashwood Graph Library<sup><img
class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle"
alt="" border="0"/></sup></a></span>, version 1.1</li>
 	<li><span class="nobr"><a href="http://jakarta.apache.org/velocity/" title="Visit
page outside Confluence" rel="nofollow">Apache Velocity Template Engine<sup><img
class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle"
alt="" border="0"/></sup></a></span>, version 1.3 (and all its dependencies
bundled with velocity-dep)</li>
-	<li><span class="nobr"><a href="http://jakarta.apache.org/log4j/" title="Visit
page outside Confluence" rel="nofollow">Apache Log4J<sup><img class="rendericon"
src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>,
version 1.2.9</li>
 	<li><span class="nobr"><a href="http://jakarta.apache.org/commons/lang/"
title="Visit page outside Confluence" rel="nofollow">Apache Commons Lang<sup><img
class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle"
alt="" border="0"/></sup></a></span>, version 2.1</li>
 	<li><span class="nobr"><a href="http://jakarta.apache.org/commons/collections"
title="Visit page outside Confluence" rel="nofollow">Apache Commons Collections<sup><img
class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle"
alt="" border="0"/></sup></a></span>, version 3.1</li>
 	<li><span class="nobr"><a href="http://jakarta.apache.org/commons/logging/"
title="Visit page outside Confluence" rel="nofollow">Apache Commons Logging<sup><img
class="rendericon" src="../../../../images/linkext7.gif" height="7" width="7" align="absmiddle"
alt="" border="0"/></sup></a></span>, version 1.0.4</li>

Modified: incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Lifecycle
Callbacks/index.html
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User%20Guide/Lifecycle%20Callbacks/index.html?view=diff&rev=491860&r1=491859&r2=491860
==============================================================================
--- incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Lifecycle
Callbacks/index.html (original)
+++ incubator/cayenne/main/trunk/doc/src/main/resources/doc/Documentation/User Guide/Lifecycle
Callbacks/index.html Tue Jan  2 09:29:45 2007
@@ -98,7 +98,7 @@
 <pre class="code-java"><span class="code-keyword">public</span> class MyListener
{ 
    ...
 
-   <span class="code-comment">// a vaid callback method
+   <span class="code-comment">// a valid callback method
 </span>   <span class="code-keyword">public</span> void initArtist(Artist
a) {
       ...
    }
@@ -149,7 +149,28 @@
 
 <h2><a name="LifecycleCallbacks-EnablingCallbacks"></a>Enabling Callbacks</h2>
 
-<p>TODO</p></div>
+<p><em>TODO: expect this to be changed to something more user-friendly.</em></p>
+
+<p>Registering listener:</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">DataDomain domain = ...
+<span class="code-object">int</span> callbackType = LifecycleEventCallback.PRE_PERSIST;
<span class="code-comment">// choose callback type you care about
+</span>domain.getEntityResolver().getCallbacks(callbackType).addListener(
+				MyEntity.class, <span class="code-keyword">new</span> MyListener(), <span
class="code-quote">"callbackMethod"</span>);</pre>
+</div></div> 
+
+<p>Building ObjectContext with enabled callbacks:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">DataChannelCallbackInterceptor postInterceptor = <span class="code-keyword">new</span>
DataChannelCallbackInterceptor();
+postInterceptor.setChannel(domain);
+ObjectStore objectStore = <span class="code-keyword">new</span> ObjectStore(domain.getSharedSnapshotCache());
+
+ObjectContextCallbackInterceptor preInterceptor = <span class="code-keyword">new</span>
ObjectContextCallbackInterceptor();
+preInterceptor.setContext(<span class="code-keyword">new</span> DataContext(postInterceptor,
objectStore));
+
+ObjectContext userContext = preInterceptor;</pre>
+</div></div></div>
 </div>
   <div class="clearer">.</div>
   <div style="height: 12px; background-image: url('../../../images/border_bottom.gif');
background-repeat: repeat-x;"></div>



Mime
View raw message