Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

122418 gjames: RA-827 Supporting custom status codes


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126473 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 11:05:56 +00:00
parent 84947ba6de
commit c03efd351c
19 changed files with 239 additions and 211 deletions

View File

@@ -4,6 +4,7 @@ import org.alfresco.rest.framework.core.HttpMethodSupport;
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;
/**
* Executes an action in the system
@@ -29,7 +30,7 @@ public interface ActionExecutor extends HttpMethodSupport
*/
public interface ExecutionCallback<R>
{
public void onSuccess(R result, ContentInfo contentInfo);
public void onSuccess(R result, ContentInfo contentInfo, int statusCode);
}
}

View File

@@ -92,11 +92,4 @@ public interface Parameters
* @return BasicContentInfo the content info
*/
BasicContentInfo getContentInfo();
/**
* Gets Web Script status
*
* @return {@link Status}
*/
public Status getStatus();
}

View File

@@ -30,7 +30,6 @@ public class Params implements Parameters
private final RecognizedParams recognizedParams;
private final String addressedProperty;
private final BasicContentInfo contentInfo;
private final Status status;
//Constants
private static final RecognizedParams NULL_PARAMS = new RecognizedParams(null, null, null, null, null, null, null, false);
@@ -46,7 +45,6 @@ public class Params implements Parameters
this.recognizedParams = recognizedParams;
this.addressedProperty = addressedProperty;
this.contentInfo = contentInfo==null?DEFAULT_CONTENT_INFO:contentInfo;
this.status = new Status();
}
public static Params valueOf(BeanPropertiesFilter paramFilter, String entityId)
@@ -216,12 +214,6 @@ public class Params implements Parameters
return contentInfo;
}
@Override
public Status getStatus()
{
return status;
}
/**
* A formal set of params that any rest service could potentially have passed in as request params
*/