clean the repository api module

git-svn-id: https://svn.apache.org/repos/asf/lenya/trunk@1096979 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.lenya.core.repository.api/pom.xml b/org.apache.lenya.core.repository.api/pom.xml
index 2057a41..86fc525 100644
--- a/org.apache.lenya.core.repository.api/pom.xml
+++ b/org.apache.lenya.core.repository.api/pom.xml
@@ -12,45 +12,22 @@
   <groupId>org.apache.lenya</groupId>
   <artifactId>lenya-core-repository-api</artifactId>
   <packaging>jar</packaging>
-  <name>Apache Lenya repository API</name>
+  <name>Apache Lenya Repository API</name>
   <description>API that define a repository</description>
   
   <dependencies>
-  <dependency>
-      <groupId>org.apache.lenya</groupId>
-      <artifactId>lenya-core-transaction-api</artifactId>
-    </dependency>
-  <dependency>
-      <groupId>org.apache.lenya</groupId>
-      <artifactId>lenya-core-metadata-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.lenya</groupId>
-      <artifactId>lenya-core-identity</artifactId>
-    </dependency>    
-    
-  <!-- TODO : see if all theses dependencies are required -->
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-servlet-service-components</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-template-impl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-flowscript-impl</artifactId>
-    </dependency>
+	<dependency>
+		<groupId>org.apache.lenya</groupId>
+		<artifactId>lenya-core-transaction-api</artifactId>
+	</dependency>
+	<dependency>
+		<groupId>org.apache.lenya</groupId>
+		<artifactId>lenya-core-metadata-api</artifactId>
+	</dependency>
+
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
-      <version>2.4</version>
-      <scope>provided</scope>
-    </dependency>
+      </dependency>
   </dependencies>
 </project>
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java
index 2edf1c6..f47db4e 100644
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java
+++ b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/observation/RepositoryEvent.java
@@ -1,13 +1,13 @@
 package org.apache.lenya.cms.observation;
 
-import org.apache.lenya.cms.repository.Session;
+//florent remove session import org.apache.lenya.cms.repository.Session;
 
 public interface RepositoryEvent {
 
 	/**
 	 * @return The session.
 	 */
-	public abstract Session getSession();
+	//public abstract Session getSession();
 
 	/**
 	 * @return The descriptor.
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java
index 0e1b47d..41ce4e8 100644
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java
+++ b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/publication/Repository.java
@@ -20,19 +20,19 @@
 import javax.servlet.http.HttpServletRequest;
 //florent : changed cause of module change of this class
 //import org.apache.lenya.cms.publication.Session;
-import org.apache.lenya.cms.repository.Session;
+//import org.apache.lenya.cms.repository.Session;
 
 //import org.apache.lenya.ac.Identity;
 
 public interface Repository {
     
-    Session getSession(HttpServletRequest request);
+    //Session getSession(HttpServletRequest request);
     
     //florent : remove as it create cycliq dependencies.
     //note : can be re-enable now as identity is in lenya-core-identity
     // suppress this comment when ok
     //Session startSession(Identity identity, boolean modifiable);
 
-    void removeSession(HttpServletRequest request);
+    //void removeSession(HttpServletRequest request);
     
 }
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Node.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Node.java
index 32bba48..322b5fe 100644
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Node.java
+++ b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Node.java
@@ -30,7 +30,7 @@
     /**
      * @return The session this node belongs to.
      */
-    Session getRepositorySession();
+    //Session getRepositorySession();
 
     /**
      * The protocol with which to find Lenya nodes
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItem.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItem.java
index a2d7e34..707b83c 100644
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItem.java
+++ b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItem.java
@@ -25,6 +25,6 @@
     /**
      * @return The session this item belongs to.
      */
-    Session getRepositorySession();
+    //Session getRepositorySession();
     
 }
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItemFactory.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItemFactory.java
index 6099d6f..d9c64cf 100644
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItemFactory.java
+++ b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryItemFactory.java
@@ -33,6 +33,8 @@
      * @return A repository item.
      * @throws RepositoryException if an error occurs.
      */
-    RepositoryItem buildItem(Session session, String key) throws RepositoryException;
+   //florent : remove session
+    //RepositoryItem buildItem(Session session, String key) throws RepositoryException;
+    RepositoryItem buildItem(String key) throws RepositoryException;
     
 }
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryManager.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryManager.java
index 4cebcd2..2472e7d 100644
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryManager.java
+++ b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/RepositoryManager.java
@@ -18,7 +18,7 @@
 package org.apache.lenya.cms.repository;
 
 //florent import org.apache.lenya.transaction.Identity;
-import org.apache.lenya.ac.Identity;
+//import org.apache.lenya.ac.Identity;
 
 /**
  * Repository manager.
@@ -36,6 +36,6 @@
      * @return A session.
      * @throws RepositoryException if an error occurs.
      */
-    Session createSession(Identity identity, boolean modifiable) throws RepositoryException;
+    //Session createSession(Identity identity, boolean modifiable) throws RepositoryException;
     
 }
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Session.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Session.java
deleted file mode 100644
index 70a5c72..0000000
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/Session.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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.repository;
-
-import org.apache.lenya.cms.observation.RepositoryEvent;
-import org.apache.lenya.cms.observation.RepositoryListener;
-import org.apache.lenya.transaction.ConcurrentModificationException;
-//florent remove this identity as duplication of the core-ac one 
-//import org.apache.lenya.transaction.Identity;
-import org.apache.lenya.ac.Identity;
-
-import org.apache.lenya.transaction.UnitOfWork;
-
-/**
- * Repository session.
- */
-public interface Session extends UnitOfWork {
-
-    /**
-     * @return the identity this session belongs to.
-     */
-    Identity getIdentity();
-
-    /**
-     * Commits the transaction.
-     * @throws RepositoryException if an error occurs.
-     * @throws ConcurrentModificationException if a transactionable has been
-     *         modified by another session.
-     */
-    void commit() throws RepositoryException, ConcurrentModificationException;
-
-    /**
-     * Rolls the transaction back.
-     * @throws RepositoryException if an error occurs.
-     */
-    void rollback() throws RepositoryException;
-
-    /**
-     * @param factory The factory.
-     * @param key The key.
-     * @return The item for the specific key.
-     * @throws RepositoryException if an error occurs.
-     */
-    RepositoryItem getRepositoryItem(RepositoryItemFactory factory, String key)
-            throws RepositoryException;
-
-    /**
-     * @param listener The listener to add.
-     * @throws RepositoryException if the listener is already registered.
-     */
-    void addListener(RepositoryListener listener) throws RepositoryException;
-
-    /**
-     * Checks if a listener is registered.
-     * @param listener The listener.
-     * @return A boolean value.
-     */
-    boolean isListenerRegistered(RepositoryListener listener);
-
-    /**
-     * @param event The event to add to the queue.
-     */
-    void enqueueEvent(RepositoryEvent event);
-
-    /**
-     * @param identity The identity.
-     */
-    void setIdentity(Identity identity);
-
-    /**
-     * @return if the repository items in this session can be modified.
-     */
-    boolean isModifiable();
-
-    /**
-     * @return The ID of this session.
-     */
-    String getId();
-
-    /**
-     * @return The holder of this session.
-     */
-    SessionHolder getHolder();
-    
-    /**
-     * @param holder The holder of this session.
-     */
-    void setHolder(SessionHolder holder);
-
-}
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/SessionHolder.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/SessionHolder.java
deleted file mode 100644
index 0fcd7d4..0000000
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/SessionHolder.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.repository;
-
-public interface SessionHolder {
-    
-    Session getRepositorySession();
-
-}
diff --git a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/SharedItemStore.java b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/SharedItemStore.java
index ab585d6..97a46d0 100644
--- a/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/SharedItemStore.java
+++ b/org.apache.lenya.core.repository.api/src/main/java/org/apache/lenya/cms/repository/SharedItemStore.java
@@ -17,7 +17,7 @@
  */
 package org.apache.lenya.cms.repository;
 
-import org.apache.lenya.transaction.IdentityMap;
+//import org.apache.lenya.transaction.IdentityMap;
 
 /**
  * Store for read-only items which are shared by all sessions for performance reasons.
@@ -32,8 +32,8 @@
     /**
      * Clears the store when a session has been committed.
      */
-    void clear();
+    //void clear();
     
-    Session getSession();
+    //Session getSession();
 
 }