mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
122636 gjames: RA-211: Adding the ResponseCallBack to the Multipart actions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126490 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
package org.alfresco.rest.framework.resource.actions.interfaces;
|
||||
|
||||
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||
import org.alfresco.rest.framework.webscripts.ResponseCallBack;
|
||||
import org.springframework.extensions.webscripts.servlet.FormData;
|
||||
|
||||
/**
|
||||
@@ -33,6 +34,6 @@ public interface MultiPartRelationshipResourceAction
|
||||
*/
|
||||
public static interface Create<E> extends ResourceAction
|
||||
{
|
||||
public E create(String entityResourceId, FormData formData, Parameters parameters);
|
||||
public E create(String entityResourceId, FormData formData, Parameters parameters, ResponseCallBack withResponse);
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@
|
||||
package org.alfresco.rest.framework.resource.actions.interfaces;
|
||||
|
||||
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||
import org.alfresco.rest.framework.webscripts.ResponseCallBack;
|
||||
import org.springframework.extensions.webscripts.servlet.FormData;
|
||||
|
||||
/**
|
||||
@@ -33,6 +34,6 @@ public interface MultiPartResourceAction
|
||||
*/
|
||||
public static interface Create<E> extends ResourceAction
|
||||
{
|
||||
public E create(FormData formData, Parameters parameters);
|
||||
public E create(FormData formData, Parameters parameters, ResponseCallBack withResponse);
|
||||
}
|
||||
}
|
||||
|
@@ -130,7 +130,7 @@ public abstract class ApiWebScript extends AbstractWebScript
|
||||
return true;
|
||||
}
|
||||
});
|
||||
final static ContentInfo DEFAULT_JSON_CONTENT = new ContentInfoImpl(Format.JSON.mimetype(),UTF8, 0, null);
|
||||
public final static ContentInfo DEFAULT_JSON_CONTENT = new ContentInfoImpl(Format.JSON.mimetype(),UTF8, 0, null);
|
||||
|
||||
@Override
|
||||
public void execute(final WebScriptRequest req, final WebScriptResponse res) throws IOException
|
||||
|
@@ -226,7 +226,7 @@ public class ResourceWebScriptPost extends AbstractResourceWebScript implements
|
||||
if (resObj instanceof MultiPartResourceAction.Create<?> && params.getPassedIn() instanceof FormData)
|
||||
{
|
||||
MultiPartResourceAction.Create<Object> creator = (MultiPartResourceAction.Create<Object>) resObj;
|
||||
return creator.create((FormData) params.getPassedIn(), params);
|
||||
return creator.create((FormData) params.getPassedIn(), params, withResponse);
|
||||
|
||||
}
|
||||
else
|
||||
@@ -253,7 +253,7 @@ public class ResourceWebScriptPost extends AbstractResourceWebScript implements
|
||||
if (resObj instanceof MultiPartRelationshipResourceAction.Create<?> && params.getPassedIn() instanceof FormData)
|
||||
{
|
||||
MultiPartRelationshipResourceAction.Create<Object> creator = (MultiPartRelationshipResourceAction.Create<Object>) resObj;
|
||||
return creator.create(params.getEntityId(), (FormData) params.getPassedIn(), params);
|
||||
return creator.create(params.getEntityId(), (FormData) params.getPassedIn(), params, withResponse);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user