@Test public void testGetKey() { MessageLogbookEngineHelper messageLogbookEngineHelper = new MessageLogbookEngineHelper(LogbookTypeProcess.HOLDINGSCHEME); String key = messageLogbookEngineHelper.getOutcomeDetail(LogbookTypeProcess.HOLDINGSCHEME.name(), StatusCode.STARTED); assertEquals(uglyConcat(HOLDINGSCHEME, StatusCode.STARTED.name()), key); key = messageLogbookEngineHelper.getOutcomeDetail(STP_STEP, StatusCode.STARTED); assertEquals(uglyConcat(HOLDINGSCHEME, STP_STEP, StatusCode.STARTED.name()), key); key = messageLogbookEngineHelper.getOutcomeDetail(STP_STEP, TRANSACTION, StatusCode.STARTED); assertEquals(uglyConcat(HOLDINGSCHEME, STP_STEP, TRANSACTION, StatusCode.STARTED.name()), key); messageLogbookEngineHelper = new MessageLogbookEngineHelper(LogbookTypeProcess.FILINGSCHEME); key = messageLogbookEngineHelper.getOutcomeDetail(STP_STEP, StatusCode.STARTED); assertEquals(uglyConcat(STP_STEP, StatusCode.STARTED.name()), key); key = messageLogbookEngineHelper.getOutcomeDetail(STP_STEP, TRANSACTION, StatusCode.STARTED); assertEquals(uglyConcat(STP_STEP, TRANSACTION, StatusCode.STARTED.name()), key); }
public String getOutcomeDetail(String stepOrHandler, StatusCode code) { String wfKey = logbookTypeProcess.name() + VitamLogbookMessages.getSeparator() + VitamLogbookMessages .getOutcomeDetail(stepOrHandler, code); LOGGER.debug("Searching for key {}", wfKey); if (VitamLogbookMessages.containsKey(wfKey)) { LOGGER.debug("Key found : {}", wfKey); return wfKey; } else { LOGGER.debug("Key found : {}", VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code)); return VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code); } }
MessageLogbookEngineHelper { public String getOutcomeDetail(String stepOrHandler, StatusCode code) { String wfKey = logbookTypeProcess.name() + VitamLogbookMessages.getSeparator() + VitamLogbookMessages .getOutcomeDetail(stepOrHandler, code); LOGGER.debug("Searching for key {}", wfKey); if (VitamLogbookMessages.containsKey(wfKey)) { LOGGER.debug("Key found : {}", wfKey); return wfKey; } else { LOGGER.debug("Key found : {}", VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code)); return VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code); } } }
MessageLogbookEngineHelper { public String getOutcomeDetail(String stepOrHandler, StatusCode code) { String wfKey = logbookTypeProcess.name() + VitamLogbookMessages.getSeparator() + VitamLogbookMessages .getOutcomeDetail(stepOrHandler, code); LOGGER.debug("Searching for key {}", wfKey); if (VitamLogbookMessages.containsKey(wfKey)) { LOGGER.debug("Key found : {}", wfKey); return wfKey; } else { LOGGER.debug("Key found : {}", VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code)); return VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code); } } MessageLogbookEngineHelper(LogbookTypeProcess logbookTypeProcess); }
MessageLogbookEngineHelper { public String getOutcomeDetail(String stepOrHandler, StatusCode code) { String wfKey = logbookTypeProcess.name() + VitamLogbookMessages.getSeparator() + VitamLogbookMessages .getOutcomeDetail(stepOrHandler, code); LOGGER.debug("Searching for key {}", wfKey); if (VitamLogbookMessages.containsKey(wfKey)) { LOGGER.debug("Key found : {}", wfKey); return wfKey; } else { LOGGER.debug("Key found : {}", VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code)); return VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code); } } MessageLogbookEngineHelper(LogbookTypeProcess logbookTypeProcess); String getLabelOp(String stepOrHandler, StatusCode code, Object... args); String getLabelOp(String stepOrHandler, String transaction, StatusCode code, Object... args); String getOutcomeDetail(String stepOrHandler, StatusCode code); String getOutcomeDetail(String stepOrHandler, String transaction, StatusCode code); }
MessageLogbookEngineHelper { public String getOutcomeDetail(String stepOrHandler, StatusCode code) { String wfKey = logbookTypeProcess.name() + VitamLogbookMessages.getSeparator() + VitamLogbookMessages .getOutcomeDetail(stepOrHandler, code); LOGGER.debug("Searching for key {}", wfKey); if (VitamLogbookMessages.containsKey(wfKey)) { LOGGER.debug("Key found : {}", wfKey); return wfKey; } else { LOGGER.debug("Key found : {}", VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code)); return VitamLogbookMessages.getOutcomeDetail(stepOrHandler, code); } } MessageLogbookEngineHelper(LogbookTypeProcess logbookTypeProcess); String getLabelOp(String stepOrHandler, StatusCode code, Object... args); String getLabelOp(String stepOrHandler, String transaction, StatusCode code, Object... args); String getOutcomeDetail(String stepOrHandler, StatusCode code); String getOutcomeDetail(String stepOrHandler, String transaction, StatusCode code);  }