Package com.saperion.ws
Class AbstractService
- java.lang.Object
-
- com.saperion.ws.AbstractService
-
- Direct Known Subclasses:
SaWsAccessService
,SaWsArchiveService
,SaWsAuthenticationService
,SaWsConfigurationService
,SaWsContentService
,SaWsLookupService
,SaWsVersionService
,SaWsWorkflowService
public abstract class AbstractService extends java.lang.Object
Abstract base class for web services.
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
configured
Indicates the correct configuration of the service.
-
Constructor Summary
Constructors Constructor Description AbstractService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addToRequest(CloseablePooledSession closeablePooledSession)
Adds the given session to the request.protected com.saperion.connector.SaClassicConnector
getConnection(java.lang.String token)
Retrieves the connection by the given token.protected CloseablePooledSession
getSession(java.lang.String token)
Gets the session by the given token.protected boolean
isConfigured()
Indicates the correct configuration of this web service.
-
-
-
Method Detail
-
getConnection
protected com.saperion.connector.SaClassicConnector getConnection(java.lang.String token) throws SaWsException
Retrieves the connection by the given token.- Parameters:
token
- The token to identify the corresponding connection.- Returns:
- the corresponding connection SaClassicConnector object.
- Throws:
SaWsException
- if an authentication error occurs.
-
addToRequest
protected void addToRequest(CloseablePooledSession closeablePooledSession)
Adds the given session to the request.- Parameters:
closeablePooledSession
- the closable session
-
getSession
protected CloseablePooledSession getSession(java.lang.String token) throws java.lang.Exception
Gets the session by the given token.- Parameters:
token
- the token to get the session for.- Returns:
- the session by the given token.
- Throws:
java.lang.Exception
- if an error occurs.
-
isConfigured
protected boolean isConfigured()
Indicates the correct configuration of this web service.- Returns:
- configured True if the service is configured properly, false otherwise.
-
-