You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by fl...@apache.org on 2010/11/12 19:52:26 UTC

svn commit: r1034509 - in /lenya/trunk/org.apache.lenya.core.repository.api: ./ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/lenya/ src/main/java/org/apache/lenya/cms/ src/main/java/org/apache/lenya/cms/observation/ src/main/ja...

Author: florent
Date: Fri Nov 12 18:52:26 2010
New Revision: 1034509

URL: http://svn.apache.org/viewvc?rev=1034509&view=rev
Log:
add api classes

Added:
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java
      - copied, changed from r1034465, lenya/trunk/org.apache.lenya.core.repository.impl/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryListener.java
      - copied unchanged from r1034465, lenya/trunk/org.apache.lenya.core.repository.impl/src/main/java/org/apache/lenya/cms/observation/RepositoryListener.java
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java
      - copied, changed from r1034465, lenya/trunk/org.apache.lenya.core.publication/src/main/java/org/apache/lenya/cms/publication/Repository.java
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/
    lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Session.java
      - copied unchanged from r1034465, lenya/trunk/org.apache.lenya.core.repository.impl/src/main/java/org/apache/lenya/cms/repository/Session.java
Modified:
    lenya/trunk/org.apache.lenya.core.repository.api/pom.xml
    lenya/trunk/org.apache.lenya.core.repository.api/rcl.properties

Modified: lenya/trunk/org.apache.lenya.core.repository.api/pom.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.repository.api/pom.xml?rev=1034509&r1=1034508&r2=1034509&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.repository.api/pom.xml (original)
+++ lenya/trunk/org.apache.lenya.core.repository.api/pom.xml Fri Nov 12 18:52:26 2010
@@ -10,13 +10,16 @@
   </parent>
   
   <groupId>org.apache.lenya</groupId>
-  <artifactId>lenya-CHANGE-ME</artifactId>
+  <artifactId>lenya-core-repository-api</artifactId>
   <packaging>jar</packaging>
-  <name>Apache CHANGE ME</name>
-  <description>CHANGE ME</description>
+  <name>Apache Lenya repository API</name>
+  <description>API that define a repository</description>
   
   <dependencies>
-  
+  <dependency>
+      <groupId>org.apache.lenya</groupId>
+      <artifactId>lenya-core-transaction</artifactId>
+    </dependency>
   <!-- TODO : see if all theses dependencies are required -->
     <dependency>
       <groupId>org.apache.cocoon</groupId>

Modified: lenya/trunk/org.apache.lenya.core.repository.api/rcl.properties
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.repository.api/rcl.properties?rev=1034509&r1=1034508&r2=1034509&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.repository.api/rcl.properties (original)
+++ lenya/trunk/org.apache.lenya.core.repository.api/rcl.properties Fri Nov 12 18:52:26 2010
@@ -14,4 +14,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-org.apache.lenya.lenya-CHANGE-ME.service%classes-dir=./target/classes
\ No newline at end of file
+org.apache.lenya.lenya-core-repository-api.service%classes-dir=./target/classes
\ No newline at end of file

Copied: lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java (from r1034465, lenya/trunk/org.apache.lenya.core.repository.impl/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java)
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java?p2=lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java&p1=lenya/trunk/org.apache.lenya.core.repository.impl/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java&r1=1034465&r2=1034509&rev=1034509&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.repository.impl/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java (original)
+++ lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java Fri Nov 12 18:52:26 2010
@@ -1,109 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You 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.lenya.cms.observation;
 
-import org.apache.commons.lang.Validate;
 import org.apache.lenya.cms.repository.Session;
 
-/**
- * A repository event provides additional information if a document was added, changed, or removed.
- */
-public class RepositoryEvent {
-
-    private Session session;
-    private Object descriptor = null;
-    private int revision = -1;
-    private Object source;
-
-    /**
-     * Ctor.
-     * @param session The session.
-     * @param source The source of the event.
-     * @param descriptor More information about the event.
-     */
-    public RepositoryEvent(Session session, Object source, Object descriptor) {
-        this(session, descriptor);
-        Validate.notNull(source);
-        this.source = source;
-    }
-    
-    /**
-     * Ctor.
-     * @param session The session.
-     * @param descriptor More information about the event.
-     */
-    public RepositoryEvent(Session session, Object descriptor) {
-        Validate.notNull(session);
-        Validate.notNull(descriptor);
-        this.session = session;
-        this.descriptor = descriptor;
-    }
-
-    /**
-     * @return The session.
-     */
-    public Session getSession() {
-        return this.session;
-    }
-
-    /**
-     * @return The descriptor.
-     */
-    public Object getDescriptor() {
-        return this.descriptor;
-    }
-    
-    public String toString() {
-        return "identity:" + getSession().getIdentity().toString() + " " + getNodeUri() + " " + getDescriptor();
-    }
-    
-    private String nodeUri;
-    
-    /**
-     * @param nodeUri The source URI of the affected node.
-     */
-    public void setNodeUri(String nodeUri) {
-        this.nodeUri = nodeUri;
-    }
-    
-    /**
-     * @return The source URI of the affected node.
-     */
-    public String getNodeUri() {
-        return this.nodeUri;
-    }
-
-    /**
-     * @param revision The latest revision of the node at the time the event was created.
-     */
-    public void setRevision(int revision) {
-        this.revision = revision;
-    }
-    
-    /**
-     * @return The latest revision of the node at the time the event was created.
-     */
-    public int getRevision() {
-        return this.revision;
-    }
-
-    public Object getSource() {
-        return source;
-    }
+public interface RepositoryEvent {
 
-}
+	/**
+	 * @return The session.
+	 */
+	public abstract Session getSession();
+
+	/**
+	 * @return The descriptor.
+	 */
+	public abstract Object getDescriptor();
+
+	public abstract String toString();
+
+	/**
+	 * @param nodeUri The source URI of the affected node.
+	 */
+	public abstract void setNodeUri(String nodeUri);
+
+	/**
+	 * @return The source URI of the affected node.
+	 */
+	public abstract String getNodeUri();
+
+	/**
+	 * @param revision The latest revision of the node at the time the event was created.
+	 */
+	public abstract void setRevision(int revision);
+
+	/**
+	 * @return The latest revision of the node at the time the event was created.
+	 */
+	public abstract int getRevision();
+
+	public abstract Object getSource();
+
+}
\ No newline at end of file

Copied: lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java (from r1034465, lenya/trunk/org.apache.lenya.core.publication/src/main/java/org/apache/lenya/cms/publication/Repository.java)
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java?p2=lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java&p1=lenya/trunk/org.apache.lenya.core.publication/src/main/java/org/apache/lenya/cms/publication/Repository.java&r1=1034465&r2=1034509&rev=1034509&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.publication/src/main/java/org/apache/lenya/cms/publication/Repository.java (original)
+++ lenya/trunk/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java Fri Nov 12 18:52:26 2010
@@ -18,7 +18,7 @@
 package org.apache.lenya.cms.publication;
 
 import javax.servlet.http.HttpServletRequest;
-
+import org.apache.lenya.cms.publication.Session;
 import org.apache.lenya.ac.Identity;
 
 public interface Repository {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org