2 * Copyright 2007, 2008, 2009 Electronic Business Systems Ltd.
4 * This file is part of GSS.
6 * GSS is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GSS. If not, see <http://www.gnu.org/licenses/>.
19 package gr.ebs.gss.server.ejb;
21 import gr.ebs.gss.client.exceptions.DuplicateNameException;
22 import gr.ebs.gss.client.exceptions.GSSIOException;
23 import gr.ebs.gss.client.exceptions.InsufficientPermissionsException;
24 import gr.ebs.gss.client.exceptions.ObjectNotFoundException;
25 import gr.ebs.gss.client.exceptions.QuotaExceededException;
26 import gr.ebs.gss.server.domain.User;
27 import gr.ebs.gss.server.domain.dto.FileHeaderDTO;
28 import gr.ebs.gss.server.domain.dto.FolderDTO;
29 import gr.ebs.gss.server.domain.dto.GroupDTO;
30 import gr.ebs.gss.server.domain.dto.PermissionDTO;
31 import gr.ebs.gss.server.domain.dto.UserDTO;
33 import java.io.InputStream;
34 import java.util.List;
37 import javax.ejb.Remote;
40 * The External API for GSS clients.
45 public interface ExternalAPIRemote {
48 * Retrieves the root folder for the specified user. The caller must ensure
49 * that the userId exists.
53 * @throws ObjectNotFoundException if no Folder or user was found
55 public FolderDTO getRootFolder(Long userId) throws ObjectNotFoundException;
58 * Retrieve the folder with the specified ID.
60 * @param userId the ID of the current user
61 * @param folderId the ID of the folder to retrieve
62 * @return the folder found
63 * @throws ObjectNotFoundException if the folder or the user was not found
64 * @throws InsufficientPermissionsException if ther user does not have read permissions for folder
66 public FolderDTO getFolder(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
69 * Returns the user with the specified ID.
71 * @param userId The ID of the User to be found
72 * @return The User object
73 * @throws ObjectNotFoundException if the user cannot be found
75 public User getUser(Long userId) throws ObjectNotFoundException;
78 * Returns the user with the specified ID.
80 * @param userId The ID of the User to be found
81 * @return The User object
82 * @throws ObjectNotFoundException if the user cannot be found
84 public UserDTO getUserDTO(Long userId) throws ObjectNotFoundException;
87 * Returns the group with the specified ID.
89 * @param groupId The ID of the Group to be found
90 * @return The Group object
91 * @throws ObjectNotFoundException if the group cannot be found
93 public GroupDTO getGroup(Long groupId) throws ObjectNotFoundException;
96 * Retrieve the list of groups for a particular user.
98 * @param userId the ID of the User
99 * @return a List of Groups that belong to the specified User
100 * @throws ObjectNotFoundException if the user was not found
102 public List<GroupDTO> getGroups(Long userId) throws ObjectNotFoundException;
105 * Returns a list of files contained in the folder specified by its id.
107 * @param userId the ID of the User
108 * @param folderId the ID of the folder containing the files
109 * @param ignoreDeleted
110 * @return the list of file header objects
111 * @throws ObjectNotFoundException if the user or the folder cannot be found
112 * @throws InsufficientPermissionsException
114 public List<FileHeaderDTO> getFiles(Long userId, Long folderId, boolean ignoreDeleted) throws ObjectNotFoundException, InsufficientPermissionsException;
117 * Returns a list of users for the specified group
119 * @param userId the ID of the User
120 * @param groupId the ID of the requested group
121 * @return List<UserDTO>
122 * @throws ObjectNotFoundException if the user or group was not found, with
123 * the exception message mentioning the precise problem
125 public List<UserDTO> getUsers(Long userId, Long groupId) throws ObjectNotFoundException;
128 * Returns a list of users for the specified username
130 * @param username the username of the User
131 * @return List<UserDTO>
133 public List<UserDTO> getUsersByUserNameLike(String username);
136 * Creates a new folder with the specified owner, parent folder and name.
137 * New folder has the same permissions as its parent
142 * @throws DuplicateNameException if the specified name already exists in
143 * the parent folder, as either a folder or file
144 * @throws ObjectNotFoundException if the user or parent folder was not
145 * found, with the exception message mentioning the precise
147 * @throws InsufficientPermissionsException
149 public void createFolder(Long userId, Long parentId, String name) throws DuplicateNameException, ObjectNotFoundException, InsufficientPermissionsException;
152 * Deletes the specified folder if the specified user has the appropriate
157 * @throws InsufficientPermissionsException if the user does not have the
158 * appropriate privileges
159 * @throws ObjectNotFoundException if the user or folder was not found, with
160 * the exception message mentioning the precise problem
162 public void deleteFolder(Long userId, Long folderId) throws InsufficientPermissionsException, ObjectNotFoundException;
165 * Retrieve the subfolders of the specified folder.
167 * @param userId the ID of the current user
168 * @param folderId the ID of the folder to retrieve
169 * @return the list of subfolders found
170 * @throws ObjectNotFoundException if the folder or user was not found
171 * @throws InsufficientPermissionsException
173 public List<FolderDTO> getSubfolders(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
177 * Retrieve the subfolders of the specified folder that are shared to others.
179 * @param userId the ID of the current user
180 * @param folderId the ID of the folder to retrieve
181 * @return the list of subfolders found
182 * @throws ObjectNotFoundException if the folder or user was not found
184 public List<FolderDTO> getSharedSubfolders(Long userId, Long folderId) throws ObjectNotFoundException;
187 * Modifies the specified folder if the specified user has the appropriate
190 * @param userId the ID of the current user
191 * @param folderId the ID of the folder to retrieve
193 * @throws InsufficientPermissionsException if the user does not have the
194 * appropriate privileges
195 * @throws ObjectNotFoundException if the user or folder was not found, with
196 * the exception message mentioning the precise problem
197 * @throws DuplicateNameException if the specified name already exists in
198 * the parent folder, as either a folder or file
200 public void modifyFolder(Long userId, Long folderId, String folderName) throws InsufficientPermissionsException, ObjectNotFoundException, DuplicateNameException;
203 * Adds a user to the specified group
205 * @param userId the ID of the current user
206 * @param groupId the id of the new group
207 * @param userToAddId the id of the user to add
208 * @throws DuplicateNameException if the user already exists in group
209 * @throws ObjectNotFoundException if the user or group was not found, with
210 * the exception message mentioning the precise problem
211 * @throws InsufficientPermissionsException
213 public void addUserToGroup(Long userId, Long groupId, Long userToAddId) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException;
216 * Creates a new group with the specified owner and name.
218 * @param userId the ID of the current user
219 * @param name the name of the new group
220 * @throws DuplicateNameException if the new group name already exists
221 * @throws ObjectNotFoundException if the user or group was not found, with
222 * the exception message mentioning the precise problem
224 public void createGroup(Long userId, String name) throws ObjectNotFoundException, DuplicateNameException;
227 * Deletes the specified group in the specified user's namespace.
229 * @param userId the ID of the current user
230 * @param groupId the ID of the group to delete
231 * @throws ObjectNotFoundException if the user or group was not found, with
232 * the exception message mentioning the precise problem
233 * @throws InsufficientPermissionsException
235 public void deleteGroup(Long userId, Long groupId) throws ObjectNotFoundException, InsufficientPermissionsException;
238 * Creates a new file with the specified owner, parent folder and name. The
239 * new file has the same permissions as its parent folder. The file contents
240 * are read from the input stream to a new File object.
242 * @param userId the ID of the current user
243 * @param folderId the ID of the parent folder
244 * @param name the name of the new file
245 * @param mimeType the MIME type of the file
246 * @param stream the input stream with the file contents
247 * @return The FileHeaderDTO created
248 * @throws DuplicateNameException if the specified name already exists in
249 * the parent folder, as either a folder or file
250 * @throws ObjectNotFoundException if the user or parent folder was not
251 * found, with the exception message mentioning the precise
253 * @throws GSSIOException if there was an error while storing the file contents
254 * @throws InsufficientPermissionsException
256 public FileHeaderDTO createFile(Long userId, Long folderId, String name, String mimeType, InputStream stream) throws DuplicateNameException, ObjectNotFoundException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
259 * Deletes the specified file in the specified user's namespace.
261 * @param userId the ID of the current user
262 * @param fileId the ID of the file to delete
263 * @throws ObjectNotFoundException if the user or file was not found, with
264 * the exception message mentioning the precise problem
265 * @throws InsufficientPermissionsException if the user does not have the
266 * appropriate privileges
268 public void deleteFile(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
271 * Creates a new tag for the specified user and file.
273 * @param userId the creator of the tag
274 * @param fileHeaderId the file that is tagged
276 * @throws ObjectNotFoundException if the user or the file was not found
278 public void createTag(Long userId, Long fileHeaderId, String tag) throws ObjectNotFoundException;
281 * Returns all tags defined by the specified user
284 * @return Set<String>
285 * @throws ObjectNotFoundException if the user was null
287 public Set<String> getUserTags(final Long userId) throws ObjectNotFoundException;
290 * Updates name and tags for the specified file
295 * @param tagSet a String that contains tags separated by comma
296 * @throws ObjectNotFoundException
297 * @throws InsufficientPermissionsException
299 public void updateFile(Long userId, Long fileId, String name, String tagSet) throws ObjectNotFoundException, InsufficientPermissionsException;
302 * Retrieve the contents of the current body for the file
303 * with the specified FileHeader ID. The file contents
304 * are provided as an InputStream from which the caller can
305 * retrieve the raw bytes.
307 * @param userId the ID of the current user
308 * @param fileId the ID of the file to retrieve
309 * @return an InputStream from the current file body contents
310 * @throws ObjectNotFoundException if the file or the user was not found
311 * @throws InsufficientPermissionsException if the user does not have the
312 * appropriate privileges
314 public InputStream getFileContents(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
317 * Retrieve the file with the specified ID.
319 * @param userId the ID of the current user
320 * @param fileId the ID of the file to retrieve
321 * @return the file found
322 * @throws ObjectNotFoundException if the file or the user was not found, with
323 * the exception message mentioning the precise problem
324 * @throws InsufficientPermissionsException
326 public FileHeaderDTO getFile(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
329 * Get the resource (file or folder) at the specified path in
330 * the specified user's namespace. The returned object will be of type
331 * FileHeaderDTO or FolderDTO.<p><strong>Note:</strong> this method does not
332 * receive the current user as a parameter, therefore it is unable to perform
333 * the necessary permission checks and should <strong>NOT</strong> be directly
334 * exposed to remote clients. It is the caller's responsibility to verify that
335 * the calling user has the required privileges for performing any subsequent
336 * action on the resource through one of the other ExternalAPI methods.
338 * @param ownerId the ID of the user owning the namespace
339 * @param path the absolute path in the user's namespace
340 * @param ignoreDeleted if true, resources that have been moved to the trash
342 * @throws ObjectNotFoundException if the user or resource was not found, with
343 * the exception message mentioning the precise problem
344 * @return the resource found
346 public Object getResourceAtPath(Long ownerId, String path, boolean ignoreDeleted)
347 throws ObjectNotFoundException;
350 * Copy the provided file to the specified destination.
352 * @param userId the ID of the current user
353 * @param fileId the IF of the provided file
354 * @param dest the path to the destination folder
355 * @throws ObjectNotFoundException if the user, file or destination was not
356 * found, with the exception message mentioning the precise problem
357 * @throws GSSIOException if there was an error while accessing the file contents
358 * @throws DuplicateNameException if the specified name already exists in
359 * the destination folder, as either a folder or file
360 * @throws InsufficientPermissionsException
362 public void copyFile(Long userId, Long fileId, String dest) throws ObjectNotFoundException, DuplicateNameException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
365 * Copy the provided file to the specified destination.
367 * @param userId the ID of the current user
368 * @param fileId the IF of the provided file
369 * @param destId the ID of the destination folder
370 * @param destName the name of the new file
371 * @throws ObjectNotFoundException if the user, file or destination was not
372 * found, with the exception message mentioning the precise problem
373 * @throws GSSIOException if there was an error while accessing the file contents
374 * @throws DuplicateNameException if the specified name already exists in
375 * the destination folder, as either a folder or file
376 * @throws InsufficientPermissionsException
378 public void copyFile(Long userId, Long fileId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
381 * Copy the provided folder to the specified destination.
383 * @param userId the ID of the current user
384 * @param folderId the IF of the provided folder
385 * @param dest the path to the destination folder
386 * @throws ObjectNotFoundException if the user, folder or destination was not
387 * found, with the exception message mentioning the precise problem
388 * @throws DuplicateNameException if the specified name already exists in
389 * the destination folder, as either a folder or file
390 * @throws InsufficientPermissionsException InsufficientPermissionsException if the user does not have the
391 * appropriate privileges
393 public void copyFolder(Long userId, Long folderId, String dest) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, QuotaExceededException;
396 * Copy the provided folder to the specified destination.
398 * @param userId the ID of the current user
399 * @param folderId the IF of the provided folder
400 * @param destId the ID of the destination folder
401 * @param destName the name of the new folder
402 * @throws ObjectNotFoundException if the user, folder or destination was not
403 * found, with the exception message mentioning the precise problem
404 * @throws DuplicateNameException if the specified name already exists in
405 * the destination folder, as either a folder or file
406 * @throws InsufficientPermissionsException InsufficientPermissionsException if the user does not have the
407 * appropriate privileges
409 public void copyFolder(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, QuotaExceededException;
412 * Copy the provided folder and all its subfolders and files to the specified destination.
414 * @param userId the ID of the current user
415 * @param folderId the IF of the provided folder
416 * @param destId the ID of the destination folder
417 * @param destName the name of the new folder
418 * @throws ObjectNotFoundException if the user, folder or destination was not
419 * found, with the exception message mentioning the precise problem
420 * @throws DuplicateNameException if the specified name already exists in
421 * the destination folder, as either a folder or file
422 * @throws InsufficientPermissionsException InsufficientPermissionsException if the user does not have the
423 * appropriate privileges
424 * @throws GSSIOException
426 public void copyFolderStructure(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException,GSSIOException, QuotaExceededException;
429 * Marks the specified file as deleted in the specified user's namespace.
431 * @param userId the ID of the current user
432 * @param fileId the ID of the file to delete
433 * @throws ObjectNotFoundException if the user or file was not found, with
434 * the exception message mentioning the precise problem
435 * @throws InsufficientPermissionsException if the user does not have the
436 * appropriate privileges
438 public void moveFileToTrash(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
441 * Marks the specified deleted file as undeleted in the specified user's namespace.
443 * @param userId the ID of the current user
444 * @param fileId the ID of the file to undelete
445 * @throws ObjectNotFoundException if the user or file was not found, with
446 * the exception message mentioning the precise problem
447 * @throws InsufficientPermissionsException if the user does not have the
448 * appropriate privileges
450 public void removeFileFromTrash(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
453 * Marks the specified folder as deleted in the specified user's namespace.
455 * @param userId the ID of the current user
456 * @param folderId the ID of the folder to delete
457 * @throws ObjectNotFoundException if the user or file was not found, with
458 * the exception message mentioning the precise problem
459 * @throws InsufficientPermissionsException if the user does not have the
460 * appropriate privileges
462 public void moveFolderToTrash(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
465 * Marks the specified deleted folder as undeleted in the specified user's namespace.
467 * @param userId the ID of the current user
468 * @param folderId the ID of the folder to undelete
469 * @throws ObjectNotFoundException if the user or file was not found, with
470 * the exception message mentioning the precise problem
471 * @throws InsufficientPermissionsException if the user does not have the
472 * appropriate privileges
474 public void removeFolderFromTrash(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
477 * Move the provided folder and all its subfolders and files to the specified destination.
479 * @param userId the ID of the current user
480 * @param folderId the IF of the provided folder
481 * @param destId the ID of the destination folder
482 * @param destName the name of the new folder
483 * @throws ObjectNotFoundException if the user, folder or destination was not
484 * found, with the exception message mentioning the precise problem
485 * @throws DuplicateNameException if the specified name already exists in
486 * the destination folder, as either a folder or file
487 * @throws InsufficientPermissionsException if the user does not have the
488 * appropriate privileges
489 * @throws GSSIOException
491 public void moveFolder(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, GSSIOException, QuotaExceededException;
494 * move the provided file to the specified destination.
496 * @param userId the ID of the current user
497 * @param fileId the IF of the provided file
498 * @param destId the ID of the destination folder
499 * @param destName the name of the new file
500 * @throws InsufficientPermissionsException
501 * @throws ObjectNotFoundException if the user, file or destination was not
502 * found, with the exception message mentioning the precise problem
503 * @throws GSSIOException if there was an error while accessing the file contents
504 * @throws DuplicateNameException if the specified name already exists in
505 * the destination folder, as either a folder or file
507 public void moveFile(Long userId, Long fileId, Long destId, String destName) throws InsufficientPermissionsException, ObjectNotFoundException, DuplicateNameException, GSSIOException, QuotaExceededException;
510 * Returns a list of All deleted files of a user.
512 * @param userId the ID of the User
513 * * @return the list of deleted file header objects
514 * @throws ObjectNotFoundException if the user cannot be found
516 public List<FileHeaderDTO> getDeletedFiles(Long userId) throws ObjectNotFoundException;
519 * Returns a list of All deleted root folders of a user.
521 * @param userId the ID of the User
522 * * @return the list of deleted file header objects
523 * @throws ObjectNotFoundException if the user cannot be found
525 public List<FolderDTO> getDeletedRootFolders(Long userId) throws ObjectNotFoundException;
528 * Empty Trash by deleting all marked as deleted files and folders
530 * @throws ObjectNotFoundException if something goes wrong in the delete process
531 * @throws InsufficientPermissionsException if something goes wrong in the delete process
533 public void emptyTrash(Long userId) throws ObjectNotFoundException, InsufficientPermissionsException;
536 * Restores All Trashed Items by undeleting all marked as deleted files and folders
538 * @throws ObjectNotFoundException if something goes wrong in the delete process
539 * @throws InsufficientPermissionsException if the user does not have the
540 * appropriate privileges
542 public void restoreTrash(Long userId) throws ObjectNotFoundException, InsufficientPermissionsException;
545 * Search the system for a user with the specified username.
546 * If no such user is found, the method returns null.
548 * @param username the username to search for
549 * @return the User object with the specified username
551 public User findUser(String username);
554 * Create a new user with the specified name, username and e-mail address.
556 * @param username the username of the new user
557 * @param name the full name of the new user
558 * @param mail the e-mail of the new user
559 * @return the newly-created User object
560 * @throws DuplicateNameException if a user with the same username already exists
561 * @throws ObjectNotFoundException if no username was provided
563 public User createUser(String username, String name, String mail) throws DuplicateNameException, ObjectNotFoundException;
566 * Updates the authentication token for the specified user.
568 * @param userId the ID of the user whose token should be updated
569 * @return the updated user
570 * @throws ObjectNotFoundException if the user could not be found
572 public User updateUserToken(Long userId) throws ObjectNotFoundException;
575 * Invalidates the authentication token for the specified user.
577 * @param userId the ID of the user whose token should be updated
578 * @throws ObjectNotFoundException if the user could not be found
580 public void invalidateUserToken(Long userId) throws ObjectNotFoundException;
583 * Retrieve folder user and group permissions
585 * @param userId the ID of the user whose token should be updated
586 * @param folderId the ID of the folder
587 * @return the Set of permissions from requested folder
588 * @throws ObjectNotFoundException if the user or folder could not be found
589 * @throws InsufficientPermissionsException
591 public Set<PermissionDTO> getFolderPermissions(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
595 * update folder permissions
599 * @throws ObjectNotFoundException
600 * @throws InsufficientPermissionsException
602 public void setFolderPermissions(Long userId, Long folderId, Set<PermissionDTO> permissions) throws ObjectNotFoundException, InsufficientPermissionsException;
606 * Retrieve file user and group permissions
608 * @param userId the ID of the user whose token should be updated
609 * @param fileId the ID of the folder
610 * @return the Set of permissions from requested folder
611 * @throws ObjectNotFoundException if the user or folder could not be found
612 * @throws InsufficientPermissionsException
614 public Set<PermissionDTO> getFilePermissions(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
618 * update file permissions
622 * @throws ObjectNotFoundException
623 * @throws InsufficientPermissionsException
625 public void setFilePermissions(Long userId, Long fileId, Boolean ReadForAll, Set<PermissionDTO> permissions) throws ObjectNotFoundException, InsufficientPermissionsException;
628 * Returns a list of All Shared root folders of a user.
630 * @param userId the ID of the User
631 * * @return the list of shared root folders
632 * @throws ObjectNotFoundException if the user cannot be found
634 public List<FolderDTO> getSharedRootFolders(Long userId) throws ObjectNotFoundException;
637 * Returns a list of All Shared files of a user.
639 * @param userId the ID of the User
640 * * @return the list of shared files
641 * @throws ObjectNotFoundException if the user cannot be found
643 public List<FileHeaderDTO> getSharedFilesNotInSharedFolders(Long userId) throws ObjectNotFoundException;
646 * Returns a list of All Shared root folders of a user that calling user has at least read permissions.
648 * @param ownerId the ID of the User
649 * @return the list of shared root folders
650 * @param callingUserId
652 * @throws ObjectNotFoundException if the user cannot be found
654 public List<FolderDTO> getSharedRootFolders(Long ownerId, Long callingUserId) throws ObjectNotFoundException;
657 * Returns a list of All Shared files of a user that calling user has at least read permissions..
659 * @param ownerId the ID of the User
660 * @return the list of shared files
661 * @param callingUserId
662 * @throws ObjectNotFoundException if the user cannot be found
664 public List<FileHeaderDTO> getSharedFiles(Long ownerId, Long callingUserId) throws ObjectNotFoundException;
667 * Remove a user member from a group
669 * @param userId the ID of the User owning the group
670 * @param groupId the ID of the requested group
671 * @param memberId the ID of the member to be removed
673 * @throws ObjectNotFoundException if the user or group was not found, with
674 * the exception message mentioning the precise problem
675 * @throws InsufficientPermissionsException
677 public void removeMemberFromGroup(Long userId, Long groupId, Long memberId) throws ObjectNotFoundException, InsufficientPermissionsException;
680 * Retrieves the list of users sharing files to user identified by user id
682 * @return the List of users sharing files to user
683 * @throws ObjectNotFoundException
685 public List<UserDTO> getUsersSharingFoldersForUser(Long userId) throws ObjectNotFoundException;
688 * Indexes the file meta-data and contents. It actually sends the info to be indexed to a message queue
689 * and the actual indexing will be done in the background
691 * @param fileId The id of the file to be indexed. The message processor will retreive all file data
693 * @param delete if true the file is removed from the index
695 public void indexFile(Long fileId, boolean delete);
702 * @return list of files that match query
703 * @throws ObjectNotFoundException
705 public List<FileHeaderDTO> searchFiles(Long userId, String query) throws ObjectNotFoundException;
708 * It is used by the Solr mbean to rebuild the index.
710 public void rebuildSolrIndex();
713 * Search the system for a user with the specified email address.
714 * If no such user is found, the method returns null.
716 public User findUserByEmail(String email);
719 * Update the user with the values from the supplied object.
721 public void updateUser(User user);
724 * Check if the user with the specified ID has permission to read the
725 * folder with the supplied ID.
727 public boolean canReadFolder(Long userId, Long folderId) throws ObjectNotFoundException;