Class SoapDocumentMetadataService
java.lang.Object
com.logicaldoc.webservice.AbstractService
com.logicaldoc.webservice.soap.endpoint.SoapDocumentMetadataService
- All Implemented Interfaces:
- DocumentMetadataService
- Direct Known Subclasses:
- RestDocumentMetadataService
Document Metadata Web Service Implementation
- Since:
- 6.1
- Author:
- Matteo Caruso - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttributeOption(String sid, long setId, String attribute, WSAttributeOption wsoption) Add a new option for the given attributevoiddeleteAttributeSet(String sid, long setId) Deletes an existing attribute set with the given identifier.voiddeleteTemplate(String sid, long templateId) Deletes an existing template with the given identifiergetAccessControlList(String sid, long templateId) Retrieves the access control listgetAttributeOptions(String sid, long setId, String attribute) Retrieves the options for the given attributegetAttributeOptionsByCategory(String sid, long setId, String attribute, String category) Retrieves the options for the given attribute inside a given categorygetAttributeSet(String sid, String name) Gets attribute set's metadatagetAttributeSetById(String sid, long setId) Gets attribute set's metadatagetTemplate(String sid, String name) Gets template's metadatagetTemplateById(String sid, long templateId) Gets template's metadatabooleanisReadable(String sid, long templateId) Tests if a template is readable.booleanisWritable(String sid, long templateId) Tests if a template is writablelistAttributeSets(String sid) Gets metadata of all existing attribute sets.listTemplates(String sid) Gets metadata of all existing templates.voidsetAccessControlList(String sid, long templateId, List<WSAccessControlEntry> acl) Sets the Access Control ListvoidsetAttributeOptions(String sid, long setId, String attribute, List<WSAttributeOption> wsOptions) Saves the options for the given attributelongstoreAttributeSet(String sid, WSAttributeSet wsAttributeSet) Create/Update an attribute set.longstoreTemplate(String sid, WSTemplate wsTemplate) Create/Update a template.Methods inherited from class com.logicaldoc.webservice.AbstractServiceconvertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
- 
Constructor Details- 
SoapDocumentMetadataServicepublic SoapDocumentMetadataService()
 
- 
- 
Method Details- 
listTemplatespublic List<WSTemplate> listTemplates(String sid) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets metadata of all existing templates.- Specified by:
- listTemplatesin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- Returns:
- The list of all templates
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getTemplatepublic WSTemplate getTemplate(String sid, String name) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets template's metadata- Specified by:
- getTemplatein interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- name- The template's name
- Returns:
- A value object containing the template's metadata.
- Throws:
- AuthenticationException- Invalid sessionon
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getTemplateByIdpublic WSTemplate getTemplateById(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets template's metadata- Specified by:
- getTemplateByIdin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- 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
 
- 
storeTemplatepublic long storeTemplate(String sid, WSTemplate wsTemplate) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentMetadataServiceCreate/Update a template. You can completely customize the template through a value object.- Specified by:
- storeTemplatein interface- DocumentMetadataService
- Parameters:
- sid- Session identifier (need to be administrator)
- wsTemplate- value object containing the template's metadata
- Returns:
- The ID of the new template
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The permission has not been granted
 
- 
deleteTemplatepublic void deleteTemplate(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentMetadataServiceDeletes an existing template with the given identifier- Specified by:
- deleteTemplatein interface- DocumentMetadataService
- Parameters:
- sid- Session identifier (need to be administrator)
- templateId- The template's id
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
- PermissionException- The permission has not been granted
 
- 
setAttributeOptionspublic void setAttributeOptions(String sid, long setId, String attribute, List<WSAttributeOption> wsOptions) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceSaves the options for the given attribute- Specified by:
- setAttributeOptionsin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- setId- The attribute set's id
- attribute- The attribute's name
- wsOptions- The attribute's options
- Throws:
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getAttributeOptionspublic List<String> getAttributeOptions(String sid, long setId, String attribute) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceRetrieves the options for the given attribute- Specified by:
- getAttributeOptionsin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- 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
 
- 
getAttributeOptionsByCategorypublic List<WSAttributeOption> getAttributeOptionsByCategory(String sid, 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:
- sid- Session identifier
- 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
 
- 
listAttributeSetspublic List<WSAttributeSet> listAttributeSets(String sid) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets metadata of all existing attribute sets.- Specified by:
- listAttributeSetsin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- Returns:
- The list of all attribute sets
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getAttributeSetpublic WSAttributeSet getAttributeSet(String sid, String name) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets attribute set's metadata- Specified by:
- getAttributeSetin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- name- The attribute set's name
- Returns:
- A value object containing the attribute set's metadata
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
getAttributeSetByIdpublic WSAttributeSet getAttributeSetById(String sid, long setId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceGets attribute set's metadata- Specified by:
- getAttributeSetByIdin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- setId- The attribute set's id
- Returns:
- A value object containing the attribute set's metadata
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
storeAttributeSetpublic long storeAttributeSet(String sid, WSAttributeSet wsAttributeSet) 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:
- sid- Session identifier (need to be administrator)
- wsAttributeSet- 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
 
- 
deleteAttributeSetpublic void deleteAttributeSet(String sid, long setId) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceDeletes an existing attribute set with the given identifier.- Specified by:
- deleteAttributeSetin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier (need to be administrator)
- setId- The attribute set's id
- Throws:
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
isReadablepublic boolean isReadable(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceTests if a template is readable.- Specified by:
- isReadablein interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- templateId- The template id
- Returns:
- True if the identifier denotes a readable template, otherwise false.
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
isWritablepublic boolean isWritable(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceTests if a template is writable- Specified by:
- isWritablein interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- templateId- The template id
- Returns:
- True if the identifier denotes a writable template, otherwise false
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
setAccessControlListpublic void setAccessControlList(String sid, long templateId, List<WSAccessControlEntry> acl) throws PersistenceException, PermissionException, AuthenticationException, WebserviceException Description copied from interface:DocumentMetadataServiceSets the Access Control List- Specified by:
- setAccessControlListin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- templateId- Template id
- acl- the complete Access Control List
- Throws:
- PersistenceException- Error in the database
- PermissionException- The user does not have the required permission
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
 
- 
getAccessControlListpublic List<WSAccessControlEntry> getAccessControlList(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceRetrieves the access control list- Specified by:
- getAccessControlListin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- templateId- Template id
- Returns:
- 'error' if error occurred, the right objects collection
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
- 
addAttributeOptionpublic void addAttributeOption(String sid, long setId, String attribute, WSAttributeOption wsoption) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataServiceAdd a new option for the given attribute- Specified by:
- addAttributeOptionin interface- DocumentMetadataService
- Parameters:
- sid- Session identifier
- setId- Attribute set ID
- attribute- Attribute name
- wsoption- Attribute option
- Throws:
- AuthenticationException- Invalid session
- WebserviceException- Error in the webservice
- PersistenceException- Error in the database
 
 
-