@Override public void setup(Environment environment, Bootstrap<Configuration> bootstrap) throws ApplicationSetupException { super.setup(environment, bootstrap); bootstrap.addHandlerClass(BadResourceHandler.class); environment.publishResource(this.badResourceName, BadResourceHandler.class, ROOT_BAD_RESOURCE_PATH); }
@Override public void setup(final Environment environment, final Bootstrap<HarvesterConfiguration> bootstrap) throws ApplicationSetupException{ LOGGER.info("Starting IT Harvester Application configuration..."); final HarvesterConfiguration configuration = bootstrap.configuration(); this.target=configuration.target(); if(this.target==null) { environment.lifecycle().register(this.publisher); bootstrap.addHandler(new HarvesterHandler()); bootstrap.addHandler(new ContributorHandler(controller)); bootstrap.addHandlerClass(ContributorContainerHandler.class); bootstrap.addHandler(new CommitHandler(controller)); bootstrap.addHandlerClass(CommitContainerHandler.class); bootstrap.addHandler(new ProjectHandler(controller)); bootstrap.addHandlerClass(ProjectContainerHandler.class); bootstrap.addHandler(new ComponentHandler(controller)); bootstrap.addHandlerClass(ComponentContainerHandler.class); bootstrap.addHandler(new VersionHandler(controller)); bootstrap.addHandlerClass(VersionContainerHandler.class); bootstrap.addHandler(new IssueHandler(controller)); bootstrap.addHandlerClass(IssueContainerHandler.class); publishResource( IdentityUtil.collectorName(this.target), HarvesterHandler.class,
badDataHandler.add(this.badDataResourceName, badDataHandler.getRepresentation()); bootstrap.addHandler(resourceHandler); bootstrap.addHandler(containerHandler); bootstrap.addHandler(relativesHandler); bootstrap.addHandler(queryableHandler); bootstrap.addHandler(this.dynamicResourceHandler); bootstrap.addHandler(badDataHandler); environment.publishResource(this.personResourceName, PersonHandler.class, ROOT_PERSON_RESOURCE_PATH); environment.publishResource(this.personContainerName, PersonContainerHandler.class, ROOT_PERSON_CONTAINER_PATH); environment.publishResource(this.queryableResourceName, QueryableResourceHandler.class, ROOT_QUERYABLE_RESOURCE_PATH); environment.publishResource(this.dynamicResourceName, DynamicResourceHandler.class, ROOT_DYNAMIC_RESOURCE_PATH); environment.publishResource(this.badDataResourceName, BadDataResourceHandler.class, ROOT_BAD_DATA_RESOURCE_PATH);
@Override public void setup(final Environment environment, final Bootstrap<HarvesterConfiguration> bootstrap) throws ApplicationSetupException { LOGGER.info("Starting CI Harvester Application configuration..."); this.configuration = bootstrap.configuration(); final BackendConfig backendConfig=toBackendConfig(this.configuration); logConfiguration(backendConfig); final DefaultResolverService resolver= new DefaultResolverService( URI.create(this.configuration.canonicalBase())); this.controller=BackendControllerManager.create(this.configuration.provider(),backendConfig); this.controller.setExecutionResolver(resolver); environment.lifecycle().addApplicationLifecycleListener(resolver); bootstrap.addHandler(new ServiceHandler(this.controller)); bootstrap.addHandler(new BuildContainerHandler(this.controller)); bootstrap.addHandler(new SubBuildContainerHandler(this.controller)); bootstrap.addHandler(new BuildHandler(this.controller)); bootstrap.addHandler(new ExecutionContainerHandler(this.controller)); bootstrap.addHandler(new ExecutionHandler(this.controller)); environment. publishResource( NamingScheme. getDefault(). name(this.configuration.target()), ServiceHandler.class, SERVICE_PATH); LOGGER.info("Contacts CI Harvester Application configuration completed."); }