Package com.saperion.ws
Class SaWsAccessService
- java.lang.Object
-
- com.saperion.ws.AbstractService
-
- com.saperion.ws.SaWsAccessService
-
public class SaWsAccessService extends AbstractService
This class wraps all methods of the SaClassicConnector. It parses the information, which is fetched from the server to classes usable for web services. JAX-B requires classes to be JavaBeans, because it uses the set/get-Methods. You need a token for calling the methods to perform searches and modifications. For getting a token the logon method has to be called. If the thread is timed out on the backend or if you aren't logged in you will get an exception.- Author:
- Daniel Manzke(dam)
-
-
Field Summary
-
Fields inherited from class com.saperion.ws.AbstractService
configured
-
-
Constructor Summary
Constructors Constructor Description SaWsAccessService()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaWsAccessData
getAccessData(java.lang.String token, java.lang.String xhdoc)
Reads the access rights of the given document.SaWsAuthorizedUsers
getAuthorizedUsers(java.lang.String token, java.lang.String xhdoc, java.util.List<SaWsRight> rights, SaWsMatchKind match)
Retrieves and returns a SaWsAuthorizedUsers object with the matching users.-
Methods inherited from class com.saperion.ws.AbstractService
addToRequest, getConnection, getSession, isConfigured
-
-
-
-
Method Detail
-
getAccessData
public SaWsAccessData getAccessData(java.lang.String token, java.lang.String xhdoc) throws SaWsAuthenticationException, SaWsRepositoryException, SaWsException
Reads the access rights of the given document.- Parameters:
token
- to identify the right sessionxhdoc
- The ID of the document (XHDOC)- Returns:
- Access rights of this document
- Throws:
SaWsAuthenticationException
- if an authentication error occurs.SaWsRepositoryException
- if an error while accessing the repository occurs.SaWsException
- See Also:
SaClassicConnector.getDocumentAccessData(java.lang.String)
-
getAuthorizedUsers
public SaWsAuthorizedUsers getAuthorizedUsers(java.lang.String token, java.lang.String xhdoc, java.util.List<SaWsRight> rights, SaWsMatchKind match) throws SaWsAuthenticationException, SaWsRepositoryException, SaWsException
Retrieves and returns a SaWsAuthorizedUsers object with the matching users.- Parameters:
token
- to identify the right sessionxhdoc
- The ID of the document (XHDOC)rights
- A List of SaWsRight to get authorized users for.match
- Defines the matching kind for SaWsRight verification.- Returns:
- Access rights of this document
- Throws:
SaWsAuthenticationException
- if an authentication error occurs.SaWsRepositoryException
- if an error while accessing the repository occurs.SaWsException
-
-