@Override public String getServiceLabel() { return handler.getHandlerId(); }
@Override public String getServiceLabel() { return handler.getHandlerId(); }
@Override public String getId() { return handler.getHandlerId(); }
@Override public String getServiceLabel() { return handler.getHandlerId(); }
private String getAsakusaHomePath( ExecutionContext context, ExecutionScript script, ExecutionScriptHandler<?> handler) throws IOException, InterruptedException { assert context != null; assert script != null; assert handler != null; String inScript = script.getEnvironmentVariables().get(ENV_ASAKUSA_HOME); if (inScript != null && inScript.equals(PLACEHOLDER_HOME) == false) { LOG.debug("Asakusa location is found in script: {} -> {}", script.getId(), inScript); return inScript; } Map<String, String> environmentVariables = handler.getEnvironmentVariables(context, script); String inHandler = environmentVariables.get(ENV_ASAKUSA_HOME); if (inHandler != null) { LOG.debug("Asakusa location is found in handler: {} -> {}", script.getId(), inHandler); return inHandler; } throw new IOException(MessageFormat.format( "{0} is not defined for \"{1}\"", ENV_ASAKUSA_HOME, handler.getHandlerId())); }
@Override public void cleanUp(ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { ExecutionScriptHandler<T> target; if (forceCleanUp != null) { target = delegations.get(forceCleanUp); } else { target = resolve(context, null); } assert target != null; YSLOG.info("I01003", target.getHandlerId(), context.getBatchId(), context.getFlowId(), context.getPhase(), context.getExecutionId()); target.cleanUp(monitor, context); }
@Override public void setUp(ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { ExecutionScriptHandler<T> target; if (forceSetUp != null) { target = delegations.get(forceSetUp); } else { target = resolve(context, null); } assert target != null; YSLOG.info("I01001", target.getHandlerId(), context.getBatchId(), context.getFlowId(), context.getPhase(), context.getExecutionId()); target.setUp(monitor, context); }
@Override public void execute( ExecutionMonitor monitor, ExecutionContext context, T script) throws InterruptedException, IOException { ExecutionScriptHandler<T> target = resolve(context, script); assert target != null; YSLOG.info("I01002", target.getHandlerId(), context.getBatchId(), context.getFlowId(), context.getPhase(), context.getExecutionId(), script.getId()); target.execute(monitor, context, script); }