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

122165 gjames: RA-823 Adding an interface


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126453 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 10:57:42 +00:00
parent 3b6cad99e6
commit 9446c8938a
3 changed files with 50 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ package org.alfresco.rest.framework.jacksonextensions;
import java.io.IOException;
import org.alfresco.rest.framework.resource.SerializablePagedCollection;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper;
import org.codehaus.jackson.JsonGenerationException;
@@ -11,21 +12,21 @@ import org.codehaus.jackson.map.SerializerProvider;
import org.codehaus.jackson.map.ser.std.SerializerBase;
/**
* Serializes CollectionWithPagingInfo into the correct response format, with Paging information and entries//
* Serializes SerializablePagedCollection into the correct response format, with Paging information and entries
*
* @author Gethin James
*/
@SuppressWarnings("rawtypes")
public class SerializerOfCollectionWithPaging extends SerializerBase<CollectionWithPagingInfo>
public class SerializerOfCollectionWithPaging extends SerializerBase<SerializablePagedCollection>
{
protected SerializerOfCollectionWithPaging()
{
super(CollectionWithPagingInfo.class);
super(SerializablePagedCollection.class);
}
@Override
public void serialize(CollectionWithPagingInfo pagedCol, JsonGenerator jgen, SerializerProvider provider)
public void serialize(SerializablePagedCollection pagedCol, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonGenerationException
{
if (pagedCol != null)
@@ -40,7 +41,7 @@ public class SerializerOfCollectionWithPaging extends SerializerBase<CollectionW
}
}
private void serializePagination(CollectionWithPagingInfo pagedCol, JsonGenerator jgen) throws IOException,
private void serializePagination(SerializablePagedCollection pagedCol, JsonGenerator jgen) throws IOException,
JsonProcessingException
{
jgen.writeFieldName("pagination");