Class RestDocumentMetadataService
java.lang.Object
com.logicaldoc.webservice.AbstractService
com.logicaldoc.webservice.soap.endpoint.SoapDocumentMetadataService
com.logicaldoc.webservice.rest.endpoint.RestDocumentMetadataService
- All Implemented Interfaces:
- DocumentMetadataService,- DocumentMetadataService
- Direct Known Subclasses:
- RestDocumentMetadataSwagger
@Path("/")
@Consumes("application/json")
@Produces("application/json")
public class RestDocumentMetadataService
extends SoapDocumentMetadataService
implements DocumentMetadataService
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionclass
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttributeOption(long setId, String attribute, WSAttributeOption option) Add a new option for the given attributevoiddeleteAttributeSet(long setId) Deletes an existing attribute set with the given identifier.voiddeleteTemplate(long templateId) Deletes an existing template with the given identifiergetAttributeOptions(long setId, String attribute) Retrieves the options for the given attributegetAttributeOptionsByCategory(long setId, String attribute, String category) Retrieves the options for the given attribute inside a given categorygetAttributeSet(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.voidsetAttributeOptions(long setId, String attribute, List<WSAttributeOption> options) Saves the options for the given attributevoidsetAttributeOptionsPOST(Long setId, String attribute, List<WSAttributeOption> options) Saves the options for the given attribute with a POST method.longstoreAttributeSet(WSAttributeSet attributeSet) Create/Update an attribute set.longstoreTemplate(WSTemplate template) Create/Update a template.Methods inherited from class com.logicaldoc.webservice.soap.endpoint.SoapDocumentMetadataServiceaddAttributeOption, deleteAttributeSet, deleteTemplate, getAccessControlList, getAttributeOptions, getAttributeOptionsByCategory, getAttributeSet, getAttributeSetById, getTemplate, getTemplateById, isReadable, isWritable, listAttributeSets, listTemplates, setAccessControlList, setAttributeOptions, storeAttributeSet, storeTemplateMethods inherited from class com.logicaldoc.webservice.AbstractServiceconvertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
- 
Constructor Details- 
RestDocumentMetadataServicepublic RestDocumentMetadataService()
 
- 
- 
Method Details- 
setAttributeOptions@PUT @Path("/setAttributeOptions") public void setAttributeOptions(@QueryParam("setId") long setId, @QueryParam("attribute") String attribute, @QueryParam("options") List<WSAttributeOption> options) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceSaves the options for the given attribute- Specified by:
- setAttributeOptionsin interface- DocumentMetadataService
- Parameters:
- setId- The attribute set's id
- attribute- The attribute's name
- options- The attribute's options
- Throws:
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
storeAttributeSet@POST @Path("/storeAttributeSet") public long storeAttributeSet(WSAttributeSet attributeSet) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceCreate/Update an attribute set. You can completely customize the attribute set through a value object containing the attribute set's metadata.- Specified by:
- storeAttributeSetin interface- DocumentMetadataService
- Parameters:
- attributeSet- set's value object containing the attribute set's metadata
- Returns:
- The ID of the new attribute set
- Throws:
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
storeTemplate@POST @Path("/storeTemplate") public long storeTemplate(WSTemplate template) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceCreate/Update a template. You can completely customize the template through a value object.- Specified by:
- storeTemplatein interface- DocumentMetadataService
- Parameters:
- template- value object containing the template's metadata
- Returns:
- The ID of the new template
- Throws:
- AuthenticationException- Invalid session
- PermissionException- The permission has not been granted
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getAttributeSetById@GET @Path("/getAttributeSetById") public WSAttributeSet getAttributeSetById(@QueryParam("setId") long setId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets attribute set's metadata- Specified by:
- getAttributeSetByIdin interface- DocumentMetadataService
- Parameters:
- setId- The attribute set's id
- Returns:
- the attribute set
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getAttributeSet@GET @Path("/getAttributeSet") public WSAttributeSet getAttributeSet(@QueryParam("name") String name) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets attribute set's metadata- Specified by:
- getAttributeSetin interface- DocumentMetadataService
- Parameters:
- name- The attribute set's name
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getTemplate@GET @Path("/getTemplate") public WSTemplate getTemplate(@QueryParam("name") String name) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets template's metadata- Specified by:
- getTemplatein interface- DocumentMetadataService
- Parameters:
- name- The template's name
- Returns:
- A value object containing the template's metadata.
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getTemplateById@GET @Path("/getTemplateById") public WSTemplate getTemplateById(@QueryParam("templateId") long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets template's metadata- Specified by:
- getTemplateByIdin interface- DocumentMetadataService
- Parameters:
- templateId- The template's id
- Returns:
- A value object containing the template's metadata
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getAttributeOptions@GET @Path("/getAttributeOptions") public List<String> getAttributeOptions(@QueryParam("setId") long setId, @QueryParam("attribute") String attribute) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceRetrieves the options for the given attribute- Specified by:
- getAttributeOptionsin interface- DocumentMetadataService
- Parameters:
- setId- The attribute set's id
- attribute- The attribute's name
- Returns:
- the list of all the attribute's options
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getAttributeOptionsByCategory@GET @Path("/getAttributeOptionsByCategory") public List<WSAttributeOption> getAttributeOptionsByCategory(long setId, String attribute, String category) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceRetrieves the options for the given attribute inside a given category- Specified by:
- getAttributeOptionsByCategoryin interface- DocumentMetadataService
- Parameters:
- setId- The attribute set's id
- attribute- The attribute's name
- category- The options category (not mandatory)
- Returns:
- the list of all the attribute's options
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
listAttributeSets@GET @Path("/listAttributeSets") public List<WSAttributeSet> listAttributeSets() throws AuthenticationException, WebserviceException, PersistenceExceptionDescription copied from interface:DocumentMetadataServiceGets metadata of all existing attribute sets.- Specified by:
- listAttributeSetsin interface- DocumentMetadataService
- Returns:
- The list of all attribute sets
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
deleteAttributeSet@DELETE @Path("/deleteAttributeSet") public void deleteAttributeSet(@QueryParam("setId") long setId) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceDeletes an existing attribute set with the given identifier.- Specified by:
- deleteAttributeSetin interface- DocumentMetadataService
- Parameters:
- setId- The attribute set's id
- Throws:
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
deleteTemplate@DELETE @Path("/deleteTemplate") public void deleteTemplate(@QueryParam("templateId") long templateId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceDeletes an existing template with the given identifier- Specified by:
- deleteTemplatein interface- DocumentMetadataService
- Parameters:
- templateId- The template's id
- Throws:
- AuthenticationException- Invalid session
- PermissionException- The permission has not been granted
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
listTemplates@GET @Path("/listTemplates") public List<WSTemplate> listTemplates() throws AuthenticationException, WebserviceException, PersistenceExceptionDescription copied from interface:DocumentMetadataServiceGets metadata of all existing templates.- Specified by:
- listTemplatesin interface- DocumentMetadataService
- Returns:
- The list of all templates
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
setAttributeOptionsPOST@POST @Consumes("multipart/form-data") @Path("/setAttributeOptionsPOST") public void setAttributeOptionsPOST(Long setId, String attribute, List<WSAttributeOption> options) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceSaves the options for the given attribute with a POST method. This is useful for very large lists of values- Specified by:
- setAttributeOptionsPOSTin interface- DocumentMetadataService
- Parameters:
- setId- The attribute set's id
- attribute- The attribute's name
- options- The attribute's options
- Throws:
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
addAttributeOption@POST @Consumes("application/x-www-form-urlencoded") @Path("/addAttributeOption") public void addAttributeOption(@FormParam("setId") long setId, @FormParam("attribute") String attribute, @FormParam("option") WSAttributeOption option) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceAdd a new option for the given attribute- Specified by:
- addAttributeOptionin interface- DocumentMetadataService
- Parameters:
- setId- Attribute set ID
- attribute- Attribute name
- option- Attribute option
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
 
-