Using renamed constant from gcat-api
This commit is contained in:
parent
7f3bbdd1ca
commit
0d194a28a3
|
@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
## [v2.4.0-SNAPSHOT]
|
||||
|
||||
- Added moderation link in moderation message [#23142]
|
||||
- Added query parameter in item listing to get the whole item instead of just the name [#23691]
|
||||
- Using renamed constant from gcat-api
|
||||
|
||||
|
||||
## [v2.3.0]
|
||||
|
|
|
@ -45,9 +45,9 @@ public class Group extends REST<CKANGroup> implements org.gcube.gcat.api.interfa
|
|||
@GET
|
||||
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
// @AuthorizationControl(allowedRoles={Role.CATALOGUE_EDITOR, Role.CATALOGUE_ADMIN, Role.CATALOGUE_MANAGER}, exception=NotAuthorizedException.class)
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_PARAMETER) @DefaultValue("0") int offset,
|
||||
@QueryParam(GCatConstants.COUNT_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_QUERY_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_QUERY_PARAMETER) @DefaultValue("0") int offset,
|
||||
@QueryParam(GCatConstants.COUNT_QUERY_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
if(countOnly) {
|
||||
int count = count();
|
||||
return createCountJson(count);
|
||||
|
@ -60,8 +60,8 @@ public class Group extends REST<CKANGroup> implements org.gcube.gcat.api.interfa
|
|||
* Not used as REST method, implemented to respect {@link org.gcube.gcat.api.interfaces.Item} interface
|
||||
*/
|
||||
@Override
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_PARAMETER) @DefaultValue("0") int offset) {
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_QUERY_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_QUERY_PARAMETER) @DefaultValue("0") int offset) {
|
||||
return super.list(limit, offset);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,9 @@ public class Item extends REST<CKANPackage> implements org.gcube.gcat.api.interf
|
|||
/* Catalogue-Member is not added to VRE members and is assumed as the default role in the catalogue for the VRE members. So we can't enforce
|
||||
* @AuthorizationControl(allowedRoles={Role.CATALOGUE_MEMBER, Role.CATALOGUE_EDITOR, Role.CATALOGUE_ADMIN, Role.CATALOGUE_MANAGER}, exception=NotAuthorizedException.class)
|
||||
*/
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_PARAMETER) @DefaultValue("0") int offset,
|
||||
@QueryParam(GCatConstants.COUNT_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_QUERY_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_QUERY_PARAMETER) @DefaultValue("0") int offset,
|
||||
@QueryParam(GCatConstants.COUNT_QUERY_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
if(countOnly) {
|
||||
CKANPackage ckan = getInstance();
|
||||
int count = ckan.count();
|
||||
|
@ -63,8 +63,8 @@ public class Item extends REST<CKANPackage> implements org.gcube.gcat.api.interf
|
|||
* Not used as REST method, implemented to respect {@link org.gcube.gcat.api.interfaces.Item} interface
|
||||
*/
|
||||
@Override
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_PARAMETER) @DefaultValue("0") int offset) {
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_QUERY_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_QUERY_PARAMETER) @DefaultValue("0") int offset) {
|
||||
return super.list(limit, offset);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ public class Organization extends REST<CKANOrganization>
|
|||
@GET
|
||||
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
// @AuthorizationControl(allowedRoles={Role.CATALOGUE_EDITOR, Role.CATALOGUE_ADMIN, Role.CATALOGUE_MANAGER}, exception=NotAuthorizedException.class)
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_PARAMETER) @DefaultValue("0") int offset,
|
||||
@QueryParam(GCatConstants.COUNT_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_QUERY_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_QUERY_PARAMETER) @DefaultValue("0") int offset,
|
||||
@QueryParam(GCatConstants.COUNT_QUERY_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
if(countOnly) {
|
||||
int count = count();
|
||||
return createCountJson(count);
|
||||
|
@ -61,8 +61,8 @@ public class Organization extends REST<CKANOrganization>
|
|||
* Not used as REST method, implemented to respect {@link org.gcube.gcat.api.interfaces.Item} interface
|
||||
*/
|
||||
@Override
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_PARAMETER) @DefaultValue("0") int offset) {
|
||||
public String list(@QueryParam(GCatConstants.LIMIT_QUERY_PARAMETER) @DefaultValue("10") int limit,
|
||||
@QueryParam(GCatConstants.OFFSET_QUERY_PARAMETER) @DefaultValue("0") int offset) {
|
||||
return super.list(limit, offset);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class Profile extends BaseREST implements org.gcube.gcat.api.interfaces.P
|
|||
|
||||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listOrCount(@QueryParam(GCatConstants.COUNT_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
public String listOrCount(@QueryParam(GCatConstants.COUNT_QUERY_PARAMETER) @DefaultValue("false") Boolean countOnly) {
|
||||
setCalledMethod("GET /" + PROFILES);
|
||||
try {
|
||||
ISProfile isProfile = new ISProfile();
|
||||
|
|
Loading…
Reference in New Issue