Back contributions from integrations
(MGNLDAM-549)
|
|
| Status: | Closed |
| Project: | Magnolia DAM Module |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.1 |
| Type: | Sub-task | Priority: | Neutral |
| Reporter: | Robert Šiška | Assignee: | Robert Šiška |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | api | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||
| Description |
|
Add ability to specify sorting in query. Rationale: Decoupling UI and JCR yields the need for abstract query statements directed to AssetProviders. AssetQuery fulfills this role, but it lacks sorting ability. |
| Comments |
| Comment by Magnolia International [ 20/Mar/15 ] |
|
Similarly to Similarly, I'd rather use an enum for asc/desc rather than a boolean. A couple more remarks:
And as an example, using the suggested enum; to be completed, documented, validated, etc.. : https://gist.github.com/gjoseph/811015992ed488a18edd |
| Comment by Magnolia International [ 20/Mar/15 ] |
|
Also keep the following in mind:
|
| Comment by Robert Šiška [ 27/Mar/15 ] |
|
I know that the enum would be a bit nicer, but I think that limiting the sort to some set of properties just won't cut it. Note that the need for these changes arose from the real life integrations, not just out of my whim. Out of three recent integrations (wcs,cumulus,konakart), all use offset/maxResults pagination & ordering by the name of the property + asc/desc. Some of them expect to be able to sort queries by properties like price or ratings. So we either leave it as String, which is ugly & loosely defined or we need to rethink the idea of "asset property" altogether. How about sorting by metadata properties? We still need to redo metadata anyway... |
| Comment by Robert Šiška [ 12/Jun/15 ] |
|
OrderBy now takes the metadata class as argument. Commited in: |