Merge after backout of changeset 017ec8d2e32f
[pithos] / src / gr / ebs / gss / server / ejb / GSSDAO.java
index 9cdce76..d5107a5 100644 (file)
@@ -95,6 +95,16 @@ public interface GSSDAO {
        public List<Group> getGroups(Long userId) throws ObjectNotFoundException;
 
        /**
+        * Retrieves the root folder id for the specified user. The caller must ensure
+        * that the userId exists.
+        *
+        * @param userId
+        * @return Long The id
+        * @throws ObjectNotFoundException if no Folder was found
+        */
+       public Long getRootFolderId(final Long userId) throws ObjectNotFoundException;
+       
+       /**
         * Retrieves the root folder for the specified user. The caller must ensure
         * that the userId exists.
         *
@@ -349,16 +359,6 @@ public interface GSSDAO {
        public Nonce getNonce(String nonce, Long userId) throws ObjectNotFoundException;
 
        /**
-        * Loads the file for indexing. That means the file is loaded with the lazy fields needed for indexing, initialized.
-        * For now only the tags need to be initialized
-        *
-        * @param id
-        * @return the {@link FileHeader} with initialized tags
-        * @throws ObjectNotFoundException when a file with the specified id does not exist
-        */
-       public FileHeader getFileForIndexing(Long id) throws ObjectNotFoundException;
-
-       /**
         * Calculates total file size of user.
         *
         * @param userId the ID of the user
@@ -474,6 +474,15 @@ public interface GSSDAO {
         */
        public List<FileHeader> getFilesPermittedForGroup(Long userId, Long groupId) throws ObjectNotFoundException;
 
+    /**
+     * Gets a file with tags initialized, cause indexing does not always run within a transaction (e.g. during rebuild)
+     * 
+     * @param id
+     * @return
+     * @throws ObjectNotFoundException
+     */
+    public FileHeader getFileForIndexing(Long id) throws ObjectNotFoundException;
+
        /**
         * @param userId
         * @return
@@ -514,4 +523,12 @@ public interface GSSDAO {
         */
        public List<UserLogin> getLoginsForUser (Long userId);
 
+       /**
+        * Returns a list of all entries related to the date that a user logged in the service. 
+        *  
+        * @param userId
+        * @return a list of last user login and the current session user login
+        */
+       public List<UserLogin> getAllLoginsForUser (Long userId);
+
 }