added ItemStatus.PUBLISHED
This commit is contained in:
parent
35dd97843b
commit
69a12e17e2
|
@ -207,9 +207,14 @@ public class DataCatalogueCMSImpl implements CatalogueContentModeratorSystem {
|
|||
checkNotNull(theStatus);
|
||||
// TODO MUST BE CHANGED FOR THE STATUS
|
||||
org.json.simple.JSONArray jsonArray = null;
|
||||
|
||||
CMItemStatus cmiStatus = toCMStatus(theStatus);
|
||||
String datasetNames = gCatCaller.getListItemsForCMStatus(cmiStatus, limit, offset);
|
||||
|
||||
String datasetNames = null;
|
||||
if(theStatus.equals(ItemStatus.PUBLISHED)) {
|
||||
datasetNames = gCatCaller.getListItems(limit, offset);
|
||||
}else {
|
||||
CMItemStatus cmiStatus = toCMStatus(theStatus);
|
||||
datasetNames = gCatCaller.getListItemsForCMStatus(cmiStatus, limit, offset);
|
||||
}
|
||||
if (datasetNames != null) {
|
||||
LOG.debug("for status " + theStatus + " found dataset: " + datasetNames);
|
||||
JSONParser parser = new JSONParser();
|
||||
|
|
|
@ -5,10 +5,13 @@ package org.gcube.datacatalogue.utillibrary.shared;
|
|||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* May 7, 2021
|
||||
* Feb 17, 2022
|
||||
*/
|
||||
public enum ItemStatus {
|
||||
PENDING("pending", "Pending"), APPROVED("approved", "Approved"), REJECTED("rejected", "Rejected");
|
||||
PENDING("pending", "Pending"), APPROVED("approved", "Approved"), REJECTED("rejected", "Rejected"),
|
||||
// Published means that the item is published in the Catalogue, no status is checked,
|
||||
// the "simple" get list of items is called
|
||||
PUBLISHED("published", "Published");
|
||||
|
||||
private String id;
|
||||
private String label;
|
||||
|
@ -16,7 +19,7 @@ public enum ItemStatus {
|
|||
/**
|
||||
* Instantiates a new item status.
|
||||
*
|
||||
* @param id the id
|
||||
* @param id the id
|
||||
* @param label the label
|
||||
*/
|
||||
private ItemStatus(String id, String label) {
|
||||
|
|
Loading…
Reference in New Issue