Class SoapAuditClient
java.lang.Object
com.logicaldoc.webservice.soap.client.SoapClient<AuditService>
com.logicaldoc.audit.webservice.soap.client.SoapAuditClient
- All Implemented Interfaces:
AuditService
public class SoapAuditClient
extends com.logicaldoc.webservice.soap.client.SoapClient<AuditService>
implements AuditService
Simple client for the Audit webservice
- Since:
- 6.6
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
ConstructorDescriptionSoapAuditClient
(String endpoint) SoapAuditClient
(String endpoint, int timeout) SoapAuditClient
(String endpoint, int gzipThreshold, boolean log, int timeout) -
Method Summary
Modifier and TypeMethodDescriptiongetDocumentHistory
(String sid, long docId) Gets the history of a given documentgetHistories
(String sid, String path, String sidFilter, Long userId, String dateStart, String dateEnd, List<String> events, Integer max) Lists all the histories by the given criteria.Lists all the document and folder histories in the given treeLists all the document and folder histories in the given tree but just the more recent entry for each object(document or folder)getMessages
(String sid) Lists messages routed to the current usergetSubscriptions
(String sid) Lists all the subscriptions of the current usergetUserHistories
(String sid, String username, Long userId, String oldestDate, List<String> events, Integer max) Retrieves the user histories.void
markAsRead
(String sid, List<Long> ids) Marks a set of messages as read by the current usersaveDocumentHistory
(String sid, WSHistory history) Saves a document historyvoid
Subscribes the current user to notifications emitted by documents or foldersvoid
unsubscribe
(String sid, List<Long> ids, String type) Unsubscribes the current user to notifications emitted by documents or folders
-
Constructor Details
-
SoapAuditClient
-
SoapAuditClient
-
SoapAuditClient
-
-
Method Details
-
subscribe
public void subscribe(String sid, List<Long> ids, String type, String events) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Subscribes the current user to notifications emitted by documents or folders- Specified by:
subscribe
in interfaceAuditService
- Parameters:
sid
- The session identifierids
- The ids of documents or folderstype
- one of Subscription.TYPE_xevents
- Optional list of event codes separated by comma- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
unsubscribe
public void unsubscribe(String sid, List<Long> ids, String type) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Unsubscribes the current user to notifications emitted by documents or folders- Specified by:
unsubscribe
in interfaceAuditService
- Parameters:
sid
- The session identifierids
- The ids of documents or folderstype
- one of Subscription.TYPE_x- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
getSubscriptions
public List<WSSubscription> getSubscriptions(String sid) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Lists all the subscriptions of the current user- Specified by:
getSubscriptions
in interfaceAuditService
- Parameters:
sid
- identifier of the session- Returns:
- array of subscriptions
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
getMessages
public List<WSMessage> getMessages(String sid) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Lists messages routed to the current user- Specified by:
getMessages
in interfaceAuditService
- Parameters:
sid
- identifier of the session- Returns:
- array of messages
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
markAsRead
public void markAsRead(String sid, List<Long> ids) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Marks a set of messages as read by the current user- Specified by:
markAsRead
in interfaceAuditService
- Parameters:
sid
- identifier of the sessionids
- identifiers of messages- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
getDocumentHistory
public List<WSHistory> getDocumentHistory(String sid, long docId) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Gets the history of a given document- Specified by:
getDocumentHistory
in interfaceAuditService
- Parameters:
sid
- Session identifierdocId
- The document id- Returns:
- List of history records
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.core.security.authorization.PermissionException
- The user does not have the required permissioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
getHistory
public List<WSHistory> getHistory(String sid, long folderId, String oldestDate, List<String> events, Integer max) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Lists all the document and folder histories in the given tree- Specified by:
getHistory
in interfaceAuditService
- Parameters:
sid
- The session identifierfolderId
- The tree to inspectoldestDate
- Optional oldest date to use as filterevents
- Optional list of event codes to use as filtermax
- Optional hint on the maximum number of records for each history type(document, folder ...)- Returns:
- The list of histories
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
getLatestHistory
public List<WSHistory> getLatestHistory(String sid, long folderId, String oldestDate, List<String> events, Integer max) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Lists all the document and folder histories in the given tree but just the more recent entry for each object(document or folder)- Specified by:
getLatestHistory
in interfaceAuditService
- Parameters:
sid
- The session identifierfolderId
- The tree to inspectoldestDate
- Optional oldest date to use as filterevents
- Optional list of event codes to use as filtermax
- Optional hint on the maximum number of records for each history type(document, folder ...)- Returns:
- The list of histories
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
saveDocumentHistory
public WSHistory saveDocumentHistory(String sid, WSHistory history) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException Description copied from interface:AuditService
Saves a document history- Specified by:
saveDocumentHistory
in interfaceAuditService
- Parameters:
sid
- Session identifierhistory
- The history to save- Returns:
- The saved History
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the database
-
getUserHistories
public List<WSHistory> getUserHistories(String sid, String username, Long userId, String oldestDate, List<String> events, Integer max) throws com.logicaldoc.core.PersistenceException, com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.security.authorization.PermissionException Description copied from interface:AuditService
Retrieves the user histories. Only those users with access to Last Changes report can invoke this method.- Specified by:
getUserHistories
in interfaceAuditService
- Parameters:
sid
- Session identifierusername
- optional username to use as filteruserId
- optional user id to use as filteroldestDate
- optional date id to use as filterevents
- optional list of event namesmax
- maximum number of returned records- Returns:
- the history records
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the databasecom.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.security.authorization.PermissionException
- The user does not have the required permission
-
getHistories
public List<WSHistory> getHistories(String sid, String path, String sidFilter, Long userId, String dateStart, String dateEnd, List<String> events, Integer max) throws com.logicaldoc.core.security.authentication.AuthenticationException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException, com.logicaldoc.core.security.authorization.PermissionException Description copied from interface:AuditService
Lists all the histories by the given criteria. Only those users with access to Last Changes report can invoke this method.- Specified by:
getHistories
in interfaceAuditService
- Parameters:
sid
- The session identifierpath
- A path expression to use as filtersidFilter
- A SID expression to use as filteruserId
- user identifierdateStart
- oldest datedateEnd
- earliest dateevents
- list of eventsmax
- maximum number of records- Returns:
- the list of histories
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- Invalid sessioncom.logicaldoc.webservice.WebserviceException
- Error in the webservicecom.logicaldoc.core.PersistenceException
- Error in the databasecom.logicaldoc.core.security.authorization.PermissionException
- The user does not have the required permission
-