mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Added orderBy param for PUBLICAPI-33, needed for the workflow rest api.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54571 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -44,6 +44,13 @@ public interface Parameters
|
||||
*/
|
||||
public Paging getPaging();
|
||||
|
||||
/**
|
||||
* Returns a List of {@link SortColumn} for sorting properties.
|
||||
* Specified by the "orderBy" request parameter.
|
||||
* @return List of {@link SortColumn}
|
||||
*/
|
||||
public List<SortColumn> getSorting();
|
||||
|
||||
/**
|
||||
* Returns a {@link BeanPropertiesFilter} for filtering out properties.
|
||||
* Specified by the "properties" request parameter.
|
||||
|
@@ -177,6 +177,12 @@ public class Params implements Parameters
|
||||
return (addressedProperty != null && addressedProperty.equals(propertyName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SortColumn> getSorting()
|
||||
{
|
||||
return recognizedParams.sorting;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBinaryProperty()
|
||||
{
|
||||
@@ -207,6 +213,7 @@ public class Params implements Parameters
|
||||
private final List<String> select;
|
||||
private final List<SortColumn> sorting;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public RecognizedParams(Map<String, String[]> requestParameters, Paging paging, BeanPropertiesFilter filter, Map<String, BeanPropertiesFilter> relationshipFilter, List<String> select,
|
||||
Query query, List<SortColumn> sorting)
|
||||
{
|
||||
|
@@ -70,10 +70,10 @@ public class ResourceWebScriptHelper
|
||||
public static final String PARAM_FILTER_PROPS = "properties";
|
||||
public static final String PARAM_PAGING_SKIP = "skipCount";
|
||||
public static final String PARAM_PAGING_MAX = "maxItems";
|
||||
public static final String PARAM_SORT = "sort";
|
||||
public static final String PARAM_ORDERBY = "orderBy";
|
||||
public static final String PARAM_WHERE = "where";
|
||||
public static final String PARAM_SELECT = "select";
|
||||
public static final List<String> KNOWN_PARAMS = Arrays.asList(PARAM_RELATIONS,PARAM_FILTER_PROPS,PARAM_PAGING_SKIP,PARAM_PAGING_MAX, PARAM_SORT, PARAM_WHERE, PARAM_SELECT);
|
||||
public static final List<String> KNOWN_PARAMS = Arrays.asList(PARAM_RELATIONS,PARAM_FILTER_PROPS,PARAM_PAGING_SKIP,PARAM_PAGING_MAX, PARAM_ORDERBY, PARAM_WHERE, PARAM_SELECT);
|
||||
|
||||
private ResourceLocator locator;
|
||||
|
||||
@@ -605,7 +605,7 @@ public class ResourceWebScriptHelper
|
||||
public static RecognizedParams getRecognizedParams(WebScriptRequest req)
|
||||
{
|
||||
Paging paging = findPaging(req);
|
||||
List<SortColumn> sorting = getSort(req.getParameter(ResourceWebScriptHelper.PARAM_SORT));
|
||||
List<SortColumn> sorting = getSort(req.getParameter(ResourceWebScriptHelper.PARAM_ORDERBY));
|
||||
Map<String, BeanPropertiesFilter> relationFilter = getRelationFilter(req.getParameter(ResourceWebScriptHelper.PARAM_RELATIONS));
|
||||
BeanPropertiesFilter filter = getFilter(req.getParameter(ResourceWebScriptHelper.PARAM_FILTER_PROPS));
|
||||
Query whereQuery = getWhereClause(req.getParameter(ResourceWebScriptHelper.PARAM_WHERE));
|
||||
|
Reference in New Issue
Block a user