diff options
Diffstat (limited to 'prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration')
3 files changed, 19 insertions, 0 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java index 2eb2903d..f792c0ae 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java @@ -53,6 +53,11 @@ public class SchedulerConfig extends PrhAppConfig { this.scheduledTask = scheduledTask; } + /** + * Function which have to stop tasks execution. + * + * @return response entity about status of cancellation operation + */ @ApiOperation(value = "Get response on stopping task execution") public synchronized Mono<ResponseEntity<String>> getResponseFromCancellationOfTasks() { scheduledFutureList.forEach(x -> x.cancel(false)); @@ -62,6 +67,11 @@ public class SchedulerConfig extends PrhAppConfig { ); } + /** + * Function for starting scheduling PRH workflow. + * + * @return status of operation execution: true - started, false - not started + */ @PostConstruct @ApiOperation(value = "Start task if possible") public synchronized boolean tryToStartTask() { diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SwaggerConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SwaggerConfig.java index b28fb407..10bf2755 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SwaggerConfig.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SwaggerConfig.java @@ -48,6 +48,10 @@ public class SwaggerConfig extends WebMvcConfigurationSupport { private static final String SWAGGER_UI = "swagger-ui.html"; private static final String WEBJARS = "/webjars/**"; + /** + * Swagger configuration function for hosting it next to spring http website. + * @return Docket + */ @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/TomcatHttpConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/TomcatHttpConfig.java index 27227251..d9b4ac52 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/TomcatHttpConfig.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/TomcatHttpConfig.java @@ -32,6 +32,11 @@ import org.springframework.context.annotation.Configuration; @Configuration public class TomcatHttpConfig { + /** + * Class for setting up hosting PRH on http/https. + * + * @return ServletWebServerFactory + */ @Bean public ServletWebServerFactory servletContainer() { TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); |