Ejemplo n.º 1
0
 @Override
 public List<Command> getImportCommand(CommandContext context) {
   List<Command> results = new ArrayList<Command>();
   if (primary != null) {
     results.add(
         new Command(
             Arrays.asList(
                 new String[] {
                   context.getHomePathPrefix() + CMD_IMPORTER,
                   CMD_ARG_PRIMARY,
                   primary,
                   batchId,
                   flowId,
                   context.getExecutionId(),
                   "20380101000000",
                   context.getVariableList(),
                 }),
             MODULE_NAME_PREFIX + primary,
             getProfileName(primary),
             getEnvironment(context)));
   }
   for (String secondary : secondaries) {
     results.add(
         new Command(
             Arrays.asList(
                 new String[] {
                   context.getHomePathPrefix() + CMD_IMPORTER,
                   CMD_ARG_SECONDARY,
                   secondary,
                   batchId,
                   flowId,
                   context.getExecutionId(),
                   "20380101000000",
                   context.getVariableList(),
                 }),
             MODULE_NAME_PREFIX + secondary,
             getProfileName(secondary),
             getEnvironment(context)));
   }
   return results;
 }
Ejemplo n.º 2
0
 @Override
 public List<Command> getFinalizeCommand(CommandContext context) {
   if (primary == null) {
     return Collections.emptyList();
   }
   return Arrays.asList(
       new Command[] {
         new Command(
             Arrays.asList(
                 new String[] {
                   context.getHomePathPrefix() + CMD_FINALIZER,
                   primary,
                   batchId,
                   flowId,
                   context.getExecutionId(),
                 }),
             MODULE_NAME_PREFIX + primary,
             getProfileName(primary),
             getEnvironment(context)),
       });
 }