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 Object
Abstract base class for web services.
  • Field Details

    • configured

      protected static boolean configured
      Indicates 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

      protected void addToRequest(CloseablePooledSession closeablePooledSession)
      Adds the given session to the request.
      Parameters:
      closeablePooledSession - the closable session
    • getSession

      protected CloseablePooledSession getSession(String token) throws 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:
      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.