public class RepositoryClientImpl extends AbstractRepositoryClient
Modifier and Type | Field and Description |
---|---|
protected AuthenticationProvider |
_authenticationProvider |
protected java.lang.String |
_designStudioId |
protected org.apache.http.impl.client.DefaultHttpClient |
_httpClient |
protected org.apache.http.params.HttpParams |
_httpParams |
static int |
_TIMEOUT_MILLIS |
protected java.lang.String |
_url |
static java.lang.String |
USER_AGENT |
Constructor and Description |
---|
RepositoryClientImpl(AuthenticationProvider authenticationProvider) |
RepositoryClientImpl(java.lang.String url,
java.lang.String userName,
java.lang.String password,
ProxyServerConfiguration proxyServerConfiguration)
Deprecated.
use an {
AuthenticationProvider } instead of username / password. |
Modifier and Type | Method and Description |
---|---|
protected void |
configureHttpClient(ProxyServerConfiguration proxyConf) |
protected org.apache.http.HttpResponse |
doSend(org.apache.http.client.methods.HttpPost postMethod,
java.lang.String expectedContentType)
Posts a request to a server, and gets the response stream.
|
AuthenticationProvider |
getAuthenticationProvider() |
protected java.util.List<NamedAuthSchemeProvider> |
getAuthSchemes() |
protected org.apache.http.Header |
getHeader(org.apache.http.HttpMessage httpRequest,
java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
getInfo()
Get information about the Management Console and the Repository API.
|
static int |
getTimoutPropertyOrDefault() |
java.lang.String |
pingRepository()
Ping the repository server
|
protected org.apache.http.protocol.HttpContext |
prepareContext() |
protected org.w3c.dom.Document |
sendXML(org.w3c.dom.Document requestDocument)
Sends the XML document to the repository.
|
protected void |
validateResponse(org.apache.http.HttpResponse response,
java.lang.String expectedResponse) |
addRoboServer, addRoboServer, computeChecksum, deleteConnector, deleteConnector, deleteFile, deleteFile, deleteFolder, deleteFolder, deleteResource, deleteResource, deleteRoboServer, deleteRobot, deleteRobot, deleteSnippet, deleteSnippet, deleteType, deleteType, deployConnector, deployConnector, deployLibrary, deployLibrary, deployResource, deployResource, deployRobot, deployRobot, deploySnippet, deploySnippet, deployType, deployType, doDeploy, getBytes, getCurrentDate, getFileInventory, getFolderInventory, getOAuthUserEntriesInProject, getProjectInventory, getProjects, getProjectsByUser, getRoboServerClusters, getRoboServerClusters, getRobotsByTag, getRobotSignature, getRobotsInProject, getSlimProjectInventory, moveFile, moveFile, newRequest, renameRobot, renameRobot, updateFile, updateFile
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDocument, parseDocument
public static final int _TIMEOUT_MILLIS
public static final java.lang.String USER_AGENT
protected org.apache.http.params.HttpParams _httpParams
protected java.lang.String _url
protected AuthenticationProvider _authenticationProvider
protected org.apache.http.impl.client.DefaultHttpClient _httpClient
protected java.lang.String _designStudioId
public RepositoryClientImpl(java.lang.String url, java.lang.String userName, java.lang.String password, ProxyServerConfiguration proxyServerConfiguration) throws RepositoryClientException
AuthenticationProvider
} instead of username / password.url
- the repository's base url, e.g. https://example.com:8080/ManagementConsole/userName
- the username to usepassword
- the password to useproxyServerConfiguration
- proxyServer configuration or nullRepositoryClientException
- If we can't configure the HttpClientpublic RepositoryClientImpl(AuthenticationProvider authenticationProvider) throws RepositoryClientException
authenticationProvider
- The authentication method and credentials to use.RepositoryClientException
- If we can't configure the HttpClient.public static int getTimoutPropertyOrDefault()
protected void configureHttpClient(ProxyServerConfiguration proxyConf) throws RepositoryClientException
RepositoryClientException
public AuthenticationProvider getAuthenticationProvider()
protected org.apache.http.protocol.HttpContext prepareContext()
protected java.util.List<NamedAuthSchemeProvider> getAuthSchemes()
public java.lang.String pingRepository() throws RepositoryClientException
RepositoryClient
RepositoryClientException
- If a communication error occurs.public java.util.Map<java.lang.String,java.lang.String> getInfo() throws RepositoryClientException
RepositoryClient
RepositoryClientException
- If any error occursprotected org.w3c.dom.Document sendXML(org.w3c.dom.Document requestDocument) throws RepositoryClientException
sendXML
in class AbstractRepositoryClient
requestDocument
- the request document.RepositoryClientException
- if an error occurs.protected void validateResponse(org.apache.http.HttpResponse response, java.lang.String expectedResponse) throws RepositoryConnectionException
RepositoryConnectionException
protected org.apache.http.HttpResponse doSend(org.apache.http.client.methods.HttpPost postMethod, java.lang.String expectedContentType) throws RepositoryConnectionException
postMethod
- the postMethod, including headers, and bodyexpectedContentType
- The content-type the client expects the server to return, if the content-type is
different a RepositoryClientException is thrownRepositoryConnectionException
- if we can't connect to the serverprotected org.apache.http.Header getHeader(org.apache.http.HttpMessage httpRequest, java.lang.String name)
RoboSuite Java API, v11.4.7880