Class SoapDocumentMetadataClient
java.lang.Object
com.logicaldoc.webservice.soap.client.SoapClient<DocumentMetadataService>
com.logicaldoc.webservice.soap.client.SoapDocumentMetadataClient
- All Implemented Interfaces:
DocumentMetadataService
public class SoapDocumentMetadataClient
extends SoapClient<DocumentMetadataService>
implements DocumentMetadataService
Document Metadata Web Service client.
- Since:
- 6.1
- Author:
- Matteo Caruso - LogicalDOC
-
Constructor Summary
ConstructorDescriptionSoapDocumentMetadataClient
(String endpoint) SoapDocumentMetadataClient
(String endpoint, int timeout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeOption
(String sid, long setId, String attribute, WSAttributeOption wsoption) Add a new option for the given attributevoid
deleteAttributeSet
(String sid, long setId) Deletes an existing attribute set with the given identifier.void
deleteTemplate
(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 metadataboolean
isReadable
(String sid, long templateId) Tests if a template is readable.boolean
isWritable
(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.void
setAccessControlList
(String sid, long templateId, List<WSAccessControlEntry> acl) Sets the Access Control Listvoid
setAttributeOptions
(String sid, long setId, String attribute, List<WSAttributeOption> options) Saves the options for the given attributelong
storeAttributeSet
(String sid, WSAttributeSet attributeSet) Create/Update an attribute set.long
storeTemplate
(String sid, WSTemplate template) Create/Update a template.
-
Constructor Details
-
SoapDocumentMetadataClient
-
SoapDocumentMetadataClient
-
-
Method Details
-
listTemplates
public List<WSTemplate> listTemplates(String sid) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Gets metadata of all existing templates.- Specified by:
listTemplates
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifier- Returns:
- The list of all templates
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
storeTemplate
public long storeTemplate(String sid, WSTemplate template) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException 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:
sid
- Session identifier (need to be administrator)template
- value object containing the template's metadata- Returns:
- The ID of the new template
- Throws:
AuthenticationException
- Invalid sessionPermissionException
- The permission has not been grantedWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
deleteTemplate
public void deleteTemplate(String sid, long templateId) throws AuthenticationException, PermissionException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Deletes an existing template with the given identifier- Specified by:
deleteTemplate
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifier (need to be administrator)templateId
- The template's id- Throws:
AuthenticationException
- Invalid sessionPermissionException
- The permission has not been grantedWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getTemplate
public WSTemplate getTemplate(String sid, String name) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Gets template's metadata- Specified by:
getTemplate
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiername
- The template's name- Returns:
- A value object containing the template's metadata.
- Throws:
AuthenticationException
- Invalid sessiononWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getTemplateById
public WSTemplate getTemplateById(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Gets template's metadata- Specified by:
getTemplateById
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiertemplateId
- The template's id- Returns:
- A value object containing the template's metadata
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
setAttributeOptions
public void setAttributeOptions(String sid, long setId, String attribute, List<WSAttributeOption> options) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Saves the options for the given attribute- Specified by:
setAttributeOptions
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiersetId
- The attribute set's idattribute
- The attribute's nameoptions
- The attribute's options- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getAttributeOptions
public List<String> getAttributeOptions(String sid, long setId, String attribute) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Retrieves the options for the given attribute- Specified by:
getAttributeOptions
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiersetId
- The attribute set's idattribute
- The attribute's name- Returns:
- the list of all the attribute's options
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getAttributeOptionsByCategory
public List<WSAttributeOption> getAttributeOptionsByCategory(String sid, long setId, String attribute, String category) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Retrieves the options for the given attribute inside a given category- Specified by:
getAttributeOptionsByCategory
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiersetId
- The attribute set's idattribute
- The attribute's namecategory
- The options category (not mandatory)- Returns:
- the list of all the attribute's options
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
listAttributeSets
public List<WSAttributeSet> listAttributeSets(String sid) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Gets metadata of all existing attribute sets.- Specified by:
listAttributeSets
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifier- Returns:
- The list of all attribute sets
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getAttributeSet
public WSAttributeSet getAttributeSet(String sid, String name) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Gets attribute set's metadata- Specified by:
getAttributeSet
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiername
- The attribute set's name- Returns:
- A value object containing the attribute set's metadata
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getAttributeSetById
public WSAttributeSet getAttributeSetById(String sid, long setId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Gets attribute set's metadata- Specified by:
getAttributeSetById
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiersetId
- The attribute set's id- Returns:
- A value object containing the attribute set's metadata
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
storeAttributeSet
public long storeAttributeSet(String sid, WSAttributeSet attributeSet) throws WebserviceException, PersistenceException 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:
sid
- Session identifier (need to be administrator)attributeSet
- set's value object containing the attribute set's metadata- Returns:
- The ID of the new attribute set
- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
deleteAttributeSet
public void deleteAttributeSet(String sid, long setId) throws WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Deletes an existing attribute set with the given identifier.- Specified by:
deleteAttributeSet
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifier (need to be administrator)setId
- The attribute set's id- Throws:
WebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
isReadable
public boolean isReadable(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Tests if a template is readable.- Specified by:
isReadable
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiertemplateId
- The template id- Returns:
- True if the identifier denotes a readable template, otherwise false.
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
isWritable
public boolean isWritable(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Tests if a template is writable- Specified by:
isWritable
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiertemplateId
- The template id- Returns:
- True if the identifier denotes a writable template, otherwise false
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
addAttributeOption
public void addAttributeOption(String sid, long setId, String attribute, WSAttributeOption wsoption) throws AuthenticationException, WebserviceException, PersistenceException Description copied from interface:DocumentMetadataService
Add a new option for the given attribute- Specified by:
addAttributeOption
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiersetId
- Attribute set IDattribute
- Attribute namewsoption
- Attribute option- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the database
-
getAccessControlList
public List<WSAccessControlEntry> getAccessControlList(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException Description copied from interface:DocumentMetadataService
Retrieves the access control list- Specified by:
getAccessControlList
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiertemplateId
- Template id- Returns:
- 'error' if error occurred, the right objects collection
- Throws:
AuthenticationException
- Invalid sessionWebserviceException
- Error in the webservicePersistenceException
- Error in the databasePermissionException
- The permission has not been granted
-
setAccessControlList
public void setAccessControlList(String sid, long templateId, List<WSAccessControlEntry> acl) throws PersistenceException, PermissionException, AuthenticationException, WebserviceException Description copied from interface:DocumentMetadataService
Sets the Access Control List- Specified by:
setAccessControlList
in interfaceDocumentMetadataService
- Parameters:
sid
- Session identifiertemplateId
- Template idacl
- the complete Access Control List- Throws:
PersistenceException
- Error in the databasePermissionException
- The user does not have the required permissionAuthenticationException
- Invalid sessionWebserviceException
- Error in the webservice
-