diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index bb49c9e..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) 2002-2012 Rally Software Development Corp. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 5deef6c..0000000
--- a/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-## License
-
-Copyright (c) Rally Software Development Corp. 2013 Distributed under the MIT License.
-
-## Warranty
-
-The Java Toolkit for Rally REST API is available on an as-is basis.
-
-## Support
-
-Rally Software does not actively maintain or support this toolkit. If you have a question or problem, we recommend posting it to Stack Overflow: http://stackoverflow.com/questions/ask?tags=rally
-
-## Download
-
-[Download REST API jar and dependencies](https://github.com/RallyTools/RallyRestToolkitForJava/wiki/User-Guide#setup)
-
-## User Guide
-
-Please view the [Java Toolkit for Rally REST API User Guide](https://github.com/RallyTools/RallyRestToolkitForJava/wiki/User-Guide) in the attached wiki
-
-[Java Toolkit for Rally REST API javadocs](http://rallytools.github.io/RallyRestToolkitForJava/)
-
-[Web Services API documentation](https://rally1.rallydev.com/slm/doc/webservice)
-
-## Developer Guide
-Please view the [Developer Guide](https://github.com/RallyTools/RallyRestToolkitForJava/wiki/Developer-Guide) in the attached wiki
diff --git a/RallyRestToolkitForJava.iml b/RallyRestToolkitForJava.iml
deleted file mode 100644
index 59304dc..0000000
--- a/RallyRestToolkitForJava.iml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
public class RallyRestApi +extends Object +implements Closeable+
The main interface to the Rest API.
+Provides CRUD and query operations.
| Modifier and Type | +Field and Description | +
|---|---|
protected HttpClient |
+client |
+
| Modifier | +Constructor and Description | +
|---|---|
protected |
+RallyRestApi(HttpClient httpClient) |
+
|
+RallyRestApi(URI server,
+ String apiKey)
+Creates a new instance for the specified server using the specified API Key.
+ |
+
|
+RallyRestApi(URI server,
+ String userName,
+ String password)
+Deprecated.
+
+Use the api key constructor instead.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+close()
+Release all resources associated with this instance.
+ |
+
CreateResponse |
+create(CreateRequest request)
+Create the specified object.
+ |
+
DeleteResponse |
+delete(DeleteRequest request)
+Delete the specified object.
+ |
+
GetResponse |
+get(GetRequest request)
+Get the specified object.
+ |
+
HttpClient |
+getClient()
+Get the underlying http client implementation.
+ |
+
String |
+getWsapiVersion()
+Get the current version of the WSAPI being targeted.
+ |
+
QueryResponse |
+query(QueryRequest request)
+Query for objects matching the specified request.
+ |
+
void |
+setApplicationName(String value)
+Set the value of the X-RallyIntegrationName header included on all requests.
+ |
+
void |
+setApplicationVendor(String value)
+Set the value of the X-RallyIntegrationVendor header included on all requests.
+ |
+
void |
+setApplicationVersion(String value)
+Set the value of the X-RallyIntegrationVersion header included on all requests.
+ |
+
void |
+setProxy(URI proxy)
+Set the unauthenticated proxy server to use.
+ |
+
void |
+setProxy(URI proxy,
+ String userName,
+ String password)
+Set the authenticated proxy server to use.
+ |
+
void |
+setWsapiVersion(String wsapiVersion)
+Set the current version of the WSAPI being targeted.
+ |
+
UpdateResponse |
+update(UpdateRequest request)
+Update the specified object.
+ |
+
CollectionUpdateResponse |
+updateCollection(CollectionUpdateRequest request)
+Update the specified collection.
+ |
+
protected HttpClient client+
public RallyRestApi(URI server, + String userName, + String password)+
server - The server to connect to, e.g. new URI("https://rally1.rallydev.com")userName - The username to be used for authentication.password - The password to be used for authentication.public RallyRestApi(URI server, + String apiKey)+
server - The server to connect to, e.g. new URI("https://rally1.rallydev.com")apiKey - The API Key to be used for authentication.protected RallyRestApi(HttpClient httpClient)+
public void setProxy(URI proxy)+
proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")public void setProxy(URI proxy, + String userName, + String password)+
proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")userName - The username to be used for authentication.password - The password to be used for authentication.public void setApplicationVendor(String value)+
value - The vendor header to be included on all requests.public void setApplicationVersion(String value)+
value - The vendor header to be included on all requests.public void setApplicationName(String value)+
value - The vendor header to be included on all requests.public String getWsapiVersion()+
public void setWsapiVersion(String wsapiVersion)+
wsapiVersion - the new version, e.g. "1.30"public CreateResponse create(CreateRequest request) + throws IOException+
request - the CreateRequest specifying the object to be created.CreateResponseIOException - if an error occurs during the creation.public UpdateResponse update(UpdateRequest request) + throws IOException+
request - the UpdateRequest specifying the object to be updated.UpdateResponseIOException - if an error occurs during the update.public CollectionUpdateResponse updateCollection(CollectionUpdateRequest request) + throws IOException+
request - the CollectionUpdateRequest specifying the collection to be updated.CollectionUpdateResponseIOException - if an error occurs during the update.public DeleteResponse delete(DeleteRequest request) + throws IOException+
request - the DeleteRequest specifying the object to be deleted.DeleteResponseIOException - if an error occurs during the deletion.public QueryResponse query(QueryRequest request) + throws IOException+
request - the QueryRequest specifying the object to be created.QueryResponseIOException - if an error occurs during the query.public GetResponse get(GetRequest request) + throws IOException+
request - the GetRequest specifying the object to be retrieved.GetResponseIOException - if an error occurs during the retrieval.public void close() + throws IOException+
close in interface Closeableclose in interface AutoCloseableIOException - if an error occurs releasing resourcespublic HttpClient getClient()+
Copyright © 2016. All Rights Reserved.
+ + diff --git a/src/main/resources/doc/com/rallydev/rest/class-use/RallyRestApi.html b/com/rallydev/rest/class-use/RallyRestApi.html similarity index 66% rename from src/main/resources/doc/com/rallydev/rest/class-use/RallyRestApi.html rename to com/rallydev/rest/class-use/RallyRestApi.html index d2d25e6..3d2eb37 100644 --- a/src/main/resources/doc/com/rallydev/rest/class-use/RallyRestApi.html +++ b/com/rallydev/rest/class-use/RallyRestApi.html @@ -2,15 +2,21 @@ - -Copyright © 2016. All Rights Reserved.
diff --git a/com/rallydev/rest/client/ApiKeyClient.html b/com/rallydev/rest/client/ApiKeyClient.html new file mode 100644 index 0000000..13c73fb --- /dev/null +++ b/com/rallydev/rest/client/ApiKeyClient.html @@ -0,0 +1,399 @@ + + + + + + +public class ApiKeyClient +extends HttpClient+
| Modifier and Type | +Field and Description | +
|---|---|
protected static String |
+API_KEY_HEADER |
+
protected String |
+apiKey |
+
client, server, wsapiVersion| Constructor and Description | +
|---|
ApiKeyClient(URI server,
+ String apiKey)
+Construct a new client.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
protected String |
+doRequest(org.apache.http.client.methods.HttpRequestBase request)
+Execute a request against the WSAPI
+ |
+
close, doDelete, doGet, doPost, doPut, executeRequest, getServer, getWsapiUrl, getWsapiVersion, setApplicationName, setApplicationVendor, setApplicationVersion, setClientCredentials, setProxy, setProxy, setWsapiVersioncreateHttpParams, createHttpProcessor, setDefaultHttpParamsaddRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, createAuthSchemeRegistry, createClientConnectionManager, createClientRequestDirector, createClientRequestDirector, createClientRequestDirector, createConnectionKeepAliveStrategy, createConnectionReuseStrategy, createCookieSpecRegistry, createCookieStore, createCredentialsProvider, createHttpContext, createHttpRequestRetryHandler, createHttpRoutePlanner, createProxyAuthenticationHandler, createProxyAuthenticationStrategy, createRedirectHandler, createRequestExecutor, createTargetAuthenticationHandler, createTargetAuthenticationStrategy, createUserTokenHandler, determineParams, execute, execute, execute, execute, execute, execute, execute, execute, getAuthSchemes, getBackoffManager, getConnectionBackoffStrategy, getConnectionKeepAliveStrategy, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getProxyAuthenticationStrategy, getRedirectHandler, getRedirectStrategy, getRequestExecutor, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, getTargetAuthenticationStrategy, getUserTokenHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setBackoffManager, setConnectionBackoffStrategy, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setKeepAliveStrategy, setParams, setProxyAuthenticationHandler, setProxyAuthenticationStrategy, setRedirectHandler, setRedirectStrategy, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler, setTargetAuthenticationStrategy, setUserTokenHandlerprotected String apiKey+
protected static final String API_KEY_HEADER+
protected String doRequest(org.apache.http.client.methods.HttpRequestBase request) + throws IOException+
doRequest in class HttpClientrequest - the request to be executedIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestCopyright © 2016. All Rights Reserved.
+ + diff --git a/com/rallydev/rest/client/BasicAuthClient.html b/com/rallydev/rest/client/BasicAuthClient.html new file mode 100644 index 0000000..0418212 --- /dev/null +++ b/com/rallydev/rest/client/BasicAuthClient.html @@ -0,0 +1,478 @@ + + + + + + +public class BasicAuthClient +extends HttpClient+
| Modifier and Type | +Field and Description | +
|---|---|
protected org.apache.http.auth.Credentials |
+credentials |
+
protected static String |
+SECURITY_ENDPOINT_DOES_NOT_EXIST |
+
protected static String |
+SECURITY_TOKEN_KEY |
+
protected static String |
+SECURITY_TOKEN_PARAM_KEY |
+
protected String |
+securityToken |
+
client, server, wsapiVersion| Constructor and Description | +
|---|
BasicAuthClient(URI server,
+ String userName,
+ String password)
+Construct a new client.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
protected void |
+attachSecurityInfo(org.apache.http.client.methods.HttpRequestBase request)
+Attach the security token parameter to the request.
+ |
+
protected String |
+doRequest(org.apache.http.client.methods.HttpRequestBase request)
+Execute a request against the WSAPI
+ |
+
close, doDelete, doGet, doPost, doPut, executeRequest, getServer, getWsapiUrl, getWsapiVersion, setApplicationName, setApplicationVendor, setApplicationVersion, setClientCredentials, setProxy, setProxy, setWsapiVersioncreateHttpParams, createHttpProcessor, setDefaultHttpParamsaddRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, createAuthSchemeRegistry, createClientConnectionManager, createClientRequestDirector, createClientRequestDirector, createClientRequestDirector, createConnectionKeepAliveStrategy, createConnectionReuseStrategy, createCookieSpecRegistry, createCookieStore, createCredentialsProvider, createHttpContext, createHttpRequestRetryHandler, createHttpRoutePlanner, createProxyAuthenticationHandler, createProxyAuthenticationStrategy, createRedirectHandler, createRequestExecutor, createTargetAuthenticationHandler, createTargetAuthenticationStrategy, createUserTokenHandler, determineParams, execute, execute, execute, execute, execute, execute, execute, execute, getAuthSchemes, getBackoffManager, getConnectionBackoffStrategy, getConnectionKeepAliveStrategy, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getProxyAuthenticationStrategy, getRedirectHandler, getRedirectStrategy, getRequestExecutor, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, getTargetAuthenticationStrategy, getUserTokenHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setBackoffManager, setConnectionBackoffStrategy, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setKeepAliveStrategy, setParams, setProxyAuthenticationHandler, setProxyAuthenticationStrategy, setRedirectHandler, setRedirectStrategy, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler, setTargetAuthenticationStrategy, setUserTokenHandlerprotected static final String SECURITY_ENDPOINT_DOES_NOT_EXIST+
protected static final String SECURITY_TOKEN_PARAM_KEY+
protected static final String SECURITY_TOKEN_KEY+
protected String securityToken+
protected org.apache.http.auth.Credentials credentials+
protected String doRequest(org.apache.http.client.methods.HttpRequestBase request) + throws IOException+
doRequest in class HttpClientrequest - the request to be executedIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestprotected void attachSecurityInfo(org.apache.http.client.methods.HttpRequestBase request) + throws IOException, + URISyntaxException+
request - the request to be modifiedIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestURISyntaxException - if there is a problem with the url in the requestCopyright © 2016. All Rights Reserved.
+ + diff --git a/com/rallydev/rest/client/HttpClient.html b/com/rallydev/rest/client/HttpClient.html new file mode 100644 index 0000000..41c5e3e --- /dev/null +++ b/com/rallydev/rest/client/HttpClient.html @@ -0,0 +1,752 @@ + + + + + + +public class HttpClient +extends org.apache.http.impl.client.DefaultHttpClient +implements Closeable+
| Modifier and Type | +Field and Description | +
|---|---|
protected org.apache.http.impl.client.DecompressingHttpClient |
+client |
+
protected URI |
+server |
+
protected String |
+wsapiVersion |
+
| Modifier | +Constructor and Description | +
|---|---|
protected |
+HttpClient(URI server) |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+close()
+Release all resources associated with this instance.
+ |
+
String |
+doDelete(String url)
+Perform a delete against the WSAPI
+ |
+
String |
+doGet(String url)
+Perform a get against the WSAPI
+ |
+
String |
+doPost(String url,
+ String body)
+Perform a post against the WSAPI
+ |
+
String |
+doPut(String url,
+ String body)
+Perform a put against the WSAPI
+ |
+
protected String |
+doRequest(org.apache.http.client.methods.HttpRequestBase request)
+Execute a request against the WSAPI
+ |
+
protected String |
+executeRequest(org.apache.http.client.methods.HttpRequestBase request)
+Execute a request against the WSAPI
+ |
+
String |
+getServer()
+Get the current server being targeted.
+ |
+
String |
+getWsapiUrl()
+Get the WSAPI base url based on the current server and WSAPI version
+ |
+
String |
+getWsapiVersion()
+Get the current version of the WSAPI being targeted.
+ |
+
void |
+setApplicationName(String value)
+Set the value of the X-RallyIntegrationName header included on all requests.
+ |
+
void |
+setApplicationVendor(String value)
+Set the value of the X-RallyIntegrationVendor header included on all requests.
+ |
+
void |
+setApplicationVersion(String value)
+Set the value of the X-RallyIntegrationVersion header included on all requests.
+ |
+
protected org.apache.http.auth.Credentials |
+setClientCredentials(URI server,
+ String userName,
+ String password) |
+
void |
+setProxy(URI proxy)
+Set the unauthenticated proxy server to use.
+ |
+
void |
+setProxy(URI proxy,
+ String userName,
+ String password)
+Set the authenticated proxy server to use.
+ |
+
void |
+setWsapiVersion(String wsapiVersion)
+Set the current version of the WSAPI being targeted.
+ |
+
createHttpParams, createHttpProcessor, setDefaultHttpParamsaddRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, createAuthSchemeRegistry, createClientConnectionManager, createClientRequestDirector, createClientRequestDirector, createClientRequestDirector, createConnectionKeepAliveStrategy, createConnectionReuseStrategy, createCookieSpecRegistry, createCookieStore, createCredentialsProvider, createHttpContext, createHttpRequestRetryHandler, createHttpRoutePlanner, createProxyAuthenticationHandler, createProxyAuthenticationStrategy, createRedirectHandler, createRequestExecutor, createTargetAuthenticationHandler, createTargetAuthenticationStrategy, createUserTokenHandler, determineParams, execute, execute, execute, execute, execute, execute, execute, execute, getAuthSchemes, getBackoffManager, getConnectionBackoffStrategy, getConnectionKeepAliveStrategy, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getProxyAuthenticationStrategy, getRedirectHandler, getRedirectStrategy, getRequestExecutor, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, getTargetAuthenticationStrategy, getUserTokenHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setBackoffManager, setConnectionBackoffStrategy, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setKeepAliveStrategy, setParams, setProxyAuthenticationHandler, setProxyAuthenticationStrategy, setRedirectHandler, setRedirectStrategy, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler, setTargetAuthenticationStrategy, setUserTokenHandlerprotected URI server+
protected String wsapiVersion+
protected org.apache.http.impl.client.DecompressingHttpClient client+
public void setProxy(URI proxy)+
proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")public void setProxy(URI proxy, + String userName, + String password)+
proxy - The proxy server, e.g. new URI("http://my.proxy.com:8000")userName - The username to be used for authentication.password - The password to be used for authentication.public void setApplicationVendor(String value)+
value - The vendor header to be included on all requests.public void setApplicationVersion(String value)+
value - The vendor header to be included on all requests.public void setApplicationName(String value)+
value - The vendor header to be included on all requests.public String getServer()+
public String getWsapiVersion()+
public void setWsapiVersion(String wsapiVersion)+
wsapiVersion - the new version, e.g. "1.30"protected String doRequest(org.apache.http.client.methods.HttpRequestBase request) + throws IOException+
request - the request to be executedIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestprotected String executeRequest(org.apache.http.client.methods.HttpRequestBase request) + throws IOException+
request - the request to be executedIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestpublic String doPost(String url, + String body) + throws IOException+
url - the request urlbody - the body of the postIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestpublic String doPut(String url, + String body) + throws IOException+
url - the request urlbody - the body of the putIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestpublic String doDelete(String url) + throws IOException+
url - the request urlIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestpublic String doGet(String url) + throws IOException+
url - the request urlIOException - if a non-200 response code is returned or if some other
+ problem occurs while executing the requestpublic void close() + throws IOException+
close in interface Closeableclose in interface AutoCloseableIOException - if an error occurs releasing resourcesprotected org.apache.http.auth.Credentials setClientCredentials(URI server, + String userName, + String password)+
public String getWsapiUrl()+
Copyright © 2016. All Rights Reserved.
+ + diff --git a/src/main/resources/doc/com/rallydev/rest/client/class-use/ApiKeyClient.html b/com/rallydev/rest/client/class-use/ApiKeyClient.html similarity index 66% rename from src/main/resources/doc/com/rallydev/rest/client/class-use/ApiKeyClient.html rename to com/rallydev/rest/client/class-use/ApiKeyClient.html index 0192075..cbf7e4e 100644 --- a/src/main/resources/doc/com/rallydev/rest/client/class-use/ApiKeyClient.html +++ b/com/rallydev/rest/client/class-use/ApiKeyClient.html @@ -2,15 +2,21 @@ - -Copyright © 2016. All Rights Reserved.
diff --git a/src/main/resources/doc/com/rallydev/rest/client/class-use/BasicAuthClient.html b/com/rallydev/rest/client/class-use/BasicAuthClient.html similarity index 66% rename from src/main/resources/doc/com/rallydev/rest/client/class-use/BasicAuthClient.html rename to com/rallydev/rest/client/class-use/BasicAuthClient.html index 02b4cf1..d710827 100644 --- a/src/main/resources/doc/com/rallydev/rest/client/class-use/BasicAuthClient.html +++ b/com/rallydev/rest/client/class-use/BasicAuthClient.html @@ -2,15 +2,21 @@ - -Copyright © 2016. All Rights Reserved.
diff --git a/src/main/resources/doc/com/rallydev/rest/client/class-use/HttpClient.html b/com/rallydev/rest/client/class-use/HttpClient.html similarity index 57% rename from src/main/resources/doc/com/rallydev/rest/client/class-use/HttpClient.html rename to com/rallydev/rest/client/class-use/HttpClient.html index 0601e0e..2c71a8d 100644 --- a/src/main/resources/doc/com/rallydev/rest/client/class-use/HttpClient.html +++ b/com/rallydev/rest/client/class-use/HttpClient.html @@ -2,15 +2,21 @@ - -