Interface FolderService

    • Method Detail

      • createSimple

        @POST
        @Path("/createSimple")
        @Consumes({"text/plain","application/json"})
        WSFolder createSimple​(String folderPath)
                       throws Exception
        Throws:
        Exception
      • createSimpleForm

        @POST
        @Path("/createSimpleForm")
        @Consumes("application/x-www-form-urlencoded")
        WSFolder createSimpleForm​(@FormParam("folderPath")
                                  String folderPath)
                           throws Exception
        Throws:
        Exception
      • createSimpleJSON

        @POST
        @Path("/createSimpleJSON")
        @Consumes("application/json")
        WSFolder createSimpleJSON​(String jsonstr)
                           throws Exception
        Throws:
        Exception
      • createPath

        @POST
        @Path("/createPath")
        @Consumes("application/x-www-form-urlencoded")
        WSFolder createPath​(@FormParam("parentId")
                            long parentId,
                            @FormParam("path")
                            String path)
                     throws Exception
        Throws:
        Exception
      • findByPath

        @GET
        @Path("/findByPath")
        @Produces("application/json")
        WSFolder findByPath​(@QueryParam("path")
                            String path)
                     throws Exception
        Finds the folder at the specified path
        Parameters:
        path - the path
        Returns:
        the folder
        Throws:
        Exception - error in the server application
      • getRootFolder

        @GET
        @Path("/getRootFolder")
        @Produces("application/json")
        WSFolder getRootFolder()
                        throws Exception
        Gets the root folder
        Returns:
        the root folder
        Throws:
        Exception - error in the server application
      • createFolder

        @POST
        @Path("/createFolder")
        @Consumes("application/x-www-form-urlencoded")
        @Produces({"text/plain","application/json","application/xml"})
        long createFolder​(@FormParam("parentId")
                          long parentId,
                          @FormParam("name")
                          String name)
                   throws Exception
        Throws:
        Exception
      • getFolder

        @GET
        @Path("/getFolder")
        @Produces({"application/json","application/xml"})
        WSFolder getFolder​(@QueryParam("folderId")
                           long folderId)
                    throws Exception
        Throws:
        Exception
      • delete

        @DELETE
        @Path("/delete")
        void delete​(@QueryParam("folderId")
                    long folderId)
             throws Exception
        Throws:
        Exception
      • listChildren

        @GET
        @Path("/listChildren")
        @Produces({"application/json","application/xml"})
        WSFolder[] listChildren​(@QueryParam("folderId")
                                long folderId)
                         throws Exception
        Throws:
        Exception
      • getPath

        @GET
        @Path("/getPath")
        WSFolder[] getPath​(@QueryParam("folderId")
                           long folderId)
                    throws Exception
        Throws:
        Exception
      • getPathString

        @GET
        @Path("/getPathString")
        String getPathString​(@QueryParam("folderId")
                             long folderId)
                      throws Exception
        Throws:
        Exception
      • update

        @PUT
        @Path("/update")
        void update​(WSFolder folder)
             throws Exception
        Updates an existing folder. To perform this you need the RENAME permission.
        Parameters:
        folder - The folders metadata(please compile the ID)
        Throws:
        Exception - error during update
      • rename

        @PUT
        @Path("/rename")
        void rename​(@QueryParam("folderId")
                    long folderId,
                    @QueryParam("name")
                    String name)
             throws Exception
        Renames an existing folder.
        Parameters:
        folderId - The folder id
        name - The new folder name
        Throws:
        Exception - error during folder rename
      • move

        @PUT
        @Path("/move")
        void move​(@QueryParam("folderId")
                  long folderId,
                  @QueryParam("parentId")
                  long parentId)
           throws Exception
        Moves an existing folder with the given identifier.
        Parameters:
        folderId - The folder id
        parentId - The folder id of the new parent folder
        Throws:
        Exception - error in the server application
      • createAlias

        @POST
        @Path("/createAlias")
        WSFolder createAlias​(@FormParam("parentId")
                             long parentId,
                             @FormParam("foldRef")
                             long foldRef)
                      throws Exception
        Creates a new folder alias
        Parameters:
        parentId - The parent folder
        foldRef - The referenced folder
        Returns:
        The newly created alias
        Throws:
        Exception - error during alias creation
      • getDefaultWorkspace

        @GET
        @Path("/getDefaultWorkspace")
        WSFolder getDefaultWorkspace()
                              throws Exception
        Gets the Default workspace
        Returns:
        A value object containing the workspace's metadata
        Throws:
        Exception - error in the server application
      • listWorkspaces

        @GET
        @Path("/listWorkspaces")
        WSFolder[] listWorkspaces()
                           throws Exception
        Retrieves the list of all workspaces.
        Returns:
        the list of all workspaces
        Throws:
        Exception - error in the server application
      • isReadable

        @GET
        @Path("/isReadable")
        boolean isReadable​(@QueryParam("folderId")
                           long folderId)
                    throws Exception
        Tests if a folder is readable.
        Parameters:
        folderId - The folder id
        Returns:
        True if the identifier denotes a readable folder, otherwise false.
        Throws:
        Exception - error in the server application
      • isWritable

        @GET
        @Path("/isWritable")
        boolean isWritable​(@QueryParam("folderId")
                           long folderId)
                    throws Exception
        Tests if a folder is writable
        Parameters:
        folderId - The folder id
        Returns:
        True if the identifier denotes a writable folder, otherwise false
        Throws:
        Exception - error in the server application
      • isGranted

        @GET
        @Path("/isGranted")
        boolean isGranted​(@QueryParam("folderId")
                          long folderId,
                          @QueryParam("permission")
                          int permission)
                   throws Exception
        Tests if the current user has a specific permission on a folder
        Parameters:
        folderId - The folder id
        permission - The permission representation
        Returns:
        True if the identifier denotes a granted permission, otherwise false
        Throws:
        Exception - error in the server application
      • copy

        @POST
        @Path("/copy")
        void copy​(@FormParam("folderId")
                  long folderId,
                  @FormParam("targetId")
                  long targetId,
                  @FormParam("foldersOnly")
                  int foldersOnly,
                  @FormParam("securityOption")
                  String securityOption)
           throws Exception
        Copies an existing folder with the given identifier.
        Parameters:
        folderId - The folder id
        targetId - The folder id of the target folder
        foldersOnly - If 1, only the folders will be copied and not the documents
        securityOption - How to assign the security policies to the newly created folders:
        • null or none: empty security policies
        • inherit: the new folder will point to the parent for the security policies
        • replicate: the new folder will have a copy of the security policies of the source folder
        Throws:
        Exception - error during copy
      • grantUser

        @PUT
        @Path("/grantUser")
        void grantUser​(@QueryParam("folderId")
                       long folderId,
                       @QueryParam("userId")
                       long userId,
                       @QueryParam("permissions")
                       int permissions,
                       @QueryParam("recursive")
                       boolean recursive)
                throws Exception
        Grants user permission to the folder.
        Parameters:
        folderId - Folder id
        userId - User Id
        permissions - the permission integer representation. If '0', the user will be not granted to access the folder.
        recursive - recursion option. If true, the grant operation is applied also to the subfolders.
        Throws:
        Exception - error in the server application
      • grantGroup

        @PUT
        @Path("/grantGroup")
        void grantGroup​(@QueryParam("folderId")
                        long folderId,
                        @QueryParam("groupId")
                        long groupId,
                        @QueryParam("permissions")
                        int permissions,
                        @QueryParam("recursive")
                        boolean recursive)
                 throws Exception
        Grants group permission to the folder
        Parameters:
        folderId - Folder id
        groupId - Group Id
        permissions - the permission integer representation. If '0', the group will be not granted to access the folder.
        recursive - recursion option. If true, the grant operation is applied also to the subfolders
        Throws:
        Exception - error in the server application
      • getGrantedGroups

        @GET
        @Path("/getGrantedGroups")
        WSRight[] getGrantedGroups​(@QueryParam("folderId")
                                   long folderId)
                            throws Exception
        Retrieves the list of granted groups for the given folder
        Parameters:
        folderId - Folder id
        Returns:
        'error' if error occurred, the right objects collection
        Throws:
        Exception - error in the server application
      • getGrantedUsers

        @GET
        @Path("/getGrantedUsers")
        WSRight[] getGrantedUsers​(@QueryParam("folderId")
                                  long folderId)
                           throws Exception
        Retrieves the list of granted users for the given folder.
        Parameters:
        folderId - Folder id
        Returns:
        'error' if error occurred, the right objects collection.
        Throws:
        Exception - error in the server application