Check on get Mandatory
This commit is contained in:
parent
a0ffa08813
commit
521b5c90a6
|
@ -137,8 +137,9 @@ public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements
|
||||||
@Override
|
@Override
|
||||||
protected EventExecutionReport onDeleteDocument(EventExecutionReport report) throws ConfigurationException, InvalidPluginRequestException, MaterializationException, EventException {
|
protected EventExecutionReport onDeleteDocument(EventExecutionReport report) throws ConfigurationException, InvalidPluginRequestException, MaterializationException, EventException {
|
||||||
// Block non draft only if not force
|
// Block non draft only if not force
|
||||||
if(!Boolean.parseBoolean(report.getTheRequest().getWithDefault("force","false")))
|
Boolean force=Boolean.parseBoolean(report.getTheRequest().getWithDefault("force","false"));
|
||||||
blockNonDraft(report);
|
log.debug("ON DELETE for {} : force is {}",report.getTheRequest().getDocument().getId(),force);
|
||||||
|
if(!force) blockNonDraft(report);
|
||||||
// dematerialize all
|
// dematerialize all
|
||||||
JSONPathWrapper wrapper = new JSONPathWrapper(report.getTheRequest().getDocument().getTheDocument().toJson());
|
JSONPathWrapper wrapper = new JSONPathWrapper(report.getTheRequest().getDocument().getTheDocument().toJson());
|
||||||
for (String s : wrapper.getMatchingPaths("$..[?(@." + RegisteredFileSet.PAYLOADS + ")]")){
|
for (String s : wrapper.getMatchingPaths("$..[?(@." + RegisteredFileSet.PAYLOADS + ")]")){
|
||||||
|
|
Loading…
Reference in New Issue