@Test(expected = ProcessingException.class) public void givenObjectUnitConsistencyWithEmptyHandlerIOThrowsException() throws ProcessingException { final HandlerIO action = new HandlerIOImpl(workspaceClientFactory, logbookLifeCyclesClientFactory, "", "", newArrayList()); handler = new CheckObjectUnitConsistencyActionHandler(); handler.execute(params, action); }
@Override public ItemStatus execute(WorkerParameters params, HandlerIO handler) throws ProcessingException { checkMandatoryParameters(params); checkMandatoryIOParameter(handler); final ItemStatus itemStatus = new ItemStatus(HANDLER_ID); try { final List<String> notConformOGs = findObjectGroupsNonReferencedByArchiveUnit(handler, params, itemStatus); if (!notConformOGs.isEmpty()) { itemStatus.setData("errorNumber", notConformOGs.size()); } } catch (Exception e) { LOGGER.error(e); itemStatus.increment(StatusCode.KO); } return new ItemStatus(HANDLER_ID).setItemsStatus(HANDLER_ID, itemStatus); }
CheckObjectUnitConsistencyActionHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters params, HandlerIO handler) throws ProcessingException { checkMandatoryParameters(params); checkMandatoryIOParameter(handler); final ItemStatus itemStatus = new ItemStatus(HANDLER_ID); try { final List<String> notConformOGs = findObjectGroupsNonReferencedByArchiveUnit(handler, params, itemStatus); if (!notConformOGs.isEmpty()) { itemStatus.setData("errorNumber", notConformOGs.size()); } } catch (Exception e) { LOGGER.error(e); itemStatus.increment(StatusCode.KO); } return new ItemStatus(HANDLER_ID).setItemsStatus(HANDLER_ID, itemStatus); } }
CheckObjectUnitConsistencyActionHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters params, HandlerIO handler) throws ProcessingException { checkMandatoryParameters(params); checkMandatoryIOParameter(handler); final ItemStatus itemStatus = new ItemStatus(HANDLER_ID); try { final List<String> notConformOGs = findObjectGroupsNonReferencedByArchiveUnit(handler, params, itemStatus); if (!notConformOGs.isEmpty()) { itemStatus.setData("errorNumber", notConformOGs.size()); } } catch (Exception e) { LOGGER.error(e); itemStatus.increment(StatusCode.KO); } return new ItemStatus(HANDLER_ID).setItemsStatus(HANDLER_ID, itemStatus); } CheckObjectUnitConsistencyActionHandler(); }
CheckObjectUnitConsistencyActionHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters params, HandlerIO handler) throws ProcessingException { checkMandatoryParameters(params); checkMandatoryIOParameter(handler); final ItemStatus itemStatus = new ItemStatus(HANDLER_ID); try { final List<String> notConformOGs = findObjectGroupsNonReferencedByArchiveUnit(handler, params, itemStatus); if (!notConformOGs.isEmpty()) { itemStatus.setData("errorNumber", notConformOGs.size()); } } catch (Exception e) { LOGGER.error(e); itemStatus.increment(StatusCode.KO); } return new ItemStatus(HANDLER_ID).setItemsStatus(HANDLER_ID, itemStatus); } CheckObjectUnitConsistencyActionHandler(); static final String getId(); @Override ItemStatus execute(WorkerParameters params, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler); }
CheckObjectUnitConsistencyActionHandler extends ActionHandler { @Override public ItemStatus execute(WorkerParameters params, HandlerIO handler) throws ProcessingException { checkMandatoryParameters(params); checkMandatoryIOParameter(handler); final ItemStatus itemStatus = new ItemStatus(HANDLER_ID); try { final List<String> notConformOGs = findObjectGroupsNonReferencedByArchiveUnit(handler, params, itemStatus); if (!notConformOGs.isEmpty()) { itemStatus.setData("errorNumber", notConformOGs.size()); } } catch (Exception e) { LOGGER.error(e); itemStatus.increment(StatusCode.KO); } return new ItemStatus(HANDLER_ID).setItemsStatus(HANDLER_ID, itemStatus); } CheckObjectUnitConsistencyActionHandler(); static final String getId(); @Override ItemStatus execute(WorkerParameters params, HandlerIO handler); @Override void checkMandatoryIOParameter(HandlerIO handler);  }