Package com.saperion.ws
Class SaWsAccessService
java.lang.Object
com.saperion.ws.AbstractService
com.saperion.ws.SaWsAccessService
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 -
Method Summary
Modifier and TypeMethodDescriptiongetAccessData
(String token, String xhdoc) Reads the access rights of the given document.getAuthorizedUsers
(String token, String xhdoc, 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
-
Constructor Details
-
SaWsAccessService
public SaWsAccessService()Constructor.
-
-
Method Details
-
getAccessData
public SaWsAccessData getAccessData(String token, 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(String token, String xhdoc, 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
-