mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
126478 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 122543 gjames: RA-211: Moving around execution logic in preparation for more flexible respoonse handling git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126822 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import org.alfresco.rest.framework.core.ResourceWithMetadata;
|
||||
import org.alfresco.rest.framework.resource.content.ContentInfo;
|
||||
import org.alfresco.rest.framework.resource.parameters.Params;
|
||||
import org.springframework.extensions.webscripts.Status;
|
||||
import org.springframework.extensions.webscripts.WebScriptResponse;
|
||||
|
||||
/**
|
||||
* Executes an action in the system
|
||||
@@ -40,22 +41,12 @@ public interface ActionExecutor extends HttpMethodSupport
|
||||
{
|
||||
|
||||
/**
|
||||
* Invokes the resource with the Params calling the callback onSuccess
|
||||
* Invokes the resource with the Params
|
||||
* @param resource ResourceWithMetadata
|
||||
* @param params Params
|
||||
* @param executionCallback ExecutionCallback
|
||||
* @param boolean should we use a readonly transaction.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void execute(ResourceWithMetadata resource, Params params, ExecutionCallback executionCallback);
|
||||
|
||||
/**
|
||||
* The result of an Action execution.
|
||||
*
|
||||
* @author Gethin James
|
||||
*/
|
||||
public interface ExecutionCallback<R>
|
||||
{
|
||||
public void onSuccess(R result, ContentInfo contentInfo, int statusCode);
|
||||
}
|
||||
|
||||
public Object execute(ResourceWithMetadata resource, Params params, WebScriptResponse res, boolean isReadOnly);
|
||||
|
||||
}
|
||||
|
@@ -30,6 +30,8 @@ import java.util.List;
|
||||
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
|
||||
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||
import org.springframework.extensions.webscripts.Cache;
|
||||
import org.springframework.extensions.webscripts.Status;
|
||||
|
||||
/**
|
||||
* Permissible actions for an Entity Resource
|
||||
@@ -70,7 +72,9 @@ public interface EntityResourceAction
|
||||
*/
|
||||
public static interface ReadById<E> extends ResourceAction
|
||||
{
|
||||
public E readById (String id, Parameters parameters) throws EntityNotFoundException;
|
||||
public E readById (String id, Parameters parameters) throws EntityNotFoundException;
|
||||
// public E readById (String id, Parameters parameters, Status status, Cache cache) throws EntityNotFoundException;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user