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
-
-
Constructor Summary
Constructors Constructor Description RestDocumentMetadataService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 attributeWSAttributeSet
getAttributeSet(String name)
Gets attribute set's metadataWSAttributeSet
getAttributeSetById(long setId)
Gets attribute set's metadataWSTemplate
getTemplate(String name)
Gets template's metadataWSTemplate
getTemplateById(long templateId)
Gets template's metadataWSAttributeSet[]
listAttributeSets()
Gets metadata of all existing attribute sets.WSTemplate[]
listTemplates()
Gets metadata of all existing templates.void
setAttributeOptions(long setId, String attribute, String[] values)
Saves the options for the given attributevoid
setAttributeOptionsPOST(long setId, String attribute, String[] values)
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.-
Methods inherited from class com.logicaldoc.webservice.soap.endpoint.SoapDocumentMetadataService
deleteAttributeSet, deleteTemplate, getAttributeOptions, 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("values") String[] values) throws Exception
Description copied from interface:DocumentMetadataService
Saves the options for the given attribute- Specified by:
setAttributeOptions
in interfaceDocumentMetadataService
- Parameters:
setId
- The attribute set's idattribute
- The attribute's namevalues
- The attribute's options- Throws:
Exception
- error in the server application
-
storeAttributeSet
@POST @Path("/storeAttributeSet") public long storeAttributeSet(WSAttributeSet attributeSet) throws Exception
Description copied from interface:DocumentMetadataService
Create/Update an attribute set. You can completely customize the attribute set through a value object containing the attribute set's metadata.- Specified by:
storeAttributeSet
in 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 Exception
Description copied from interface:DocumentMetadataService
Create/Update a template. You can completely customize the template through a value object.- Specified by:
storeTemplate
in 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 Exception
Description copied from interface:DocumentMetadataService
Gets attribute set's metadata- Specified by:
getAttributeSetById
in 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 Exception
Description copied from interface:DocumentMetadataService
Gets attribute set's metadata- Specified by:
getAttributeSet
in 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 Exception
Description copied from interface:DocumentMetadataService
Gets template's metadata- Specified by:
getTemplate
in 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 Exception
Description copied from interface:DocumentMetadataService
Gets template's metadata- Specified by:
getTemplateById
in 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 Exception
Description copied from interface:DocumentMetadataService
Retrieves the options for the given attribute- Specified by:
getAttributeOptions
in 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 Exception
Description copied from interface:DocumentMetadataService
Gets metadata of all existing attribute sets.- Specified by:
listAttributeSets
in 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 Exception
Description copied from interface:DocumentMetadataService
Deletes an existing attribute set with the given identifier.- Specified by:
deleteAttributeSet
in 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 Exception
Description copied from interface:DocumentMetadataService
Deletes an existing template with the given identifier- Specified by:
deleteTemplate
in interfaceDocumentMetadataService
- Parameters:
templateId
- The template's id- Throws:
Exception
- error in the server application
-
listTemplates
@GET @Path("/listTemplates") public WSTemplate[] listTemplates() throws Exception
Description copied from interface:DocumentMetadataService
Gets metadata of all existing templates.- Specified by:
listTemplates
in interfaceDocumentMetadataService
- Returns:
- The list of all templates
- Throws:
Exception
- error in the server application
-
setAttributeOptionsPOST
@POST @Path("/setAttributeOptionsPOST") public void setAttributeOptionsPOST(@FormParam("setId") long setId, @FormParam("attribute") String attribute, @FormParam("values") String[] values) throws Exception
Description copied from interface:DocumentMetadataService
Saves the options for the given attribute with a POST method. This is useful for very large lists of values- Specified by:
setAttributeOptionsPOST
in interfaceDocumentMetadataService
- Parameters:
setId
- The attribute set's idattribute
- The attribute's namevalues
- The attribute's options- Throws:
Exception
- error in the server application
-
-