Package com.avoka.component.sharepoint
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 Summary
Fields Modifier and Type Field Description static StringERROR_INVOKING_SHAREPOINT_INTERFACEThe common SharePoint service error message.protected static StringSOAP_BODY
-
Constructor Summary
Constructors Constructor Description SPConnection(String username, String password, String serverUrl, String serverDomain)Create a SharePoint connection with the given connection details.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.client.protocol.HttpClientContextgetHttpClientContext()StringgetServerUrl()voidsetHttpClientContext(org.apache.http.client.protocol.HttpClientContext context)voidvalidatedResponse(HttpResponse response, String targetUrl)Return the SOAP Document from the given HTTP response.
-
-
-
Field Detail
-
ERROR_INVOKING_SHAREPOINT_INTERFACE
public static final String ERROR_INVOKING_SHAREPOINT_INTERFACE
The common SharePoint service error message.- See Also:
- Constant Field Values
-
SOAP_BODY
protected static final String SOAP_BODY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 usernamepassword- SharePoint server login passwordserverUrl- SharePoint server URLserverDomain- SharePoint server Domain- Throws:
SPException- in case of SharePoint error response during authentication
-
-
Method Detail
-
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 responsetargetUrl- the SharePoint server URL- Throws:
SPException- if the response was not valid (not 200 OK)
-
-