mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged DEV/CMIS0_61 to HEAD (part 3)
14069 Introduce CMIS v0.61 XSDs - fix samples that don't validate 14073 CMISTests passing, complying with 0.61 XSDs. 14078 CMIS v0.61 data model and AtomPub binding API compliance. - delta from 0.6 recorded in changes_v0.6_to_v0.61.txt - updated CMIS test harness - tests pass - added Patch request type to Web Script test server 14079 Allow for HTTP PATCH method for remote Web Script tests. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14176 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -48,6 +48,7 @@ import org.apache.commons.httpclient.UsernamePasswordCredentials;
|
||||
import org.apache.commons.httpclient.auth.AuthScope;
|
||||
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
|
||||
import org.apache.commons.httpclient.methods.DeleteMethod;
|
||||
import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.methods.PutMethod;
|
||||
@@ -392,6 +393,12 @@ public abstract class BaseWebScriptTest extends TestCase
|
||||
post.setRequestEntity(new ByteArrayRequestEntity(req.getBody(), req.getType()));
|
||||
httpMethod = post;
|
||||
}
|
||||
else if (method.equalsIgnoreCase("PATCH"))
|
||||
{
|
||||
PatchMethod post = new PatchMethod(req.getFullUri());
|
||||
post.setRequestEntity(new ByteArrayRequestEntity(req.getBody(), req.getType()));
|
||||
httpMethod = post;
|
||||
}
|
||||
else if (method.equalsIgnoreCase("PUT"))
|
||||
{
|
||||
PutMethod put = new PutMethod(req.getFullUri());
|
||||
@@ -420,6 +427,23 @@ public abstract class BaseWebScriptTest extends TestCase
|
||||
return new HttpMethodResponse(httpMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* PATCH method
|
||||
*/
|
||||
public static class PatchMethod extends EntityEnclosingMethod
|
||||
{
|
||||
public PatchMethod(String uri)
|
||||
{
|
||||
super(uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return "PATCH";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remote Context
|
||||
|
Reference in New Issue
Block a user