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 * @return the new folder
143 * @throws DuplicateNameException if the specified name already exists in
144 * the parent folder, as either a folder or file
145 * @throws ObjectNotFoundException if the user or parent folder was not
146 * found, with the exception message mentioning the precise
148 * @throws InsufficientPermissionsException
150 public FolderDTO createFolder(Long userId, Long parentId, String name) throws DuplicateNameException, ObjectNotFoundException, InsufficientPermissionsException;
153 * Deletes the specified folder if the specified user has the appropriate
158 * @throws InsufficientPermissionsException if the user does not have the
159 * appropriate privileges
160 * @throws ObjectNotFoundException if the user or folder was not found, with
161 * the exception message mentioning the precise problem
163 public void deleteFolder(Long userId, Long folderId) throws InsufficientPermissionsException, ObjectNotFoundException;
166 * Retrieve the subfolders of the specified folder.
168 * @param userId the ID of the current user
169 * @param folderId the ID of the folder to retrieve
170 * @return the list of subfolders found
171 * @throws ObjectNotFoundException if the folder or user was not found
172 * @throws InsufficientPermissionsException
174 public List<FolderDTO> getSubfolders(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
178 * Retrieve the subfolders of the specified folder that are shared to others.
180 * @param userId the ID of the current user
181 * @param folderId the ID of the folder to retrieve
182 * @return the list of subfolders found
183 * @throws ObjectNotFoundException if the folder or user was not found
185 public List<FolderDTO> getSharedSubfolders(Long userId, Long folderId) throws ObjectNotFoundException;
188 * Modifies the specified folder if the specified user has the appropriate
191 * @param userId the ID of the current user
192 * @param folderId the ID of the folder to retrieve
194 * @return the updated folder
195 * @throws InsufficientPermissionsException if the user does not have the
196 * appropriate privileges
197 * @throws ObjectNotFoundException if the user or folder was not found, with
198 * the exception message mentioning the precise problem
199 * @throws DuplicateNameException if the specified name already exists in
200 * the parent folder, as either a folder or file
202 public FolderDTO modifyFolder(Long userId, Long folderId, String folderName) throws InsufficientPermissionsException, ObjectNotFoundException, DuplicateNameException;
205 * Adds a user to the specified group
207 * @param userId the ID of the current user
208 * @param groupId the id of the new group
209 * @param userToAddId the id of the user to add
210 * @throws DuplicateNameException if the user already exists in group
211 * @throws ObjectNotFoundException if the user or group was not found, with
212 * the exception message mentioning the precise problem
213 * @throws InsufficientPermissionsException
215 public void addUserToGroup(Long userId, Long groupId, Long userToAddId) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException;
218 * Creates a new group with the specified owner and name.
220 * @param userId the ID of the current user
221 * @param name the name of the new group
222 * @throws DuplicateNameException if the new group name already exists
223 * @throws ObjectNotFoundException if the user or group was not found, with
224 * the exception message mentioning the precise problem
226 public void createGroup(Long userId, String name) throws ObjectNotFoundException, DuplicateNameException;
229 * Deletes the specified group in the specified user's namespace.
231 * @param userId the ID of the current user
232 * @param groupId the ID of the group to delete
233 * @throws ObjectNotFoundException if the user or group was not found, with
234 * the exception message mentioning the precise problem
235 * @throws InsufficientPermissionsException
237 public void deleteGroup(Long userId, Long groupId) throws ObjectNotFoundException, InsufficientPermissionsException;
240 * Creates a new file with the specified owner, parent folder and name. The
241 * new file has the same permissions as its parent folder. The file contents
242 * are read from the input stream to a new File object.
244 * @param userId the ID of the current user
245 * @param folderId the ID of the parent folder
246 * @param name the name of the new file
247 * @param mimeType the MIME type of the file
248 * @param stream the input stream with the file contents
249 * @return The FileHeaderDTO created
250 * @throws DuplicateNameException if the specified name already exists in
251 * the parent folder, as either a folder or file
252 * @throws ObjectNotFoundException if the user or parent folder was not
253 * found, with the exception message mentioning the precise
255 * @throws GSSIOException if there was an error while storing the file contents
256 * @throws InsufficientPermissionsException
258 public FileHeaderDTO createFile(Long userId, Long folderId, String name, String mimeType, InputStream stream) throws DuplicateNameException, ObjectNotFoundException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
261 * Deletes the specified file in the specified user's namespace.
263 * @param userId the ID of the current user
264 * @param fileId the ID of the file to delete
265 * @throws ObjectNotFoundException if the user or file was not found, with
266 * the exception message mentioning the precise problem
267 * @throws InsufficientPermissionsException if the user does not have the
268 * appropriate privileges
270 public void deleteFile(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
273 * Creates a new tag for the specified user and file.
275 * @param userId the creator of the tag
276 * @param fileHeaderId the file that is tagged
278 * @throws ObjectNotFoundException if the user or the file was not found
280 public void createTag(Long userId, Long fileHeaderId, String tag) throws ObjectNotFoundException;
283 * Returns all tags defined by the specified user
286 * @return Set<String>
287 * @throws ObjectNotFoundException if the user was null
289 public Set<String> getUserTags(final Long userId) throws ObjectNotFoundException;
292 * Updates name and tags for the specified file
297 * @param tagSet a String that contains tags separated by comma
298 * @throws ObjectNotFoundException
299 * @throws InsufficientPermissionsException
301 public void updateFile(Long userId, Long fileId, String name, String tagSet) throws ObjectNotFoundException, InsufficientPermissionsException;
304 * Retrieve the contents of the current body for the file
305 * with the specified FileHeader ID. The file contents
306 * are provided as an InputStream from which the caller can
307 * retrieve the raw bytes.
309 * @param userId the ID of the current user
310 * @param fileId the ID of the file to retrieve
311 * @return an InputStream from the current file body contents
312 * @throws ObjectNotFoundException if the file or the user was not found
313 * @throws InsufficientPermissionsException if the user does not have the
314 * appropriate privileges
316 public InputStream getFileContents(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
319 * Retrieve the file with the specified ID.
321 * @param userId the ID of the current user
322 * @param fileId the ID of the file to retrieve
323 * @return the file found
324 * @throws ObjectNotFoundException if the file or the user was not found, with
325 * the exception message mentioning the precise problem
326 * @throws InsufficientPermissionsException
328 public FileHeaderDTO getFile(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
331 * Get the resource (file or folder) at the specified path in
332 * the specified user's namespace. The returned object will be of type
333 * FileHeaderDTO or FolderDTO.<p><strong>Note:</strong> this method does not
334 * receive the current user as a parameter, therefore it is unable to perform
335 * the necessary permission checks and should <strong>NOT</strong> be directly
336 * exposed to remote clients. It is the caller's responsibility to verify that
337 * the calling user has the required privileges for performing any subsequent
338 * action on the resource through one of the other ExternalAPI methods.
340 * @param ownerId the ID of the user owning the namespace
341 * @param path the absolute path in the user's namespace
342 * @param ignoreDeleted if true, resources that have been moved to the trash
344 * @throws ObjectNotFoundException if the user or resource was not found, with
345 * the exception message mentioning the precise problem
346 * @return the resource found
348 public Object getResourceAtPath(Long ownerId, String path, boolean ignoreDeleted)
349 throws ObjectNotFoundException;
352 * Copy the provided file to the specified destination.
354 * @param userId the ID of the current user
355 * @param fileId the IF of the provided file
356 * @param dest the path to the destination folder
357 * @throws ObjectNotFoundException if the user, file or destination was not
358 * found, with the exception message mentioning the precise problem
359 * @throws GSSIOException if there was an error while accessing the file contents
360 * @throws DuplicateNameException if the specified name already exists in
361 * the destination folder, as either a folder or file
362 * @throws InsufficientPermissionsException
364 public void copyFile(Long userId, Long fileId, String dest) throws ObjectNotFoundException, DuplicateNameException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
367 * Copy the provided file to the specified destination.
369 * @param userId the ID of the current user
370 * @param fileId the IF of the provided file
371 * @param destId the ID of the destination folder
372 * @param destName the name of the new file
373 * @throws ObjectNotFoundException if the user, file or destination was not
374 * found, with the exception message mentioning the precise problem
375 * @throws GSSIOException if there was an error while accessing the file contents
376 * @throws DuplicateNameException if the specified name already exists in
377 * the destination folder, as either a folder or file
378 * @throws InsufficientPermissionsException
380 public void copyFile(Long userId, Long fileId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
383 * Copy the provided folder to the specified destination.
385 * @param userId the ID of the current user
386 * @param folderId the IF of the provided folder
387 * @param dest the path to the destination folder
388 * @throws ObjectNotFoundException if the user, folder or destination was not
389 * found, with the exception message mentioning the precise problem
390 * @throws DuplicateNameException if the specified name already exists in
391 * the destination folder, as either a folder or file
392 * @throws InsufficientPermissionsException InsufficientPermissionsException if the user does not have the
393 * appropriate privileges
395 public void copyFolder(Long userId, Long folderId, String dest) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, QuotaExceededException;
398 * Copy the provided folder to the specified destination.
400 * @param userId the ID of the current user
401 * @param folderId the IF of the provided folder
402 * @param destId the ID of the destination folder
403 * @param destName the name of the new folder
404 * @throws ObjectNotFoundException if the user, folder or destination was not
405 * found, with the exception message mentioning the precise problem
406 * @throws DuplicateNameException if the specified name already exists in
407 * the destination folder, as either a folder or file
408 * @throws InsufficientPermissionsException InsufficientPermissionsException if the user does not have the
409 * appropriate privileges
411 public void copyFolder(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, QuotaExceededException;
414 * Copy the provided folder and all its subfolders and files to the specified destination.
416 * @param userId the ID of the current user
417 * @param folderId the IF of the provided folder
418 * @param destId the ID of the destination folder
419 * @param destName the name of the new folder
420 * @throws ObjectNotFoundException if the user, folder or destination was not
421 * found, with the exception message mentioning the precise problem
422 * @throws DuplicateNameException if the specified name already exists in
423 * the destination folder, as either a folder or file
424 * @throws InsufficientPermissionsException InsufficientPermissionsException if the user does not have the
425 * appropriate privileges
426 * @throws GSSIOException
428 public void copyFolderStructure(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException,GSSIOException, QuotaExceededException;
431 * Marks the specified file as deleted in the specified user's namespace.
433 * @param userId the ID of the current user
434 * @param fileId the ID of the file to delete
435 * @throws ObjectNotFoundException if the user or file was not found, with
436 * the exception message mentioning the precise problem
437 * @throws InsufficientPermissionsException if the user does not have the
438 * appropriate privileges
440 public void moveFileToTrash(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
443 * Marks the specified deleted file as undeleted in the specified user's namespace.
445 * @param userId the ID of the current user
446 * @param fileId the ID of the file to undelete
447 * @throws ObjectNotFoundException if the user or file was not found, with
448 * the exception message mentioning the precise problem
449 * @throws InsufficientPermissionsException if the user does not have the
450 * appropriate privileges
452 public void removeFileFromTrash(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
455 * Marks the specified folder as deleted in the specified user's namespace.
457 * @param userId the ID of the current user
458 * @param folderId the ID of the folder to delete
459 * @throws ObjectNotFoundException if the user or file was not found, with
460 * the exception message mentioning the precise problem
461 * @throws InsufficientPermissionsException if the user does not have the
462 * appropriate privileges
464 public void moveFolderToTrash(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
467 * Marks the specified deleted folder as undeleted in the specified user's namespace.
469 * @param userId the ID of the current user
470 * @param folderId the ID of the folder to undelete
471 * @throws ObjectNotFoundException if the user or file was not found, with
472 * the exception message mentioning the precise problem
473 * @throws InsufficientPermissionsException if the user does not have the
474 * appropriate privileges
476 public void removeFolderFromTrash(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
479 * Move the provided folder and all its subfolders and files to the specified destination.
481 * @param userId the ID of the current user
482 * @param folderId the IF of the provided folder
483 * @param destId the ID of the destination folder
484 * @param destName the name of the new folder
485 * @throws ObjectNotFoundException if the user, folder or destination was not
486 * found, with the exception message mentioning the precise problem
487 * @throws DuplicateNameException if the specified name already exists in
488 * the destination folder, as either a folder or file
489 * @throws InsufficientPermissionsException if the user does not have the
490 * appropriate privileges
491 * @throws GSSIOException
493 public void moveFolder(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, GSSIOException, QuotaExceededException;
496 * move the provided file to the specified destination.
498 * @param userId the ID of the current user
499 * @param fileId the IF of the provided file
500 * @param destId the ID of the destination folder
501 * @param destName the name of the new file
502 * @throws InsufficientPermissionsException
503 * @throws ObjectNotFoundException if the user, file or destination was not
504 * found, with the exception message mentioning the precise problem
505 * @throws GSSIOException if there was an error while accessing the file contents
506 * @throws DuplicateNameException if the specified name already exists in
507 * the destination folder, as either a folder or file
509 public void moveFile(Long userId, Long fileId, Long destId, String destName) throws InsufficientPermissionsException, ObjectNotFoundException, DuplicateNameException, GSSIOException, QuotaExceededException;
512 * Returns a list of All deleted files of a user.
514 * @param userId the ID of the User
515 * * @return the list of deleted file header objects
516 * @throws ObjectNotFoundException if the user cannot be found
518 public List<FileHeaderDTO> getDeletedFiles(Long userId) throws ObjectNotFoundException;
521 * Returns a list of All deleted root folders of a user.
523 * @param userId the ID of the User
524 * * @return the list of deleted file header objects
525 * @throws ObjectNotFoundException if the user cannot be found
527 public List<FolderDTO> getDeletedRootFolders(Long userId) throws ObjectNotFoundException;
530 * Empty Trash by deleting all marked as deleted files and folders
532 * @throws ObjectNotFoundException if something goes wrong in the delete process
533 * @throws InsufficientPermissionsException if something goes wrong in the delete process
535 public void emptyTrash(Long userId) throws ObjectNotFoundException, InsufficientPermissionsException;
538 * Restores All Trashed Items by undeleting all marked as deleted files and folders
540 * @throws ObjectNotFoundException if something goes wrong in the delete process
541 * @throws InsufficientPermissionsException if the user does not have the
542 * appropriate privileges
544 public void restoreTrash(Long userId) throws ObjectNotFoundException, InsufficientPermissionsException;
547 * Search the system for a user with the specified username.
548 * If no such user is found, the method returns null.
550 * @param username the username to search for
551 * @return the User object with the specified username
553 public User findUser(String username);
556 * Create a new user with the specified name, username and e-mail address.
558 * @param username the username of the new user
559 * @param name the full name of the new user
560 * @param mail the e-mail of the new user
561 * @return the newly-created User object
562 * @throws DuplicateNameException if a user with the same username already exists
563 * @throws ObjectNotFoundException if no username was provided
565 public User createUser(String username, String name, String mail) throws DuplicateNameException, ObjectNotFoundException;
568 * Updates the authentication token for the specified user.
570 * @param userId the ID of the user whose token should be updated
571 * @return the updated user
572 * @throws ObjectNotFoundException if the user could not be found
574 public User updateUserToken(Long userId) throws ObjectNotFoundException;
577 * Invalidates the authentication token for the specified user.
579 * @param userId the ID of the user whose token should be updated
580 * @throws ObjectNotFoundException if the user could not be found
582 public void invalidateUserToken(Long userId) throws ObjectNotFoundException;
585 * Retrieve folder user and group permissions
587 * @param userId the ID of the user whose token should be updated
588 * @param folderId the ID of the folder
589 * @return the Set of permissions from requested folder
590 * @throws ObjectNotFoundException if the user or folder could not be found
591 * @throws InsufficientPermissionsException
593 public Set<PermissionDTO> getFolderPermissions(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
597 * update folder permissions
601 * @throws ObjectNotFoundException
602 * @throws InsufficientPermissionsException
604 public void setFolderPermissions(Long userId, Long folderId, Set<PermissionDTO> permissions) throws ObjectNotFoundException, InsufficientPermissionsException;
608 * Retrieve file user and group permissions
610 * @param userId the ID of the user whose token should be updated
611 * @param fileId the ID of the folder
612 * @return the Set of permissions from requested folder
613 * @throws ObjectNotFoundException if the user or folder could not be found
614 * @throws InsufficientPermissionsException
616 public Set<PermissionDTO> getFilePermissions(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
620 * update file permissions
624 * @throws ObjectNotFoundException
625 * @throws InsufficientPermissionsException
627 public void setFilePermissions(Long userId, Long fileId, Boolean ReadForAll, Set<PermissionDTO> permissions) throws ObjectNotFoundException, InsufficientPermissionsException;
630 * Returns a list of All Shared root folders of a user.
632 * @param userId the ID of the User
633 * * @return the list of shared root folders
634 * @throws ObjectNotFoundException if the user cannot be found
636 public List<FolderDTO> getSharedRootFolders(Long userId) throws ObjectNotFoundException;
639 * Returns a list of All Shared files of a user.
641 * @param userId the ID of the User
642 * * @return the list of shared files
643 * @throws ObjectNotFoundException if the user cannot be found
645 public List<FileHeaderDTO> getSharedFilesNotInSharedFolders(Long userId) throws ObjectNotFoundException;
648 * Returns a list of All Shared root folders of a user that calling user has at least read permissions.
650 * @param ownerId the ID of the User
651 * @return the list of shared root folders
652 * @param callingUserId
654 * @throws ObjectNotFoundException if the user cannot be found
656 public List<FolderDTO> getSharedRootFolders(Long ownerId, Long callingUserId) throws ObjectNotFoundException;
659 * Returns a list of All Shared files of a user that calling user has at least read permissions..
661 * @param ownerId the ID of the User
662 * @return the list of shared files
663 * @param callingUserId
664 * @throws ObjectNotFoundException if the user cannot be found
666 public List<FileHeaderDTO> getSharedFiles(Long ownerId, Long callingUserId) throws ObjectNotFoundException;
669 * Remove a user member from a group
671 * @param userId the ID of the User owning the group
672 * @param groupId the ID of the requested group
673 * @param memberId the ID of the member to be removed
675 * @throws ObjectNotFoundException if the user or group was not found, with
676 * the exception message mentioning the precise problem
677 * @throws InsufficientPermissionsException
679 public void removeMemberFromGroup(Long userId, Long groupId, Long memberId) throws ObjectNotFoundException, InsufficientPermissionsException;
682 * Retrieves the list of users sharing files to user identified by user id
684 * @return the List of users sharing files to user
685 * @throws ObjectNotFoundException
687 public List<UserDTO> getUsersSharingFoldersForUser(Long userId) throws ObjectNotFoundException;
690 * Indexes the file meta-data and contents. It actually sends the info to be indexed to a message queue
691 * and the actual indexing will be done in the background
693 * @param fileId The id of the file to be indexed. The message processor will retreive all file data
695 * @param delete if true the file is removed from the index
697 public void indexFile(Long fileId, boolean delete);
704 * @return list of files that match query
705 * @throws ObjectNotFoundException
707 public List<FileHeaderDTO> searchFiles(Long userId, String query) throws ObjectNotFoundException;
710 * It is used by the Solr mbean to rebuild the index.
712 public void rebuildSolrIndex();
715 * Search the system for a user with the specified email address.
716 * If no such user is found, the method returns null.
718 public User findUserByEmail(String email);
721 * Update the user with the values from the supplied object.
723 public void updateUser(User user);
726 * Check if the user with the specified ID has permission to read the
727 * folder with the supplied ID.
729 public boolean canReadFolder(Long userId, Long folderId) throws ObjectNotFoundException;