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 Summary
Nested Classes Modifier and Type Class Description classRestDocumentMetadataService.SetAttributeOptionsMultipartRequest
-
Constructor Summary
Constructors Constructor Description RestDocumentMetadataService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttributeOption(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 identifierString[]getAttributeOptions(long setId, String attribute)Retrieves the options for the given attributeWSAttributeSetgetAttributeSet(String name)Gets attribute set's metadataWSAttributeSetgetAttributeSetById(long setId)Gets attribute set's metadataWSTemplategetTemplate(String name)Gets template's metadataWSTemplategetTemplateById(long templateId)Gets template's metadataWSAttributeSet[]listAttributeSets()Gets metadata of all existing attribute sets.WSTemplate[]listTemplates()Gets metadata of all existing templates.voidsetAttributeOptions(long setId, String attribute, WSAttributeOption[] options)Saves the options for the given attributevoidsetAttributeOptionsPOST(Long setId, String attribute, 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.SoapDocumentMetadataService
addAttributeOption, deleteAttributeSet, deleteTemplate, getAttributeOptions, getAttributeOptionsByCategory, getAttributeSet, getAttributeSetById, getGrantedGroups, getGrantedUsers, getTemplate, getTemplateById, grantGroupToTemplate, grantUserToTemplate, isTemplateReadable, isTemplateWritable, listAttributeSets, listTemplates, setAttributeOptions, storeAttributeSet, storeTemplate
-
Methods inherited from class com.logicaldoc.webservice.AbstractService
convertDateToString, convertStringToDate, getContext, getMessageContext, isValidateSession, setContext, setMessageContext, setValidateSession
-
-
-
-
Method Detail
-
setAttributeOptions
@PUT @Path("/setAttributeOptions") public void setAttributeOptions(@QueryParam("setId") long setId, @QueryParam("attribute") String attribute, @QueryParam("options") WSAttributeOption[] options) throws ExceptionDescription copied from interface:DocumentMetadataServiceSaves the options for the given attribute- Specified by:
setAttributeOptionsin interfaceDocumentMetadataService- Parameters:
setId- The attribute set's idattribute- The attribute's nameoptions- The attribute's options- Throws:
Exception- error in the server application
-
storeAttributeSet
@POST @Path("/storeAttributeSet") public long storeAttributeSet(WSAttributeSet attributeSet) throws ExceptionDescription 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 interfaceDocumentMetadataService- Parameters:
attributeSet- set's value object containing the attribute set's metadata- Returns:
- The ID of the new attribute set
- Throws:
Exception- error in the server application
-
storeTemplate
@POST @Path("/storeTemplate") public long storeTemplate(WSTemplate template) throws ExceptionDescription copied from interface:DocumentMetadataServiceCreate/Update a template. You can completely customize the template through a value object.- Specified by:
storeTemplatein interfaceDocumentMetadataService- Parameters:
template- value object containing the template's metadata- Returns:
- The ID of the new template
- Throws:
Exception- error in the server application
-
getAttributeSetById
@GET @Path("/getAttributeSetById") public WSAttributeSet getAttributeSetById(@QueryParam("setId") long setId) throws ExceptionDescription copied from interface:DocumentMetadataServiceGets attribute set's metadata- Specified by:
getAttributeSetByIdin interfaceDocumentMetadataService- Parameters:
setId- The attribute set's id- Returns:
- A value object containing the attribute set's metadata
- Throws:
Exception- error in the server application
-
getAttributeSet
@GET @Path("/getAttributeSet") public WSAttributeSet getAttributeSet(@QueryParam("name") String name) throws ExceptionDescription copied from interface:DocumentMetadataServiceGets attribute set's metadata- Specified by:
getAttributeSetin interfaceDocumentMetadataService- Parameters:
name- The attribute set's name- Returns:
- A value object containing the attribute set's metadata
- Throws:
Exception- error in the server application
-
getTemplate
@GET @Path("/getTemplate") public WSTemplate getTemplate(@QueryParam("name") String name) throws ExceptionDescription copied from interface:DocumentMetadataServiceGets template's metadata- Specified by:
getTemplatein interfaceDocumentMetadataService- Parameters:
name- The template's name- Returns:
- A value object containing the template's metadata.
- Throws:
Exception- error in the server application
-
getTemplateById
@GET @Path("/getTemplateById") public WSTemplate getTemplateById(@QueryParam("templateId") long templateId) throws ExceptionDescription copied from interface:DocumentMetadataServiceGets template's metadata- Specified by:
getTemplateByIdin interfaceDocumentMetadataService- Parameters:
templateId- The template's id- Returns:
- A value object containing the template's metadata
- Throws:
Exception- error in the server application
-
getAttributeOptions
@GET @Path("/getAttributeOptions") public String[] getAttributeOptions(@QueryParam("setId") long setId, @QueryParam("attribute") String attribute) throws ExceptionDescription copied from interface:DocumentMetadataServiceRetrieves the options for the given attribute- Specified by:
getAttributeOptionsin interfaceDocumentMetadataService- Parameters:
setId- The attribute set's idattribute- The attribute's name- Returns:
- the list of all the attribute's options
- Throws:
Exception- error in the server application
-
listAttributeSets
@GET @Path("/listAttributeSets") public WSAttributeSet[] listAttributeSets() throws ExceptionDescription copied from interface:DocumentMetadataServiceGets metadata of all existing attribute sets.- Specified by:
listAttributeSetsin interfaceDocumentMetadataService- Returns:
- The list of all attribute sets
- Throws:
Exception- error in the server application
-
deleteAttributeSet
@DELETE @Path("/deleteAttributeSet") public void deleteAttributeSet(@QueryParam("setId") long setId) throws ExceptionDescription copied from interface:DocumentMetadataServiceDeletes an existing attribute set with the given identifier.- Specified by:
deleteAttributeSetin interfaceDocumentMetadataService- Parameters:
setId- The attribute set's id- Throws:
Exception- error in the server application
-
deleteTemplate
@DELETE @Path("/deleteTemplate") public void deleteTemplate(@QueryParam("templateId") long templateId) throws ExceptionDescription copied from interface:DocumentMetadataServiceDeletes an existing template with the given identifier- Specified by:
deleteTemplatein interfaceDocumentMetadataService- Parameters:
templateId- The template's id- Throws:
Exception- error in the server application
-
listTemplates
@GET @Path("/listTemplates") public WSTemplate[] listTemplates() throws ExceptionDescription copied from interface:DocumentMetadataServiceGets metadata of all existing templates.- Specified by:
listTemplatesin interfaceDocumentMetadataService- Returns:
- The list of all templates
- Throws:
Exception- error in the server application
-
setAttributeOptionsPOST
@POST @Consumes("multipart/form-data") @Path("/setAttributeOptionsPOST") public void setAttributeOptionsPOST(Long setId, String attribute, WSAttributeOption[] options) throws ExceptionDescription 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 interfaceDocumentMetadataService- Parameters:
setId- The attribute set's idattribute- The attribute's nameoptions- The attribute's options- Throws:
Exception- error in the server application
-
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 ExceptionDescription copied from interface:DocumentMetadataServiceAdd a new option for the given attribute- Specified by:
addAttributeOptionin interfaceDocumentMetadataService- Parameters:
setId- Attribute set IDattribute- Attribute nameoption- Attribute option- Throws:
Exception- error in the server application
-
-