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.FileHeader;
27 import gr.ebs.gss.server.domain.User;
28 import gr.ebs.gss.server.domain.dto.FileHeaderDTO;
29 import gr.ebs.gss.server.domain.dto.FolderDTO;
30 import gr.ebs.gss.server.domain.dto.GroupDTO;
31 import gr.ebs.gss.server.domain.dto.PermissionDTO;
32 import gr.ebs.gss.server.domain.dto.UserDTO;
34 import java.io.InputStream;
35 import java.util.Date;
36 import java.util.List;
39 import javax.ejb.Remote;
42 * The External API for GSS clients.
47 public interface ExternalAPIRemote {
50 * Retrieves the root folder for the specified user. The caller must ensure
51 * that the userId exists.
55 * @throws ObjectNotFoundException if no Folder or user was found
57 public FolderDTO getRootFolder(Long userId) throws ObjectNotFoundException;
60 * Retrieve the folder with the specified ID.
62 * @param userId the ID of the current user
63 * @param folderId the ID of the folder to retrieve
64 * @return the folder found
65 * @throws ObjectNotFoundException if the folder or the user was not found
66 * @throws InsufficientPermissionsException if ther user does not have read permissions for folder
68 public FolderDTO getFolder(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
71 * Returns the user with the specified ID.
73 * @param userId The ID of the User to be found
74 * @return The User object
75 * @throws ObjectNotFoundException if the user cannot be found
77 public User getUser(Long userId) throws ObjectNotFoundException;
80 * Returns the user with the specified ID.
82 * @param userId The ID of the User to be found
83 * @return The User object
84 * @throws ObjectNotFoundException if the user cannot be found
86 public UserDTO getUserDTO(Long userId) throws ObjectNotFoundException;
89 * Returns the group with the specified ID.
91 * @param groupId The ID of the Group to be found
92 * @return The Group object
93 * @throws ObjectNotFoundException if the group cannot be found
95 public GroupDTO getGroup(Long groupId) throws ObjectNotFoundException;
98 * Retrieve the list of groups for a particular user.
100 * @param userId the ID of the User
101 * @return a List of Groups that belong to the specified User
102 * @throws ObjectNotFoundException if the user was not found
104 public List<GroupDTO> getGroups(Long userId) throws ObjectNotFoundException;
107 * Returns a list of files contained in the folder specified by its id.
109 * @param userId the ID of the User
110 * @param folderId the ID of the folder containing the files
111 * @param ignoreDeleted
112 * @return the list of file header objects
113 * @throws ObjectNotFoundException if the user or the folder cannot be found
114 * @throws InsufficientPermissionsException
116 public List<FileHeaderDTO> getFiles(Long userId, Long folderId, boolean ignoreDeleted) throws ObjectNotFoundException, InsufficientPermissionsException;
119 * Returns a list of users for the specified group
121 * @param userId the ID of the User
122 * @param groupId the ID of the requested group
123 * @return List<UserDTO>
124 * @throws ObjectNotFoundException if the user or group was not found, with
125 * the exception message mentioning the precise problem
127 public List<UserDTO> getUsers(Long userId, Long groupId) throws ObjectNotFoundException;
130 * Returns a list of users for the specified username
132 * @param username the username of the User
133 * @return List<UserDTO>
135 public List<UserDTO> getUsersByUserNameLike(String username);
138 * Creates a new folder with the specified owner, parent folder and name.
139 * New folder has the same permissions as its parent
144 * @return the new folder
145 * @throws DuplicateNameException if the specified name already exists in
146 * the parent folder, as either a folder or file
147 * @throws ObjectNotFoundException if the user or parent folder was not
148 * found, with the exception message mentioning the precise
150 * @throws InsufficientPermissionsException
152 public FolderDTO createFolder(Long userId, Long parentId, String name) throws DuplicateNameException, ObjectNotFoundException, InsufficientPermissionsException;
155 * Deletes the specified folder if the specified user has the appropriate
160 * @throws InsufficientPermissionsException if the user does not have the
161 * appropriate privileges
162 * @throws ObjectNotFoundException if the user or folder was not found, with
163 * the exception message mentioning the precise problem
165 public void deleteFolder(Long userId, Long folderId) throws InsufficientPermissionsException, ObjectNotFoundException;
168 * Retrieve the subfolders of the specified folder.
170 * @param userId the ID of the current user
171 * @param folderId the ID of the folder to retrieve
172 * @return the list of subfolders found
173 * @throws ObjectNotFoundException if the folder or user was not found
174 * @throws InsufficientPermissionsException
176 public List<FolderDTO> getSubfolders(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
180 * Retrieve the subfolders of the specified folder that are shared to others.
182 * @param userId the ID of the current user
183 * @param folderId the ID of the folder to retrieve
184 * @return the list of subfolders found
185 * @throws ObjectNotFoundException if the folder or user was not found
187 public List<FolderDTO> getSharedSubfolders(Long userId, Long folderId) throws ObjectNotFoundException;
190 * Modifies the specified folder if the specified user has the appropriate
193 * @param userId the ID of the current user
194 * @param folderId the ID of the folder to retrieve
198 * @return the updated folder
199 * @throws InsufficientPermissionsException if the user does not have the
200 * appropriate privileges
201 * @throws ObjectNotFoundException if the user or folder was not found, with
202 * the exception message mentioning the precise problem
203 * @throws DuplicateNameException if the specified name already exists in
204 * the parent folder, as either a folder or file
206 public FolderDTO updateFolder(Long userId, Long folderId, String folderName,
208 Set<PermissionDTO> permissions)
209 throws InsufficientPermissionsException, ObjectNotFoundException,
210 DuplicateNameException;
213 * Adds a user to the specified group
215 * @param userId the ID of the current user
216 * @param groupId the id of the new group
217 * @param userToAddId the id of the user to add
218 * @throws DuplicateNameException if the user already exists in group
219 * @throws ObjectNotFoundException if the user or group was not found, with
220 * the exception message mentioning the precise problem
221 * @throws InsufficientPermissionsException
223 public void addUserToGroup(Long userId, Long groupId, Long userToAddId) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException;
226 * Creates a new group with the specified owner and name.
228 * @param userId the ID of the current user
229 * @param name the name of the new group
230 * @throws DuplicateNameException if the new group name already exists
231 * @throws ObjectNotFoundException if the user or group was not found, with
232 * the exception message mentioning the precise problem
234 public void createGroup(Long userId, String name) throws ObjectNotFoundException, DuplicateNameException;
237 * Deletes the specified group in the specified user's namespace.
239 * @param userId the ID of the current user
240 * @param groupId the ID of the group to delete
241 * @throws ObjectNotFoundException if the user or group was not found, with
242 * the exception message mentioning the precise problem
243 * @throws InsufficientPermissionsException
245 public void deleteGroup(Long userId, Long groupId) throws ObjectNotFoundException, InsufficientPermissionsException;
248 * Creates a new file with the specified owner, parent folder and name. The
249 * new file has the same permissions as its parent folder. The file contents
250 * are read from the input stream to a new File object.
252 * @param userId the ID of the current user
253 * @param folderId the ID of the parent folder
254 * @param name the name of the new file
255 * @param mimeType the MIME type of the file
256 * @param stream the input stream with the file contents
257 * @return The FileHeaderDTO created
258 * @throws DuplicateNameException if the specified name already exists in
259 * the parent folder, as either a folder or file
260 * @throws ObjectNotFoundException if the user or parent folder was not
261 * found, with the exception message mentioning the precise
263 * @throws GSSIOException if there was an error while storing the file contents
264 * @throws InsufficientPermissionsException
266 public FileHeaderDTO createFile(Long userId, Long folderId, String name, String mimeType, InputStream stream) throws DuplicateNameException, ObjectNotFoundException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
269 * Deletes the specified file in the specified user's namespace.
271 * @param userId the ID of the current user
272 * @param fileId the ID of the file to delete
273 * @throws ObjectNotFoundException if the user or file was not found, with
274 * the exception message mentioning the precise problem
275 * @throws InsufficientPermissionsException if the user does not have the
276 * appropriate privileges
278 public void deleteFile(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
281 * Creates a new tag for the specified user and file.
283 * @param userId the creator of the tag
284 * @param fileHeaderId the file that is tagged
286 * @throws ObjectNotFoundException if the user or the file was not found
288 public void createTag(Long userId, Long fileHeaderId, String tag) throws ObjectNotFoundException;
291 * Returns all tags defined by the specified user
294 * @return Set<String>
295 * @throws ObjectNotFoundException if the user was null
297 public Set<String> getUserTags(final Long userId) throws ObjectNotFoundException;
300 * Updates the attributes of the specified file.
305 * @param tagSet a String that contains tags separated by comma
306 * @param modificationDate the modification date
307 * @param versioned the new value of the versioned flag
310 * @throws DuplicateNameException
311 * @throws ObjectNotFoundException
312 * @throws InsufficientPermissionsException
314 public void updateFile(Long userId, Long fileId, String name, String tagSet,
315 Date modificationDate, Boolean versioned, Boolean readForAll,
316 Set<PermissionDTO> permissions)
317 throws DuplicateNameException, ObjectNotFoundException, InsufficientPermissionsException;
320 * Retrieve the contents of the current body for the file
321 * with the specified FileHeader ID. The file contents
322 * are provided as an InputStream from which the caller can
323 * retrieve the raw bytes.
325 * @param userId the ID of the current user
326 * @param fileId the ID of the file to retrieve
327 * @return an InputStream from the current file body contents
328 * @throws ObjectNotFoundException if the file or the user was not found
329 * @throws InsufficientPermissionsException if the user does not have the
330 * appropriate privileges
332 public InputStream getFileContents(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
335 * Retrieve the file with the specified ID.
337 * @param userId the ID of the current user
338 * @param fileId the ID of the file to retrieve
339 * @return the file found
340 * @throws ObjectNotFoundException if the file or the user was not found, with
341 * the exception message mentioning the precise problem
342 * @throws InsufficientPermissionsException
344 public FileHeaderDTO getFile(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
347 * Get the resource (file or folder) at the specified path in
348 * the specified user's namespace. The returned object will be of type
349 * FileHeaderDTO or FolderDTO.<p><strong>Note:</strong> this method does not
350 * receive the current user as a parameter, therefore it is unable to perform
351 * the necessary permission checks and should <strong>NOT</strong> be directly
352 * exposed to remote clients. It is the caller's responsibility to verify that
353 * the calling user has the required privileges for performing any subsequent
354 * action on the resource through one of the other ExternalAPI methods.
356 * @param ownerId the ID of the user owning the namespace
357 * @param path the absolute path in the user's namespace
358 * @param ignoreDeleted if true, resources that have been moved to the trash
360 * @throws ObjectNotFoundException if the user or resource was not found, with
361 * the exception message mentioning the precise problem
362 * @return the resource found
364 public Object getResourceAtPath(Long ownerId, String path, boolean ignoreDeleted)
365 throws ObjectNotFoundException;
368 * Copy the provided file to the specified destination.
370 * @param userId the ID of the current user
371 * @param fileId the IF of the provided file
372 * @param dest the path to the destination folder
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, String dest) throws ObjectNotFoundException, DuplicateNameException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
383 * Copy the provided file to the specified destination.
385 * @param userId the ID of the current user
386 * @param fileId the IF of the provided file
387 * @param destId the ID of the destination folder
388 * @param destName the name of the new file
389 * @throws ObjectNotFoundException if the user, file or destination was not
390 * found, with the exception message mentioning the precise problem
391 * @throws GSSIOException if there was an error while accessing the file contents
392 * @throws DuplicateNameException if the specified name already exists in
393 * the destination folder, as either a folder or file
394 * @throws InsufficientPermissionsException
396 public void copyFile(Long userId, Long fileId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, GSSIOException, InsufficientPermissionsException, QuotaExceededException;
399 * Copy the provided folder to the specified destination.
401 * @param userId the ID of the current user
402 * @param folderId the IF of the provided folder
403 * @param dest the path to the destination 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, String dest) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, QuotaExceededException;
414 * Copy the provided folder 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
427 public void copyFolder(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, QuotaExceededException;
430 * Copy the provided folder and all its subfolders and files to the specified destination.
432 * @param userId the ID of the current user
433 * @param folderId the IF of the provided folder
434 * @param destId the ID of the destination folder
435 * @param destName the name of the new folder
436 * @throws ObjectNotFoundException if the user, folder or destination was not
437 * found, with the exception message mentioning the precise problem
438 * @throws DuplicateNameException if the specified name already exists in
439 * the destination folder, as either a folder or file
440 * @throws InsufficientPermissionsException InsufficientPermissionsException if the user does not have the
441 * appropriate privileges
442 * @throws GSSIOException
444 public void copyFolderStructure(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException,GSSIOException, QuotaExceededException;
447 * Marks the specified file as deleted in the specified user's namespace.
449 * @param userId the ID of the current user
450 * @param fileId the ID of the file to delete
451 * @throws ObjectNotFoundException if the user or file was not found, with
452 * the exception message mentioning the precise problem
453 * @throws InsufficientPermissionsException if the user does not have the
454 * appropriate privileges
456 public void moveFileToTrash(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
459 * Marks the specified deleted file as undeleted in the specified user's namespace.
461 * @param userId the ID of the current user
462 * @param fileId the ID of the file to undelete
463 * @throws ObjectNotFoundException if the user or file was not found, with
464 * the exception message mentioning the precise problem
465 * @throws InsufficientPermissionsException if the user does not have the
466 * appropriate privileges
468 public void removeFileFromTrash(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
471 * Marks the specified folder as deleted in the specified user's namespace.
473 * @param userId the ID of the current user
474 * @param folderId the ID of the folder to delete
475 * @throws ObjectNotFoundException if the user or file was not found, with
476 * the exception message mentioning the precise problem
477 * @throws InsufficientPermissionsException if the user does not have the
478 * appropriate privileges
480 public void moveFolderToTrash(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
483 * Marks the specified deleted folder as undeleted in the specified user's namespace.
485 * @param userId the ID of the current user
486 * @param folderId the ID of the folder to undelete
487 * @throws ObjectNotFoundException if the user or file was not found, with
488 * the exception message mentioning the precise problem
489 * @throws InsufficientPermissionsException if the user does not have the
490 * appropriate privileges
492 public void removeFolderFromTrash(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
495 * Move the provided folder and all its subfolders and files to the specified destination.
497 * @param userId the ID of the current user
498 * @param folderId the IF of the provided folder
499 * @param destId the ID of the destination folder
500 * @param destName the name of the new folder
501 * @throws ObjectNotFoundException if the user, folder or destination was not
502 * found, with the exception message mentioning the precise problem
503 * @throws DuplicateNameException if the specified name already exists in
504 * the destination folder, as either a folder or file
505 * @throws InsufficientPermissionsException if the user does not have the
506 * appropriate privileges
507 * @throws GSSIOException
509 public void moveFolder(Long userId, Long folderId, Long destId, String destName) throws ObjectNotFoundException, DuplicateNameException, InsufficientPermissionsException, GSSIOException, QuotaExceededException;
512 * move the provided file to the specified destination.
514 * @param userId the ID of the current user
515 * @param fileId the IF of the provided file
516 * @param destId the ID of the destination folder
517 * @param destName the name of the new file
518 * @throws InsufficientPermissionsException
519 * @throws ObjectNotFoundException if the user, file or destination was not
520 * found, with the exception message mentioning the precise problem
521 * @throws GSSIOException if there was an error while accessing the file contents
522 * @throws DuplicateNameException if the specified name already exists in
523 * the destination folder, as either a folder or file
525 public void moveFile(Long userId, Long fileId, Long destId, String destName) throws InsufficientPermissionsException, ObjectNotFoundException, DuplicateNameException, GSSIOException, QuotaExceededException;
528 * Returns a list of All deleted files of a user.
530 * @param userId the ID of the User
531 * * @return the list of deleted file header objects
532 * @throws ObjectNotFoundException if the user cannot be found
534 public List<FileHeaderDTO> getDeletedFiles(Long userId) throws ObjectNotFoundException;
537 * Returns a list of All deleted root folders of a user.
539 * @param userId the ID of the User
540 * * @return the list of deleted file header objects
541 * @throws ObjectNotFoundException if the user cannot be found
543 public List<FolderDTO> getDeletedRootFolders(Long userId) throws ObjectNotFoundException;
546 * Empty Trash by deleting all marked as deleted files and folders
548 * @throws ObjectNotFoundException if something goes wrong in the delete process
549 * @throws InsufficientPermissionsException if something goes wrong in the delete process
551 public void emptyTrash(Long userId) throws ObjectNotFoundException, InsufficientPermissionsException;
554 * Restores All Trashed Items by undeleting all marked as deleted files and folders
556 * @throws ObjectNotFoundException if something goes wrong in the delete process
557 * @throws InsufficientPermissionsException if the user does not have the
558 * appropriate privileges
560 public void restoreTrash(Long userId) throws ObjectNotFoundException, InsufficientPermissionsException;
563 * Search the system for a user with the specified username.
564 * If no such user is found, the method returns null.
566 * @param username the username to search for
567 * @return the User object with the specified username
569 public User findUser(String username);
572 * Create a new user with the specified name, username and e-mail address.
574 * @param username the username of the new user
575 * @param name the full name of the new user
576 * @param mail the e-mail of the new user
577 * @param idp the IdP of the new user
578 * @param idpid the IdP ID of the new user
579 * @return the newly-created User object
580 * @throws DuplicateNameException if a user with the same username already exists
581 * @throws ObjectNotFoundException if no username was provided
583 public User createUser(String username, String name, String mail,
584 String idp, String idpid) throws DuplicateNameException,
585 ObjectNotFoundException;
588 * Updates the authentication token for the specified user.
590 * @param userId the ID of the user whose token should be updated
591 * @return the updated user
592 * @throws ObjectNotFoundException if the user could not be found
594 public User updateUserToken(Long userId) throws ObjectNotFoundException;
597 * Invalidates the authentication token for the specified user.
599 * @param userId the ID of the user whose token should be updated
600 * @throws ObjectNotFoundException if the user could not be found
602 public void invalidateUserToken(Long userId) throws ObjectNotFoundException;
605 * Retrieve folder user and group permissions
607 * @param userId the ID of the user whose token should be updated
608 * @param folderId the ID of the folder
609 * @return the Set of permissions from requested folder
610 * @throws ObjectNotFoundException if the user or folder could not be found
611 * @throws InsufficientPermissionsException
613 public Set<PermissionDTO> getFolderPermissions(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException;
616 * Retrieve file user and group permissions
618 * @param userId the ID of the user whose token should be updated
619 * @param fileId the ID of the folder
620 * @return the Set of permissions from requested folder
621 * @throws ObjectNotFoundException if the user or folder could not be found
622 * @throws InsufficientPermissionsException
624 public Set<PermissionDTO> getFilePermissions(Long userId, Long fileId) throws ObjectNotFoundException, InsufficientPermissionsException;
627 * Returns a list of All Shared root folders of a user.
629 * @param userId the ID of the User
630 * * @return the list of shared root folders
631 * @throws ObjectNotFoundException if the user cannot be found
633 public List<FolderDTO> getSharedRootFolders(Long userId) throws ObjectNotFoundException;
636 * Returns a list of All Shared files of a user.
638 * @param userId the ID of the User
639 * * @return the list of shared files
640 * @throws ObjectNotFoundException if the user cannot be found
642 public List<FileHeaderDTO> getSharedFilesNotInSharedFolders(Long userId) throws ObjectNotFoundException;
645 * Returns a list of All Shared root folders of a user that calling user has at least read permissions.
647 * @param ownerId the ID of the User
648 * @return the list of shared root folders
649 * @param callingUserId
651 * @throws ObjectNotFoundException if the user cannot be found
653 public List<FolderDTO> getSharedRootFolders(Long ownerId, Long callingUserId) throws ObjectNotFoundException;
656 * Returns a list of All Shared files of a user that calling user has at least read permissions..
658 * @param ownerId the ID of the User
659 * @return the list of shared files
660 * @param callingUserId
661 * @throws ObjectNotFoundException if the user cannot be found
663 public List<FileHeaderDTO> getSharedFiles(Long ownerId, Long callingUserId) throws ObjectNotFoundException;
666 * Remove a user member from a group
668 * @param userId the ID of the User owning the group
669 * @param groupId the ID of the requested group
670 * @param memberId the ID of the member to be removed
672 * @throws ObjectNotFoundException if the user or group was not found, with
673 * the exception message mentioning the precise problem
674 * @throws InsufficientPermissionsException
676 public void removeMemberFromGroup(Long userId, Long groupId, Long memberId) throws ObjectNotFoundException, InsufficientPermissionsException;
679 * Retrieves the list of users sharing files to user identified by user id
681 * @return the List of users sharing files to user
682 * @throws ObjectNotFoundException
684 public List<UserDTO> getUsersSharingFoldersForUser(Long userId) throws ObjectNotFoundException;
687 * Indexes the file meta-data and contents. It actually sends the info to be indexed to a message queue
688 * and the actual indexing will be done in the background
690 * @param fileId The id of the file to be indexed. The message processor will retreive all file data
692 * @param delete if true the file is removed from the index
694 public void indexFile(Long fileId, boolean delete);
701 * @return list of files that match query
702 * @throws ObjectNotFoundException
704 public List<FileHeader> searchFiles(Long userId, String query) throws ObjectNotFoundException;
707 * It is used by the Solr mbean to rebuild the index.
709 public String rebuildSolrIndex();
712 * Search the system for a user with the specified email address.
713 * If no such user is found, the method returns null.
715 public User findUserByEmail(String email);
718 * Update the user with the values from the supplied object.
720 public void updateUser(User user);
723 * Check if the user with the specified ID has permission to read the
724 * folder with the supplied ID.
726 public boolean canReadFolder(Long userId, Long folderId) throws ObjectNotFoundException;