Class RestFolderService
- java.lang.Object
-
- com.logicaldoc.webservice.AbstractService
-
- com.logicaldoc.webservice.soap.endpoint.SoapFolderService
-
- com.logicaldoc.webservice.rest.endpoint.RestFolderService
-
- All Implemented Interfaces:
FolderService
,FolderService
- Direct Known Subclasses:
RestFolderSwagger
@Path("/") @Consumes("application/json") @Produces("application/json") public class RestFolderService extends SoapFolderService implements FolderService
-
-
Constructor Summary
Constructors Constructor Description RestFolderService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WSFolder
create(WSFolder folder)
long
createFolder(long parentId, String name)
WSFolder
createPath(long parentId, String path)
WSFolder
createSimple(String folderPath)
WSFolder
createSimpleForm(String folderPath)
WSFolder
createSimpleJSON(String jsonstr)
void
delete(long folderId)
WSFolder
findByPath(String path)
Finds the folder at the specified pathWSFolder
getFolder(long folderId)
WSFolder[]
getPath(long folderId)
String
getPathString(long folderId)
WSFolder
getRootFolder()
Gets the root folderWSFolder[]
listChildren(long folderId)
void
move(long folderId, long parentId)
void
rename(long folderId, String name)
void
update(WSFolder folder)
-
Methods inherited from class com.logicaldoc.webservice.soap.endpoint.SoapFolderService
copy, create, createAlias, createFolder, createPath, delete, findByPath, getDefaultWorkspace, getFolder, getGrantedGroups, getGrantedUsers, getPath, getRootFolder, grantGroup, grantUser, isGranted, isReadable, isWriteable, listChildren, listWorkspaces, move, rename, update
-
Methods inherited from class com.logicaldoc.webservice.AbstractService
convertDateToString, convertStringToDate, getContext, getMessageContext, isValidateSession, setContext, setMessageContext, setValidateSession
-
-
-
-
Method Detail
-
create
@POST @Path("/create") public WSFolder create(WSFolder folder) throws Exception
- Specified by:
create
in interfaceFolderService
- Throws:
Exception
-
createSimpleForm
@POST @Path("/createSimpleForm") @Consumes("application/x-www-form-urlencoded") public WSFolder createSimpleForm(@FormParam("folderPath") String folderPath) throws Exception
- Specified by:
createSimpleForm
in interfaceFolderService
- Throws:
Exception
-
createSimpleJSON
@POST @Path("/createSimpleJSON") @Consumes("application/json") public WSFolder createSimpleJSON(String jsonstr) throws Exception
- Specified by:
createSimpleJSON
in interfaceFolderService
- Throws:
Exception
-
createSimple
@POST @Path("/createSimple") @Consumes({"text/plain","application/json"}) public WSFolder createSimple(String folderPath) throws Exception
- Specified by:
createSimple
in interfaceFolderService
- Throws:
Exception
-
createPath
@POST @Path("/createPath") @Consumes("application/x-www-form-urlencoded") public WSFolder createPath(@FormParam("parentId") long parentId, @FormParam("path") String path) throws Exception
- Specified by:
createPath
in interfaceFolderService
- Throws:
Exception
-
findByPath
@GET @Path("/findByPath") @Produces("application/json") public WSFolder findByPath(@QueryParam("path") String path) throws Exception
Description copied from interface:FolderService
Finds the folder at the specified path- Specified by:
findByPath
in interfaceFolderService
- Parameters:
path
- the path- Returns:
- the folder
- Throws:
Exception
- error in the server application
-
getRootFolder
@GET @Path("/getRootFolder") @Produces("application/json") public WSFolder getRootFolder() throws Exception
Description copied from interface:FolderService
Gets the root folder- Specified by:
getRootFolder
in interfaceFolderService
- 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"}) public long createFolder(@FormParam("parentId") long parentId, @FormParam("name") String name) throws Exception
- Specified by:
createFolder
in interfaceFolderService
- Throws:
Exception
-
getFolder
@GET @Path("/getFolder") @Produces({"application/json","application/xml"}) public WSFolder getFolder(@QueryParam("folderId") long folderId) throws Exception
- Specified by:
getFolder
in interfaceFolderService
- Throws:
Exception
-
delete
@DELETE @Path("/delete") public void delete(@QueryParam("folderId") long folderId) throws Exception
- Specified by:
delete
in interfaceFolderService
- Throws:
Exception
-
listChildren
@GET @Path("/listChildren") @Produces({"application/json","application/xml"}) public WSFolder[] listChildren(@QueryParam("folderId") long folderId) throws Exception
- Specified by:
listChildren
in interfaceFolderService
- Throws:
Exception
-
getPath
@GET @Path("/getPath") public WSFolder[] getPath(@QueryParam("folderId") long folderId) throws Exception
- Specified by:
getPath
in interfaceFolderService
- Throws:
Exception
-
getPathString
@GET @Path("/getPathString") public String getPathString(@QueryParam("folderId") long folderId) throws Exception
- Specified by:
getPathString
in interfaceFolderService
- Throws:
Exception
-
update
@POST @Path("/update") public void update(WSFolder folder) throws Exception
- Specified by:
update
in interfaceFolderService
- Throws:
Exception
-
rename
@PUT @Path("/rename") public void rename(@QueryParam("folderId") long folderId, @QueryParam("name") String name) throws Exception
- Specified by:
rename
in interfaceFolderService
- Throws:
Exception
-
move
@PUT @Path("/move") public void move(@QueryParam("folderId") long folderId, @QueryParam("parentId") long parentId) throws Exception
- Specified by:
move
in interfaceFolderService
- Throws:
Exception
-
-