Merge after backout of changeset 017ec8d2e32f
[pithos] / src / gr / ebs / gss / server / ejb / GSSDAO.java
index 53583a3..d5107a5 100644 (file)
@@ -29,6 +29,7 @@ import gr.ebs.gss.server.domain.Invitation;
 import gr.ebs.gss.server.domain.Nonce;
 import gr.ebs.gss.server.domain.User;
 import gr.ebs.gss.server.domain.UserClass;
+import gr.ebs.gss.server.domain.UserLogin;
 
 import java.util.Date;
 import java.util.List;
@@ -94,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.
         *
@@ -471,4 +482,53 @@ public interface GSSDAO {
      * @throws ObjectNotFoundException
      */
     public FileHeader getFileForIndexing(Long id) throws ObjectNotFoundException;
+
+       /**
+        * @param userId
+        * @return
+        */
+       List<FileHeader> getSharingFilesForUser(Long userId);
+
+       /**
+        * @param userId
+        * @return
+        */
+       List<Folder> getSharingFoldersForUser(Long userId);
+
+       /**
+        * @param userId
+        * @return
+        */
+       List<Group> getGroupsContainingUser(Long userId);
+
+       /**
+        * @param userId
+        * @return
+        */
+       List<FileUploadStatus> getUploadStatus(Long userId);
+
+       /**
+        * @param userId
+        * @return
+        */
+       int deletePermissionsNotCorrespondingToFilesAndFolders(Long userId);
+       
+       /**
+        * Returns a list of the top two entries related to the date that a user logged in the service. 
+        * The first entry is related to the current session user login 
+        * and the latter is related to the user's last login
+        *  
+        * @param userId
+        * @return a list of last user login and the current session user login
+        */
+       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);
+
 }