mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
126454 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 122166 gjames: Changed the method name because Jan didn't like it. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126799 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -91,7 +91,7 @@ public class NetworkWebScriptGet extends ApiWebScript
|
||||
{
|
||||
// TODO this is not ideal, but the only way to populate the embedded network entities (this would normally be
|
||||
// done automatically by the api framework).
|
||||
Object wrapped = helper.postProcessResponse(Api.ALFRESCO_PUBLIC, NetworksEntityResource.NAME, Params.valueOf(personId, null), networkMembership);
|
||||
Object wrapped = helper.processAdditionsToTheResponse(Api.ALFRESCO_PUBLIC, NetworksEntityResource.NAME, Params.valueOf(personId, null), networkMembership);
|
||||
|
||||
objectMapper.writeValue(generator, wrapped);
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ public class NetworksWebScriptGet extends ApiWebScript
|
||||
{
|
||||
// TODO this is not ideal, but the only way to populate the embedded network entities (this would normally be
|
||||
// done automatically by the api framework).
|
||||
Object wrapped = helper.postProcessResponse(Api.ALFRESCO_PUBLIC, NetworksEntityResource.NAME, Params.valueOf(personId, null), networkMember);
|
||||
Object wrapped = helper.processAdditionsToTheResponse(Api.ALFRESCO_PUBLIC, NetworksEntityResource.NAME, Params.valueOf(personId, null), networkMember);
|
||||
entities.add(wrapped);
|
||||
}
|
||||
|
||||
|
@@ -231,7 +231,7 @@ public class ResourceWebScriptGet extends AbstractResourceWebScript implements P
|
||||
}
|
||||
else
|
||||
{
|
||||
executionCallback.onSuccess(helper.postProcessResponse(resource.getMetaData().getApi(), entityCollectionName, params, result), DEFAULT_JSON_CONTENT);
|
||||
executionCallback.onSuccess(helper.processAdditionsToTheResponse(resource.getMetaData().getApi(), entityCollectionName, params, result), DEFAULT_JSON_CONTENT);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@@ -478,7 +478,7 @@ public class ResourceWebScriptHelper
|
||||
* @param objectToWrap Object
|
||||
* @return Object - Either ExecutionResult or CollectionWithPagingInfo<ExecutionResult>
|
||||
*/
|
||||
public Object postProcessResponse(Api api, String entityCollectionName, Params params, Object objectToWrap)
|
||||
public Object processAdditionsToTheResponse(Api api, String entityCollectionName, Params params, Object objectToWrap)
|
||||
{
|
||||
PropertyCheck.mandatory(this, null, params);
|
||||
if (objectToWrap == null ) return null;
|
||||
@@ -490,7 +490,7 @@ public class ResourceWebScriptHelper
|
||||
Collection<Object> resultCollection = new ArrayList(collectionToWrap.getCollection().size());
|
||||
for (Object obj : collectionToWrap.getCollection())
|
||||
{
|
||||
resultCollection.add(postProcessResponse(api,entityCollectionName,params,obj));
|
||||
resultCollection.add(processAdditionsToTheResponse(api,entityCollectionName,params,obj));
|
||||
}
|
||||
return CollectionWithPagingInfo.asPaged(collectionToWrap.getPaging(), resultCollection, collectionToWrap.hasMoreItems(), collectionToWrap.getTotalItems());
|
||||
}
|
||||
|
@@ -293,7 +293,7 @@ public class ResourceWebScriptPost extends AbstractResourceWebScript implements
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
Object result = executeInternal(resource, params);
|
||||
executionCallback.onSuccess(helper.postProcessResponse(resource.getMetaData().getApi(), entityCollectionName, params, result), DEFAULT_JSON_CONTENT);
|
||||
executionCallback.onSuccess(helper.processAdditionsToTheResponse(resource.getMetaData().getApi(), entityCollectionName, params, result), DEFAULT_JSON_CONTENT);
|
||||
return null;
|
||||
}
|
||||
}, false, true);
|
||||
|
@@ -214,7 +214,7 @@ public class ResourceWebScriptPut extends AbstractResourceWebScript implements P
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
Object result = executeInternal(resource, params);
|
||||
executionCallback.onSuccess(helper.postProcessResponse(resource.getMetaData().getApi(), entityCollectionName, params, result), DEFAULT_JSON_CONTENT);
|
||||
executionCallback.onSuccess(helper.processAdditionsToTheResponse(resource.getMetaData().getApi(), entityCollectionName, params, result), DEFAULT_JSON_CONTENT);
|
||||
return null;
|
||||
}
|
||||
}, false, true);
|
||||
|
Reference in New Issue
Block a user