Class RestTagService
java.lang.Object
com.logicaldoc.webservice.AbstractService
com.logicaldoc.webservice.soap.endpoint.SoapTagService
com.logicaldoc.webservice.rest.endpoint.RestTagService
- All Implemented Interfaces:
TagService
,TagService
- Direct Known Subclasses:
RestTagSwagger
@Path("/")
@Consumes({"application/xml","application/json"})
@Produces("application/json")
public class RestTagService
extends SoapTagService
implements TagService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDocumentTags
(long docId, List<String> tags) Adds tags to a documentvoid
addFolderTags
(long folderId, List<String> tags) Adds tags to a folderfindDocumentsByTag
(String tag) Finds authorized documents for the current user having a specified tagfindFoldersByTag
(String tag) Finds authorized folders for the current user having a specified tag.getDocumentTags
(long docId) Retrieves all the tags of a documentgetFolderTags
(long folderId) Retrieves all the tags of a folderRetrieves all tag clouds in the repositorygetTags()
Retrieves all the tags in the repositoryRetrieves all the tags in the preset (if the input mode is preset).void
setDocumentTags
(long docId, List<String> tags) Sets the tags of a documentvoid
setFolderTags
(long folderId, List<String> tags) Sets the tags of a folderMethods inherited from class com.logicaldoc.webservice.soap.endpoint.SoapTagService
addDocumentTags, addFolderTags, findDocumentsByTag, findFoldersByTag, getDocumentTags, getFolderTags, getTagCloud, getTags, getTagsPreset, setDocumentTags, setFolderTags
Methods inherited from class com.logicaldoc.webservice.AbstractService
convertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
-
Constructor Details
-
RestTagService
public RestTagService()
-
-
Method Details
-
setDocumentTags
@POST @Path("/setDocumentTags") @Consumes("application/x-www-form-urlencoded") public void setDocumentTags(@FormParam("docId") long docId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Description copied from interface:TagService
Sets the tags of a document- Specified by:
setDocumentTags
in interfaceTagService
- Parameters:
docId
- identifier of the documenttags
- list of tags- Throws:
AuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionWebserviceException
- Error in the webservicePersistenceException
- Error in the databaseUnexistingResourceException
- The specified document does not exist
-
addDocumentTags
@POST @Path("/addDocumentTags") @Consumes("application/x-www-form-urlencoded") public void addDocumentTags(@FormParam("docId") long docId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Description copied from interface:TagService
Adds tags to a document- Specified by:
addDocumentTags
in interfaceTagService
- Parameters:
docId
- identifier of the documenttags
- list of tags- Throws:
AuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionWebserviceException
- Error in the webservicePersistenceException
- Error in the databaseUnexistingResourceException
- The indicated document does not exist
-
getDocumentTags
@GET @Path("/getDocumentTags") public List<String> getDocumentTags(@QueryParam("docId") long docId) throws PermissionException, AuthenticationException, PersistenceException, WebserviceException, UnexistingResourceException Description copied from interface:TagService
Retrieves all the tags of a document- Specified by:
getDocumentTags
in interfaceTagService
- Parameters:
docId
- identifier of the document- Returns:
- The tags of the document
- Throws:
PermissionException
- The user does not have the required permissionAuthenticationException
- Invalid sessionPersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceUnexistingResourceException
- The specified document does not exist
-
setFolderTags
@POST @Path("/setFolderTags") @Consumes("application/x-www-form-urlencoded") public void setFolderTags(@FormParam("folderId") long folderId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:TagService
Sets the tags of a folder- Specified by:
setFolderTags
in interfaceTagService
- Parameters:
folderId
- identifier of the foldertags
- list of tags- Throws:
AuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
addFolderTags
@POST @Path("/addFolderTags") @Consumes("application/x-www-form-urlencoded") public void addFolderTags(@FormParam("folderId") long folderId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:TagService
Adds tags to a folder- Specified by:
addFolderTags
in interfaceTagService
- Parameters:
folderId
- identifier of the foldertags
- list of tags- Throws:
AuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getFolderTags
@GET @Path("/getFolderTags") public List<String> getFolderTags(@QueryParam("folderId") long folderId) throws PermissionException, AuthenticationException, PersistenceException, WebserviceException Description copied from interface:TagService
Retrieves all the tags of a folder- Specified by:
getFolderTags
in interfaceTagService
- Parameters:
folderId
- identifier of the folder- Returns:
- The tags of the folder
- Throws:
PermissionException
- The user does not have the required permissionAuthenticationException
- Invalid sessionPersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
getTags
@GET @Path("/getTags") public List<String> getTags() throws AuthenticationException, PersistenceException, WebserviceExceptionDescription copied from interface:TagService
Retrieves all the tags in the repository- Specified by:
getTags
in interfaceTagService
- Returns:
- The tags in the repository
- Throws:
AuthenticationException
- Invalid sessionPersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
getTagCloud
@GET @Path("/getTagCloud") public List<WSTagCloud> getTagCloud() throws AuthenticationException, PersistenceException, WebserviceExceptionDescription copied from interface:TagService
Retrieves all tag clouds in the repository- Specified by:
getTagCloud
in interfaceTagService
- Returns:
- The tags in the repository
- Throws:
AuthenticationException
- Invalid sessionPersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
findDocumentsByTag
@GET @Path("/findDocumentsByTag") public List<WSDocument> findDocumentsByTag(@QueryParam("tag") String tag) throws AuthenticationException, PersistenceException, WebserviceException Description copied from interface:TagService
Finds authorized documents for the current user having a specified tag- Specified by:
findDocumentsByTag
in interfaceTagService
- Parameters:
tag
- Tag of the document- Returns:
- Collection of found documents
- Throws:
AuthenticationException
- Invalid sessionPersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
findFoldersByTag
@GET @Path("/findFoldersByTag") public List<WSFolder> findFoldersByTag(@QueryParam("tag") String tag) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:TagService
Finds authorized folders for the current user having a specified tag.- Specified by:
findFoldersByTag
in interfaceTagService
- Parameters:
tag
- Tag of the folder- Returns:
- Collection of found folders
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getTagsPreset
@GET @Path("/getTagsPreset") public List<String> getTagsPreset() throws AuthenticationException, WebserviceException, PersistenceExceptionDescription copied from interface:TagService
Retrieves all the tags in the preset (if the input mode is preset).- Specified by:
getTagsPreset
in interfaceTagService
- Returns:
- The tags in the preset
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-