* @param userId
* @param parentId
* @param name
+ * @return the new folder
* @throws DuplicateNameException if the specified name already exists in
* the parent folder, as either a folder or file
* @throws ObjectNotFoundException if the user or parent folder was not
* problem
* @throws InsufficientPermissionsException
*/
- public void createFolder(Long userId, Long parentId, String name) throws DuplicateNameException,
+ public FolderDTO createFolder(Long userId, Long parentId, String name) throws DuplicateNameException,
ObjectNotFoundException, InsufficientPermissionsException;
/**
* @param userId the ID of the current user
* @param folderId the ID of the folder to retrieve
* @param folderName
+ * @param permissions
+ * @return the updated folder
* @throws InsufficientPermissionsException if the user does not have the
* appropriate privileges
* @throws ObjectNotFoundException if the user or folder was not found, with
* @throws DuplicateNameException if the specified name already exists in
* the parent folder, as either a folder or file
*/
- public void modifyFolder(Long userId, Long folderId, String folderName)
+ public FolderDTO updateFolder(Long userId, Long folderId, String folderName, Set<PermissionDTO> permissions)
throws InsufficientPermissionsException, ObjectNotFoundException, DuplicateNameException;
/**
public Set<String> getUserTags(final Long userId) throws ObjectNotFoundException;
/**
- * Updates name and tags for the specified file
+ * Updates the attributes of the specified file.
*
* @param userId
* @param fileId
* @param name
* @param tagSet a String that contains tags separated by comma
+ * @param modificationDate the modification date
+ * @param versioned the new value of the versioned flag
+ * @param readForAll
+ * @param permissions
+ * @throws DuplicateNameException
* @throws ObjectNotFoundException
* @throws InsufficientPermissionsException
*/
- public void updateFile(Long userId, Long fileId, String name, String tagSet)
- throws ObjectNotFoundException, InsufficientPermissionsException;
+ public void updateFile(Long userId, Long fileId, String name, String tagSet,
+ Date modificationDate, Boolean versioned, Boolean readForAll,
+ Set<PermissionDTO> permissions)
+ throws DuplicateNameException, ObjectNotFoundException, InsufficientPermissionsException;
/**
* Retrieve the contents of the current body for the file
* @param username the username of the new user
* @param name the full name of the new user
* @param mail the e-mail of the new user
+ * @param persistentId the persistent ID of the new user
* @return the newly-created User object
* @throws DuplicateNameException if a user with the same username already exists
* @throws ObjectNotFoundException if no username was provided
*/
- public User createUser(String username, String name, String mail)
+ public User createUser(String username, String name, String mail, String persistentId)
throws DuplicateNameException, ObjectNotFoundException;
/**
- * Update the user with the specified username with the provided name
- * and e-mail address.
- *
- * @param username the username of the user
- * @param name the modified full name of the user
- * @param mail the modified e-mail of the user
- * @return the updated User object
- * @throws ObjectNotFoundException if no username was provided
- */
- public User updateUser(String username, String name, String mail) throws ObjectNotFoundException;
-
- /**
* Updates the authentication token for the specified user.
*
* @param userId the ID of the user whose token should be updated
throws ObjectNotFoundException, InsufficientPermissionsException;
/**
- * update folder permissions
- * @param userId
- * @param folderId
- * @param permissions
- * @throws ObjectNotFoundException
- * @throws InsufficientPermissionsException
- */
- public void setFolderPermissions(Long userId, Long folderId, Set<PermissionDTO> permissions)
- throws ObjectNotFoundException, InsufficientPermissionsException;
-
- /**
* Retrieve file user and group permissions
*
* @param userId the ID of the user whose token should be updated
public Set<PermissionDTO> getFilePermissions(Long userId, Long fileId)
throws ObjectNotFoundException, InsufficientPermissionsException;
-
- /**
- * update file permissions
- * @param userId
- * @param fileId
- * @param readForAll
- * @param permissions
- * @throws ObjectNotFoundException
- * @throws InsufficientPermissionsException
- */
- public void setFilePermissions(Long userId, Long fileId, Boolean readForAll,
- Set<PermissionDTO> permissions)
- throws ObjectNotFoundException, InsufficientPermissionsException;
-
/**
* Returns a list of all shared root folders of a user.
*
throws ObjectNotFoundException, InsufficientPermissionsException;
/**
- * Toggle between file being versioned or not.
- *
- * @param userId the ID of the user
- * @param fileId the ID of the file
- * @param versioned the new value of the flag
- *
- * @throws ObjectNotFoundException
- * @throws InsufficientPermissionsException
- *
- */
- public void toggleFileVersioning(Long userId, Long fileId, boolean versioned)
- throws ObjectNotFoundException, InsufficientPermissionsException;
-
- /**
* It is used by the Solr mbean to rebuild the index.
*/
public void rebuildSolrIndex();