Report Validation
This commit is contained in:
parent
31b7d28572
commit
089341c375
|
@ -29,11 +29,14 @@ public class DocumentHandlingReport<T extends BaseExecutionRequest> extends Repo
|
|||
}
|
||||
if(toSetLifecycleInformation != null){
|
||||
log.trace("Merging lifecycleInformation");
|
||||
Document original = Serialization.asDocument(toReturn.getLifecycleInformation());
|
||||
Document toSet = Serialization.asDocument(toSetLifecycleInformation);
|
||||
toSet.putAll(original);
|
||||
toReturn.setLifecycleInformation(Serialization.convert(toSet,LifecycleInformation.class));
|
||||
// Document original = Serialization.asDocument(toReturn.getLifecycleInformation());
|
||||
// Document toSet = Serialization.asDocument(toSetLifecycleInformation);
|
||||
// toSet.putAll(original);
|
||||
// toReturn.setLifecycleInformation(Serialization.convert(toSet,LifecycleInformation.class));
|
||||
toReturn.setLifecycleInformation(toSetLifecycleInformation);
|
||||
}
|
||||
|
||||
// Force Report status into info
|
||||
log.trace("Report status is {} ",getStatus());
|
||||
LifecycleInformation info = toReturn.getLifecycleInformation();
|
||||
switch (getStatus()){
|
||||
|
@ -48,6 +51,9 @@ public class DocumentHandlingReport<T extends BaseExecutionRequest> extends Repo
|
|||
break;
|
||||
}
|
||||
case OK: {
|
||||
if(info.getLastOperationStatus()==null)
|
||||
info.setLastOperationStatus(LifecycleInformation.Status.OK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return toReturn;
|
||||
|
|
|
@ -4,9 +4,13 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
|||
import lombok.Data;
|
||||
import org.gcube.application.cms.plugins.requests.EventExecutionRequest;
|
||||
import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
|
||||
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
|
||||
|
||||
@Data
|
||||
public class EventExecutionReport extends DocumentHandlingReport<EventExecutionRequest>{
|
||||
|
||||
@Override
|
||||
public void setToSetLifecycleInformation(LifecycleInformation toSetLifecycleInformation) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue