Implementing feature

This commit is contained in:
Luca Frosini 2021-05-11 11:43:24 +02:00
parent bf637e439f
commit e00b2010d1
1 changed files with 25 additions and 0 deletions

View File

@ -337,6 +337,11 @@ public class CKANPackage extends CKAN {
parameters.put(GCatConstants.Q_KEY, filter); parameters.put(GCatConstants.Q_KEY, filter);
} }
if(ckanInstance.isModerationEnabled()) {
// TODO
}
return list(parameters); return list(parameters);
} }
@ -526,6 +531,10 @@ public class CKANPackage extends CKAN {
@Override @Override
public String read() { public String read() {
try { try {
if(ckanInstance.isModerationEnabled()) {
// TODO
}
String ret = super.read(); String ret = super.read();
result = mapper.readTree(ret); result = mapper.readTree(ret);
result = cleanResult(result); result = cleanResult(result);
@ -544,6 +553,11 @@ public class CKANPackage extends CKAN {
try { try {
logger.debug("Going to create Item {}", json); logger.debug("Going to create Item {}", json);
if(ckanInstance.isModerationEnabled()) {
// TODO
}
JsonNode jsonNode = validateJson(json); JsonNode jsonNode = validateJson(json);
ArrayNode resourcesToBeCreated = mapper.createArrayNode(); ArrayNode resourcesToBeCreated = mapper.createArrayNode();
@ -589,6 +603,10 @@ public class CKANPackage extends CKAN {
@Override @Override
public String update(String json) { public String update(String json) {
try { try {
if(ckanInstance.isModerationEnabled()) {
// TODO
}
JsonNode jsonNode = validateJson(json); JsonNode jsonNode = validateJson(json);
read(); read();
@ -662,6 +680,10 @@ public class CKANPackage extends CKAN {
@Override @Override
public String patch(String json) { public String patch(String json) {
try { try {
if(ckanInstance.isModerationEnabled()) {
// TODO
}
JsonNode jsonNode = checkBaseInformation(json, true); JsonNode jsonNode = checkBaseInformation(json, true);
read(); read();
@ -736,6 +758,9 @@ public class CKANPackage extends CKAN {
@Override @Override
protected void delete() { protected void delete() {
if(ckanInstance.isModerationEnabled()) {
// TODO
}
super.delete(); super.delete();
} }