Package com.logicaldoc.webservice.rest
Interface TagService
- All Known Implementing Classes:
RestTagService
,RestTagSwagger
@Consumes({"application/xml","application/json"})
@Produces("application/json")
public interface TagService
Tag Web Service definition interface for REST.
Marco Meschieri - LogicalDOC
- Since:
- 7.6.3
-
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 folder
-
Method Details
-
setDocumentTags
@POST @Path("/setDocumentTags") void setDocumentTags(@FormParam("docId") long docId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Sets the tags of a document- Parameters:
docId
- identifier of the documenttags
- list of tags- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionUnexistingResourceException
- The specified document does not exist
-
addDocumentTags
@POST @Path("/addDocumentTags") void addDocumentTags(@FormParam("docId") long docId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException, UnexistingResourceException Adds tags to a document- Parameters:
docId
- identifier of the documenttags
- list of tags- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionUnexistingResourceException
- The indicated document does not exist
-
getDocumentTags
@GET @Path("/getDocumentTags") List<String> getDocumentTags(@QueryParam("docId") long docId) throws PermissionException, AuthenticationException, PersistenceException, WebserviceException, UnexistingResourceException Retrieves all the tags of a document- Parameters:
docId
- identifier of the document- Returns:
- The tags of the document
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permissionUnexistingResourceException
- The specified document does not exist
-
setFolderTags
@POST @Path("/setFolderTags") void setFolderTags(@FormParam("folderId") long folderId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Sets the tags of a folder- Parameters:
folderId
- identifier of the foldertags
- list of tags- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
addFolderTags
@POST @Path("/addFolderTags") void addFolderTags(@FormParam("folderId") long folderId, @FormParam("tag") List<String> tags) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Adds tags to a folder- Parameters:
folderId
- identifier of the foldertags
- list of tags- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getFolderTags
@GET @Path("/getFolderTags") List<String> getFolderTags(@QueryParam("folderId") long folderId) throws PermissionException, AuthenticationException, PersistenceException, WebserviceException Retrieves all the tags of a folder- Parameters:
folderId
- identifier of the folder- Returns:
- The tags of the folder
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid sessionPermissionException
- The user does not have the required permission
-
getTags
@GET @Path("/getTags") List<String> getTags() throws AuthenticationException, PersistenceException, WebserviceExceptionRetrieves all the tags in the repository- Returns:
- The tags in the repository
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the databaseAuthenticationException
- Invalid session
-
getTagCloud
@GET @Path("/getTagCloud") List<WSTagCloud> getTagCloud() throws AuthenticationException, PersistenceException, WebserviceExceptionRetrieves all tag clouds in the repository- Returns:
- The tags in the repository
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
findDocumentsByTag
@GET @Path("/findDocumentsByTag") List<WSDocument> findDocumentsByTag(@QueryParam("tag") String tag) throws AuthenticationException, PersistenceException, WebserviceException Finds authorized documents for the current user having a specified tag- Parameters:
tag
- Tag of the document- Returns:
- Collection of found documents
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
findFoldersByTag
@GET @Path("/findFoldersByTag") List<WSFolder> findFoldersByTag(@QueryParam("tag") String tag) throws AuthenticationException, WebserviceException, PersistenceException Finds authorized folders for the current user having a specified tag.- Parameters:
tag
- Tag of the folder- Returns:
- Collection of found folders
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getTagsPreset
@GET @Path("/getTagsPreset") List<String> getTagsPreset() throws AuthenticationException, WebserviceException, PersistenceExceptionRetrieves all the tags in the preset (if the input mode is preset).- Returns:
- The tags in the preset
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-