Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2015-04-02 17:56:17 +0000
committerslewis2015-04-02 17:56:17 +0000
commitd3b33769024adae25ccc391b3828fe321e91bee1 (patch)
tree71989c127a0a85372646bdc578bc8389e42fa131
parentbe60471ac903fec926f2259177b86cdd1130e77b (diff)
downloadorg.eclipse.ecf-d3b33769024adae25ccc391b3828fe321e91bee1.tar.gz
org.eclipse.ecf-d3b33769024adae25ccc391b3828fe321e91bee1.tar.xz
org.eclipse.ecf-d3b33769024adae25ccc391b3828fe321e91bee1.zip
Addition for enhancement
https://bugs.eclipse.org/bugs/show_bug.cgi?id=463837 Change-Id: I6b791b321b07bdd1ceb3f890e6c013044cfb43a3
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.rest/.project6
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/.api_filters179
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/org.eclipse.pde.api.tools.prefs98
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.rest/META-INF/MANIFEST.MF10
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/HttpPatchRequestType.java50
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java36
6 files changed, 374 insertions, 5 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.rest/.project b/framework/bundles/org.eclipse.ecf.remoteservice.rest/.project
index f6106ebfa..586f2d48c 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.rest/.project
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.rest/.project
@@ -25,9 +25,15 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/.api_filters b/framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/.api_filters
new file mode 100644
index 000000000..e1b2cb1f6
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/.api_filters
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.ecf.remoteservice.rest" version="2">
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.IRestCall">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.IRestCall"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.RestCall">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.RestCall"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.RestCallFactory">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.RestCallFactory"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.RestCallableFactory">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.RestCallableFactory"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.RestException">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.RestException"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractEntityRequestType">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractEntityRequestType"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractRequestType">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractRequestType"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractRestClientContainer">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractRestClientContainer"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractRestClientService">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.AbstractRestClientService"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.HttpDeleteRequestType">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.HttpDeleteRequestType"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.HttpPostRequestType">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.HttpPostRequestType"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.HttpPutRequestType">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.HttpPutRequestType"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.RestClientContainer">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.RestClientContainer"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.RestClientContainerInstantiator">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.RestClientContainerInstantiator"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.RestClientService">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.RestClientService"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.client.XMLRemoteResponseDeserializer">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.client.XMLRemoteResponseDeserializer"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.identity.RestID">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.identity.RestID"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.identity.RestNamespace">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.identity.RestNamespace"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.util.DSPresent">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.util.DSPresent"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.util.DSUtil">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.util.DSUtil"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="META-INF/MANIFEST.MF" type="bin.org.eclipse.ecf.remoteservice.rest.util.IDSPresent">
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="bin.org.eclipse.ecf.remoteservice.rest.util.IDSPresent"/>
+ <message_argument value="org.eclipse.ecf.remoteservice.rest_2.6.0"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/org.eclipse.pde.api.tools.prefs b/framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 000000000..c73d4243f
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.rest/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.rest/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.remoteservice.rest/META-INF/MANIFEST.MF
index 40ec1ab9a..0d2a7a6b9 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.rest/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.rest/META-INF/MANIFEST.MF
@@ -3,17 +3,17 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-Vendor: %plugin.provider
Bundle-SymbolicName: org.eclipse.ecf.remoteservice.rest;singleton:=true
-Bundle-Version: 2.5.0.qualifier
+Bundle-Version: 2.6.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.remoteservice.rest.Activator
Bundle-ActivationPolicy: lazy
Eclipse-BuddyPolicy: global
DynamicImport-Package: *
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Export-Package: org.eclipse.ecf.internal.remoteservice.rest;x-internal:=true,
- org.eclipse.ecf.remoteservice.rest;version="2.2.200",
- org.eclipse.ecf.remoteservice.rest.client;version="2.2.300",
- org.eclipse.ecf.remoteservice.rest.identity;version="2.2.200",
- org.eclipse.ecf.remoteservice.rest.util;version="2.2.200"
+ org.eclipse.ecf.remoteservice.rest;version="2.5",
+ org.eclipse.ecf.remoteservice.rest.client;version="2.6",
+ org.eclipse.ecf.remoteservice.rest.identity;version="2.5",
+ org.eclipse.ecf.remoteservice.rest.util;version="2.5"
Import-Package: org.apache.http;version="4.3",
org.apache.http.auth;version="4.3",
org.apache.http.client;version="4.3",
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/HttpPatchRequestType.java b/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/HttpPatchRequestType.java
new file mode 100644
index 000000000..ecd267232
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/HttpPatchRequestType.java
@@ -0,0 +1,50 @@
+package org.eclipse.ecf.remoteservice.rest.client;
+
+import java.util.Map;
+
+/**
+ * @since 2.6
+ */
+public class HttpPatchRequestType extends HttpPostRequestType {
+
+ public HttpPatchRequestType() {
+ super();
+ }
+
+ public HttpPatchRequestType(int requestEntityType, Map defaultRequestHeaders) {
+ super(requestEntityType, defaultRequestHeaders);
+ }
+
+ public HttpPatchRequestType(int requestEntityType, String defaultContentType, long defaultContentLength, Map defaultRequestHeaders) {
+ super(requestEntityType, defaultContentType, defaultContentLength, defaultRequestHeaders);
+ }
+
+ public HttpPatchRequestType(int requestEntityType, String defaultContentType, long defaultContentLength, String defaultCharset, Map defaultRequestHeaders) {
+ super(requestEntityType, defaultContentType, defaultContentLength, defaultCharset, defaultRequestHeaders);
+ }
+
+ public HttpPatchRequestType(int requestEntityType, String defaultContentType, long defaultContentLength, String defaultCharset) {
+ super(requestEntityType, defaultContentType, defaultContentLength, defaultCharset);
+ }
+
+ public HttpPatchRequestType(int requestEntityType, String defaultContentType, long defaultContentLength) {
+ super(requestEntityType, defaultContentType, defaultContentLength);
+ }
+
+ public HttpPatchRequestType(int requestEntityType, String defaultContentType, Map defaultRequestHeaders) {
+ super(requestEntityType, defaultContentType, defaultRequestHeaders);
+ }
+
+ public HttpPatchRequestType(int requestEntityType, String defaultContentType) {
+ super(requestEntityType, defaultContentType);
+ }
+
+ public HttpPatchRequestType(int requestEntityType) {
+ super(requestEntityType);
+ }
+
+ public HttpPatchRequestType(Map defaultRequestHeaders) {
+ super(defaultRequestHeaders);
+ }
+
+}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java b/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java
index 282e29d7e..f55ddf625 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java
@@ -81,6 +81,13 @@ public class RestClientService extends AbstractRestClientService {
return new HttpDelete(uri);
}
+ /**
+ * @since 2.6
+ */
+ protected HttpPatch createPatchMethod(String uri) {
+ return new HttpPatch(uri);
+ }
+
protected HttpRequestBase createAndPrepareHttpMethod(UriRequest request) {
HttpRequestBase httpMethod = null;
String uri = request.getUri();
@@ -88,6 +95,8 @@ public class RestClientService extends AbstractRestClientService {
IRemoteCallableRequestType requestType = (callable == null) ? new HttpGetRequestType() : callable.getRequestType();
if (requestType instanceof HttpGetRequestType)
httpMethod = createGetMethod(uri);
+ else if (requestType instanceof HttpPatchRequestType)
+ httpMethod = createPatchMethod(uri);
else if (requestType instanceof HttpPostRequestType)
httpMethod = createPostMethod(uri);
else if (requestType instanceof HttpPutRequestType)
@@ -211,6 +220,8 @@ public class RestClientService extends AbstractRestClientService {
try {
if (requestType instanceof HttpGetRequestType) {
httpMethod = prepareGetMethod(uri, call, callable);
+ } else if (requestType instanceof HttpPatchRequestType) {
+ httpMethod = preparePatchMethod(uri, call, callable);
} else if (requestType instanceof HttpPostRequestType) {
httpMethod = preparePostMethod(uri, call, callable);
} else if (requestType instanceof HttpPutRequestType) {
@@ -300,6 +311,31 @@ public class RestClientService extends AbstractRestClientService {
/**
* @throws UnsupportedEncodingException
* @throws ECFException
+ * @since 2.6
+ */
+ protected HttpRequestBase preparePatchMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException, UnsupportedEncodingException {
+ HttpPatch result = new HttpPatch(uri);
+ HttpPostRequestType postRequestType = (HttpPostRequestType) callable.getRequestType();
+
+ IRemoteCallParameter[] defaultParameters = callable.getDefaultParameters();
+ Object[] parameters = call.getParameters();
+ if (postRequestType.useRequestEntity()) {
+ if (defaultParameters != null && defaultParameters.length > 0 && parameters != null && parameters.length > 0) {
+ HttpEntity requestEntity = postRequestType.generateRequestEntity(uri, call, callable, defaultParameters[0], parameters[0]);
+ result.setEntity(requestEntity);
+ }
+ } else {
+ NameValuePair[] params = toNameValuePairs(uri, call, callable);
+ if (params != null) {
+ result.setEntity(getUrlEncodedFormEntity(Arrays.asList(params), postRequestType));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @throws UnsupportedEncodingException
+ * @throws ECFException
*/
protected HttpRequestBase preparePostMethod(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException, UnsupportedEncodingException {
HttpPost result = new HttpPost(uri);

Back to the top