Package com.saperion.ws
Class AbstractService
java.lang.Object
com.saperion.ws.AbstractService
- Direct Known Subclasses:
SaWsAccessService
,SaWsArchiveService
,SaWsAuthenticationService
,SaWsConfigurationService
,SaWsContentService
,SaWsLookupService
,SaWsVersionService
,SaWsWorkflowService
Abstract base class for web services.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static boolean
Indicates the correct configuration of the service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addToRequest
(CloseablePooledSession closeablePooledSession) Adds the given session to the request.protected com.saperion.connector.SaClassicConnector
getConnection
(String token) Retrieves the connection by the given token.protected CloseablePooledSession
getSession
(String token) Gets the session by the given token.protected boolean
Indicates the correct configuration of this web service.
-
Field Details
-
configured
protected static boolean configuredIndicates the correct configuration of the service. Flag is set in static block.
-
-
Constructor Details
-
AbstractService
public AbstractService()
-
-
Method Details
-
getConnection
protected com.saperion.connector.SaClassicConnector getConnection(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
Adds the given session to the request.- Parameters:
closeablePooledSession
- the closable session
-
getSession
Gets the session by the given token.- Parameters:
token
- the token to get the session for.- Returns:
- the session by the given token.
- Throws:
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.
-