Class SoapDocumentMetadataService
- java.lang.Object
-
- com.logicaldoc.webservice.AbstractService
-
- com.logicaldoc.webservice.soap.endpoint.SoapDocumentMetadataService
-
- All Implemented Interfaces:
DocumentMetadataService
- Direct Known Subclasses:
RestDocumentMetadataService
public class SoapDocumentMetadataService extends AbstractService implements DocumentMetadataService
Document Metadata Web Service Implementation- Since:
- 6.1
- Author:
- Matteo Caruso - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description SoapDocumentMetadataService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteAttributeSet(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 identifierString[]getAttributeOptions(String sid, long setId, String attribute)Retrieves the options for the given attributeWSAttributeOption[]getAttributeOptionsByCategory(String sid, long setId, String attribute, String category)Retrieves the options for the given attribute inside a given categoryWSAttributeSetgetAttributeSet(String sid, String name)Gets attribute set's metadataWSAttributeSetgetAttributeSetById(String sid, long setId)Gets attribute set's metadataWSRight[]getGrantedGroups(String sid, long templateId)Retrieves the list of granted groups for the given templateWSRight[]getGrantedUsers(String sid, long templateId)Retrieves the list of granted users for the given template.WSTemplategetTemplate(String sid, String name)Gets template's metadataWSTemplategetTemplateById(String sid, long templateId)Gets template's metadatavoidgrantGroupToTemplate(String sid, long templateId, long groupId, int permissions)Grants group permission to the template.voidgrantUserToTemplate(String sid, long templateId, long userId, int permissions)Grants user permission to the template.booleanisTemplateReadable(String sid, long templateId)Tests if a template is readable.booleanisTemplateWritable(String sid, long templateId)Tests if a template is writableWSAttributeSet[]listAttributeSets(String sid)Gets metadata of all existing attribute sets.WSTemplate[]listTemplates(String sid)Gets metadata of all existing templates.voidsetAttributeOptions(String sid, long setId, String attribute, WSAttributeOption[] wsOptions)Saves the options for the given attributelongstoreAttributeSet(String sid, WSAttributeSet attributeSet)Create/Update an attribute set.longstoreTemplate(String sid, WSTemplate template)Create/Update a template.-
Methods inherited from class com.logicaldoc.webservice.AbstractService
convertDateToString, convertStringToDate, getContext, getMessageContext, isValidateSession, setContext, setMessageContext, setValidateSession
-
-
-
-
Method Detail
-
listTemplates
public WSTemplate[] listTemplates(String sid) throws AuthenticationException, WebserviceException, PersistenceException
Description copied from interface:DocumentMetadataServiceGets metadata of all existing templates.- Specified by:
listTemplatesin interfaceDocumentMetadataService- Parameters:
sid- Session identifier- Returns:
- The list of all templates
- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the database
-
getTemplate
public WSTemplate getTemplate(String sid, String name) throws AuthenticationException, WebserviceException, PersistenceException
Description copied from interface:DocumentMetadataServiceGets template's metadata- Specified by:
getTemplatein 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:DocumentMetadataServiceGets template's metadata- Specified by:
getTemplateByIdin 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
-
storeTemplate
public long storeTemplate(String sid, WSTemplate template) 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 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 sessionWebserviceException- Error in the webservicePersistenceException- Error in the databasePermissionException- The permission has not been granted
-
deleteTemplate
public 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 interfaceDocumentMetadataService- Parameters:
sid- Session identifier (need to be administrator)templateId- The template's id- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the databasePermissionException- The permission has not been granted
-
setAttributeOptions
public void setAttributeOptions(String sid, long setId, String attribute, WSAttributeOption[] wsOptions) throws WebserviceException, PersistenceException
Description copied from interface:DocumentMetadataServiceSaves the options for the given attribute- Specified by:
setAttributeOptionsin interfaceDocumentMetadataService- Parameters:
sid- Session identifiersetId- The attribute set's idattribute- The attribute's namewsOptions- The attribute's options- Throws:
WebserviceException- Error in the webservicePersistenceException- Error in the database
-
getAttributeOptions
public 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 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 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 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 WSAttributeSet[] listAttributeSets(String sid) throws AuthenticationException, WebserviceException, PersistenceException
Description copied from interface:DocumentMetadataServiceGets metadata of all existing attribute sets.- Specified by:
listAttributeSetsin 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:DocumentMetadataServiceGets attribute set's metadata- Specified by:
getAttributeSetin 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:DocumentMetadataServiceGets attribute set's metadata- Specified by:
getAttributeSetByIdin 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: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:
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:DocumentMetadataServiceDeletes an existing attribute set with the given identifier.- Specified by:
deleteAttributeSetin 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
-
isTemplateReadable
public boolean isTemplateReadable(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException
Description copied from interface:DocumentMetadataServiceTests if a template is readable.- Specified by:
isTemplateReadablein 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
-
isTemplateWritable
public boolean isTemplateWritable(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException
Description copied from interface:DocumentMetadataServiceTests if a template is writable- Specified by:
isTemplateWritablein 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
-
grantUserToTemplate
public void grantUserToTemplate(String sid, long templateId, long userId, int permissions) throws PersistenceException, AuthenticationException, WebserviceException, PermissionException
Description copied from interface:DocumentMetadataServiceGrants user permission to the template.- Specified by:
grantUserToTemplatein interfaceDocumentMetadataService- Parameters:
sid- Session identifiertemplateId- Template iduserId- User Idpermissions- the permission integer representation. If '0', the user will be not granted to access the template.- Throws:
PersistenceException- Error in the databaseAuthenticationException- Invalid sessionWebserviceException- Error in the webservicePermissionException- The permission has not been granted
-
grantGroupToTemplate
public void grantGroupToTemplate(String sid, long templateId, long groupId, int permissions) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException
Description copied from interface:DocumentMetadataServiceGrants group permission to the template.- Specified by:
grantGroupToTemplatein interfaceDocumentMetadataService- Parameters:
sid- Session identifiertemplateId- Template idgroupId- Group Idpermissions- the permission integer representation. If '0', the group will be not granted to access the template.- Throws:
AuthenticationException- Invalid sessionWebserviceException- Error in the webservicePersistenceException- Error in the databasePermissionException- The permission has not been granted
-
getGrantedUsers
public WSRight[] getGrantedUsers(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException
Description copied from interface:DocumentMetadataServiceRetrieves the list of granted users for the given template.- Specified by:
getGrantedUsersin 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
-
getGrantedGroups
public WSRight[] getGrantedGroups(String sid, long templateId) throws AuthenticationException, WebserviceException, PersistenceException, PermissionException
Description copied from interface:DocumentMetadataServiceRetrieves the list of granted groups for the given template- Specified by:
getGrantedGroupsin 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
-
-