Class SPConnection

java.lang.Object
com.avoka.component.sharepoint.SPConnection

public class SPConnection extends Object
Provides a Microsoft SharePoint connection class.
Since:
3.5.0
  • Field Details

  • Constructor Details

    • SPConnection

      public SPConnection(String username, String password, String serverUrl, String serverDomain) throws SPException
      Create a SharePoint connection with the given connection details.
      Parameters:
      username - SharePoint server login username
      password - SharePoint server login password
      serverUrl - SharePoint server URL
      serverDomain - SharePoint server Domain
      Throws:
      SPException - in case of SharePoint error response during authentication
  • Method Details

    • getHttpClientContext

      public org.apache.http.client.protocol.HttpClientContext getHttpClientContext()
      Returns:
      the cached HTTP Context instance.
      Since:
      4.3.0
    • setHttpClientContext

      public void setHttpClientContext(org.apache.http.client.protocol.HttpClientContext context)
      Parameters:
      context - the HTTP Client Context instance.
      Since:
      4.3.0
    • getServerUrl

      public String getServerUrl()
      Returns:
      the SharePoint server URL.
    • validatedResponse

      public void validatedResponse(HttpResponse response, String targetUrl) throws SPException
      Return the SOAP Document from the given HTTP response.
      Parameters:
      response - the HTTP SOAP response
      targetUrl - the SharePoint server URL
      Throws:
      SPException - if the response was not valid (not 200 OK)