@Path(value="/folders") public class FolderResource extends RestResource
CollectionResource
class.
API_KEY_CLIENT_ID, API_KEY_TOKEN, API_KEY_USER, apiClientId, apiToken, apiUser, AUTHENTICATION_PARAM_NAME, hmacHeader, querySessionId, REMOTE_USER_ID, REMOTE_USER_TOKEN, remoteUserId, remoteUserToken, request, sessionId, WOR_PARTNER_TOKEN, worPartnerToken
Constructor and Description |
---|
FolderResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addPermission(long folderId,
AccessPermission permission)
Add new permission to list of permissions for specified folder
|
javax.ws.rs.core.Response |
addSelectedEntriesToFolders(EntrySelection entrySelection,
String remoteUserToken,
String remoteUserId,
long fid)
Adds contents referenced in the
entrySelection object
to the folders also referenced in the same object |
javax.ws.rs.core.Response |
create(boolean isTransfer,
FolderDetails folder)
Creates a new folder with the details specified in the parameter.
|
FolderDetails |
deleteFolder(long folderId,
String folderType)
Deletes the specified folder resource
|
javax.ws.rs.core.Response |
disablePublicAccess(long folderId) |
javax.ws.rs.core.Response |
enablePublicAccess(long folderId) |
javax.ws.rs.core.Response |
getAutoCompleteForAvailableFolders(String val,
int limit) |
javax.ws.rs.core.Response |
getFolder(long folderId)
Retrieve specified folder resource
|
javax.ws.rs.core.Response |
getFolderPermissions(long folderId)
Retrieves list of permissions available for the specified folder.
|
javax.ws.rs.core.Response |
getFolders() |
ArrayList<FolderDetails> |
getPublicFolders() |
javax.ws.rs.core.Response |
modifyFolderEntries(long folderId,
boolean move,
EntrySelection entrySelection)
Modifies the contents of a folder either by removing or moving entries as determined by the
move
parameter |
FolderDetails |
read(String folderId,
int offset,
int limit,
String sort,
boolean asc,
String filter,
String token,
String remoteUserId,
List<String> queryParam)
Retrieves the entries for specified folder.
|
javax.ws.rs.core.Response |
removePermission(long folderId,
long permissionId) |
FolderDetails |
setPermissions(long folderId,
ArrayList<AccessPermission> permissions) |
javax.ws.rs.core.Response |
update(long folderId,
FolderDetails details)
Updates the specified folder resource
|
addHeaders, getThisServer, getUserId, getUserId, getWebPartner, log, requireUserId, requireUserIdOrWebPartner, requireWebPartner, respond, respond, respond, respond
@GET @Produces(value="application/json") @Path(value="/autocomplete") public javax.ws.rs.core.Response getAutoCompleteForAvailableFolders(@QueryParam(value="val") String val, @DefaultValue(value="8") @QueryParam(value="limit") int limit)
@GET public javax.ws.rs.core.Response getFolders()
@POST @Produces(value="application/json") public javax.ws.rs.core.Response create(@DefaultValue(value="false") @QueryParam(value="isTransfer") boolean isTransfer, FolderDetails folder)
PRIVATE
and is owned by the user creating it
unless it is transferredisTransfer
- whether the folder being created is a transfer folder or notfolder
- details of the folder to create@GET @Path(value="/public") @Produces(value="application/json") public ArrayList<FolderDetails> getPublicFolders()
@GET @Path(value="{id}") @Produces(value="application/json") public javax.ws.rs.core.Response getFolder(@PathParam(value="id") long folderId)
folderId
- unique folder resource identifier@PUT @Path(value="/{id}") public javax.ws.rs.core.Response update(@PathParam(value="id") long folderId, FolderDetails details)
folderId
- resource identifier of folder to be updateddetails
- details for update@DELETE @Path(value="/{id}") public FolderDetails deleteFolder(@PathParam(value="id") long folderId, @QueryParam(value="type") String folderType)
@PUT @Consumes(value="application/json") @Produces(value="application/json") @Path(value="/entries") public javax.ws.rs.core.Response addSelectedEntriesToFolders(EntrySelection entrySelection, @QueryParam(value="token") String remoteUserToken, @QueryParam(value="userId") String remoteUserId, @QueryParam(value="folderId") long fid)
entrySelection
object
to the folders also referenced in the same object@POST @Consumes(value="application/json") @Produces(value="application/json") @Path(value="/{id}/entries") public javax.ws.rs.core.Response modifyFolderEntries(@PathParam(value="id") long folderId, @DefaultValue(value="false") @QueryParam(value="move") boolean move, EntrySelection entrySelection)
move
parameterfolderId
- resource identifier for folder whose contents are to be modifiedmove
- whether to move the specified entries or simply remove them from the folderentrySelection
- wrapper around context for modification@GET @Produces(value="application/json") @Path(value="/{id}/entries") public FolderDetails read(@PathParam(value="id") String folderId, @DefaultValue(value="0") @QueryParam(value="offset") int offset, @DefaultValue(value="15") @QueryParam(value="limit") int limit, @DefaultValue(value="created") @QueryParam(value="sort") String sort, @DefaultValue(value="false") @QueryParam(value="asc") boolean asc, @DefaultValue(value="") @QueryParam(value="filter") String filter, @QueryParam(value="token") String token, @QueryParam(value="userId") String remoteUserId, @QueryParam(value="fields") List<String> queryParam)
@GET @Produces(value="application/json") @Path(value="/{id}/permissions") public javax.ws.rs.core.Response getFolderPermissions(@PathParam(value="id") long folderId)
folderId
- unique local folder identifier@PUT @Produces(value="application/json") @Path(value="/{id}/permissions") public FolderDetails setPermissions(@PathParam(value="id") long folderId, ArrayList<AccessPermission> permissions)
@POST @Produces(value="application/json") @Path(value="/{id}/permissions") public javax.ws.rs.core.Response addPermission(@PathParam(value="id") long folderId, AccessPermission permission)
folderId
- unique local folder identifierpermission
- details about access privilege for folder@DELETE @Produces(value="application/json") @Path(value="/{id}/permissions/{permissionId}") public javax.ws.rs.core.Response removePermission(@PathParam(value="id") long folderId, @PathParam(value="permissionId") long permissionId)
@PUT @Produces(value="application/json") @Path(value="/{id}/permissions/public") public javax.ws.rs.core.Response enablePublicAccess(@PathParam(value="id") long folderId)
@DELETE @Produces(value="application/json") @Path(value="/{id}/permissions/public") public javax.ws.rs.core.Response disablePublicAccess(@PathParam(value="id") long folderId)
Copyright © 2017. All rights reserved.