Package com.logicaldoc.webservice.rest
Interface DocumentMetadataService
- All Known Implementing Classes:
RestDocumentMetadataService
,RestDocumentMetadataSwagger
@Consumes("application/json")
@Produces("application/json")
@Path("/")
public interface DocumentMetadataService
Document Metadata Service definition interface for REST.
Alessandro Gasparini - LogicalDOC
- Since:
- 8.4.2
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeOption
(long setId, String attribute, WSAttributeOption option) Add a new option for the given attributevoid
deleteAttributeSet
(long setId) Deletes an existing attribute set with the given identifier.void
deleteTemplate
(long templateId) Deletes an existing template with the given identifierString[]
getAttributeOptions
(long setId, String attribute) Retrieves the options for the given attributegetAttributeSet
(String name) Gets attribute set's metadatagetAttributeSetById
(long setId) Gets attribute set's metadatagetTemplate
(String name) Gets template's metadatagetTemplateById
(long templateId) Gets template's metadataGets metadata of all existing attribute sets.Gets metadata of all existing templates.void
setAttributeOptions
(long setId, String attribute, WSAttributeOption[] options) Saves the options for the given attributevoid
setAttributeOptionsPOST
(Long setId, String attribute, WSAttributeOption[] options) Saves the options for the given attribute with a POST method.long
storeAttributeSet
(WSAttributeSet attributeSet) Create/Update an attribute set.long
storeTemplate
(WSTemplate template) Create/Update a template.
-
Method Details
-
addAttributeOption
@POST @Consumes("application/x-www-form-urlencoded") @Path("/addAttributeOption") void addAttributeOption(@FormParam("setId") long setId, @FormParam("attribute") String attribute, @FormParam("option") WSAttributeOption option) throws AuthenticationException, WebserviceException, PersistenceException Add a new option for the given attribute- Parameters:
setId
- Attribute set IDattribute
- Attribute nameoption
- Attribute option- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
setAttributeOptions
@PUT @Path("/setAttributeOptions") void setAttributeOptions(@QueryParam("setId") long setId, @QueryParam("attribute") String attribute, @QueryParam("options") WSAttributeOption[] options) throws WebserviceException, PersistenceException Saves the options for the given attribute- Parameters:
setId
- The attribute set's idattribute
- The attribute's nameoptions
- The attribute's options- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
setAttributeOptionsPOST
@POST @Consumes("multipart/form-data") @Path("/setAttributeOptionsPOST") void setAttributeOptionsPOST(Long setId, String attribute, WSAttributeOption[] options) throws WebserviceException, PersistenceException Saves the options for the given attribute with a POST method. This is useful for very large lists of values- Parameters:
setId
- The attribute set's idattribute
- The attribute's nameoptions
- The attribute's options- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
storeAttributeSet
@POST @Path("/storeAttributeSet") long storeAttributeSet(WSAttributeSet attributeSet) throws WebserviceException, PersistenceException Create/Update an attribute set. You can completely customize the attribute set through a value object containing the attribute set's metadata.- Parameters:
attributeSet
- set's value object containing the attribute set's metadata- Returns:
- The ID of the new attribute set
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
storeTemplate
@POST @Path("/storeTemplate") long storeTemplate(WSTemplate template) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Create/Update a template. You can completely customize the template through a value object.- Parameters:
template
- value object containing the template's metadata- Returns:
- The ID of the new template
- Throws:
PermissionException
- The permission has not been grantedPersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getAttributeSetById
@GET @Path("/getAttributeSetById") WSAttributeSet getAttributeSetById(@QueryParam("setId") long setId) throws AuthenticationException, WebserviceException, PersistenceException Gets attribute set's metadata- Parameters:
setId
- The attribute set's id- Returns:
- the attribute set
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getAttributeSet
@GET @Path("/getAttributeSet") WSAttributeSet getAttributeSet(@QueryParam("name") String name) throws AuthenticationException, WebserviceException, PersistenceException Gets attribute set's metadata- Parameters:
name
- The attribute set's name- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getTemplate
@GET @Path("/getTemplate") WSTemplate getTemplate(@QueryParam("name") String name) throws AuthenticationException, WebserviceException, PersistenceException Gets template's metadata- Parameters:
name
- The template's name- Returns:
- A value object containing the template's metadata.
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getTemplateById
@GET @Path("/getTemplateById") WSTemplate getTemplateById(@QueryParam("templateId") long templateId) throws AuthenticationException, WebserviceException, PersistenceException Gets template's metadata- Parameters:
templateId
- The template's id- Returns:
- A value object containing the template's metadata
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
getAttributeOptions
@GET @Path("/getAttributeOptions") String[] getAttributeOptions(@QueryParam("setId") long setId, @QueryParam("attribute") String attribute) throws AuthenticationException, WebserviceException, PersistenceException Retrieves the options for the given attribute- Parameters:
setId
- The attribute set's idattribute
- The attribute's name- Returns:
- the list of all the attribute's options
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
listAttributeSets
@GET @Path("/listAttributeSets") WSAttributeSet[] listAttributeSets() throws AuthenticationException, WebserviceException, PersistenceExceptionGets metadata of all existing attribute sets.- Returns:
- The list of all attribute sets
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
deleteAttributeSet
@DELETE @Path("/deleteAttributeSet") void deleteAttributeSet(@QueryParam("setId") long setId) throws WebserviceException, PersistenceException Deletes an existing attribute set with the given identifier.- Parameters:
setId
- The attribute set's id- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webservice
-
deleteTemplate
@DELETE @Path("/deleteTemplate") void deleteTemplate(@QueryParam("templateId") long templateId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Deletes an existing template with the given identifier- Parameters:
templateId
- The template's id- Throws:
PermissionException
- The permission has not been grantedPersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-
listTemplates
@GET @Path("/listTemplates") WSTemplate[] listTemplates() throws AuthenticationException, WebserviceException, PersistenceExceptionGets metadata of all existing templates.- Returns:
- The list of all templates
- Throws:
PersistenceException
- Error in the databaseWebserviceException
- Error in the webserviceAuthenticationException
- Invalid session
-