@Override public final void configure(ApplicationConfigurer configurer, ApplicationContext<T> context) { this.context = context; this.configurer = configurer; this.triggerFactory = configurer.getTriggerFactory(); configure(); }
/** * Get the configuration object. * * @return application configuration provided during application creation */ protected T getConfig() { return getContext().getConfig(); }
/** * Get a ScheduleBuilder for the specified program. * @param scheduleName the name of the schedule * @param programType the type of the program; currently, only ProgramType.WORKFLOW can be scheduled * @param programName the name of the program * * @return The {@link ScheduleBuilder} used to build the schedule */ protected ScheduleBuilder buildSchedule(String scheduleName, ProgramType programType, String programName) { return configurer.buildSchedule(scheduleName, programType, programName); }
@Override protected String getName(ApplicationSpecification input) { return input.getName(); } }
@Override public Map<String, Plugin> getPlugins() { return delegate.getPlugins(); } }
@Override public Map<String, MapReduceSpecification> getMapReduce() { return delegate.getMapReduce(); }
@Override public Map<String, ServiceSpecification> getServices() { return delegate.getServices(); }
@Override public ArtifactId getArtifactId() { return delegate.getArtifactId(); }
/** * @see ApplicationConfigurer#addSpark(Spark) */ protected void addSpark(Spark spark) { configurer.addSpark(spark); }
/** * @see ApplicationConfigurer#addMapReduce(MapReduce) */ protected void addMapReduce(MapReduce mapReduce) { configurer.addMapReduce(mapReduce); }
@Override public Set<String> getProgramsByType(ProgramType programType) { return delegate.getProgramsByType(programType); } }
@Override public Map<String, String> getDatasetModules() { return delegate.getDatasetModules(); }
/** * @see ApplicationConfigurer#addWorkflow(Workflow) */ protected void addWorkflow(Workflow workflow) { configurer.addWorkflow(workflow); }
/** * Schedules a program, using the given scheduleCreationSpec. * * @param scheduleCreationSpec defines the schedule. */ protected void schedule(ScheduleCreationSpec scheduleCreationSpec) { configurer.schedule(scheduleCreationSpec); }
/** * @see ApplicationConfigurer#setName(String) */ protected void setName(String name) { configurer.setName(name); }
/** * @see ApplicationConfigurer#setDescription(String) */ protected void setDescription(String description) { configurer.setDescription(description); }
/** * @see ApplicationConfigurer#addService(Service) */ protected void addService(Service service) { configurer.addService(service); }
/** * @see ApplicationConfigurer#addWorker(Worker) */ protected void addWorker(Worker worker) { configurer.addWorker(worker); }
@Override protected String getName(ApplicationSpecification input) { return input.getName(); } }
@Override public String getName() { return delegate.getName(); }