Materialization Status report
This commit is contained in:
parent
e32a540c8e
commit
13fdbffc80
|
@ -82,19 +82,30 @@ public class ConcessioniLifeCycleManager implements LifecycleManager {
|
||||||
matReq.setParameters(params);
|
matReq.setParameters(params);
|
||||||
MaterializationReport matRep = new SDIMaterializerPlugin().materialize(matReq);
|
MaterializationReport matRep = new SDIMaterializerPlugin().materialize(matReq);
|
||||||
|
|
||||||
if (!matRep.getStatus().equals(Report.Status.OK)) {
|
|
||||||
info.setLastOperationStatus(LifecycleInformation.Status.ERROR);
|
|
||||||
for(String msg : matRep.getMessages())
|
|
||||||
info.addErrorMessage(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
switch(matRep.getStatus()){
|
||||||
|
case OK : {
|
||||||
info.setPhase("Pending Approval");
|
info.setPhase("Pending Approval");
|
||||||
|
|
||||||
//TODO Index-confidential
|
//TODO Index-confidential
|
||||||
//TODO Notifications
|
//TODO Notifications
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ERROR : {
|
||||||
|
info.setLastOperationStatus(LifecycleInformation.Status.ERROR);
|
||||||
|
matRep.getMessages().forEach(s -> info.addErrorMessage(s));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WARNING : {
|
||||||
|
info.setLastOperationStatus(LifecycleInformation.Status.WARNING);
|
||||||
|
matRep.getMessages().forEach(s -> info.addWarningMessage(s));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "REJECT-DRAFT":{
|
case "REJECT-DRAFT":{
|
||||||
// Notification
|
// Notification
|
||||||
// Set
|
// Set
|
||||||
|
|
Loading…
Reference in New Issue