Commit f9d7499a authored by Roberto Loayza's avatar Roberto Loayza

Update aplication.yml and update business parameter deploymente

parent 97cfff9b
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
<xdf.version>3.3.0</xdf.version> <xdf.version>3.4.0</xdf.version>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
......
package com.bytesw.bytebot.controller;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HealthController {
@GetMapping("/health")
public ResponseEntity<Void> health() {
return new ResponseEntity<>(HttpStatus.OK);
}
}
...@@ -229,7 +229,7 @@ public class ScheduleService implements SchedulingConfigurer { ...@@ -229,7 +229,7 @@ public class ScheduleService implements SchedulingConfigurer {
} }
if (!keys.isEmpty()) { if (!keys.isEmpty()) {
for (String keyTask: keys) { for (String keyTask: keys) {
if (!futureMap.get(keyTask).isCancelled()) { if (futureMap.containsKey(keyTask)) {
ScheduledFuture future = futureMap.get(keyTask); ScheduledFuture future = futureMap.get(keyTask);
future.cancel(true); future.cancel(true);
futureMap.remove(keyTask); futureMap.remove(keyTask);
...@@ -254,6 +254,8 @@ public class ScheduleService implements SchedulingConfigurer { ...@@ -254,6 +254,8 @@ public class ScheduleService implements SchedulingConfigurer {
if (calendarException.isPresent()){ if (calendarException.isPresent()){
schedulerFlag = validateException(calendarException.get()); schedulerFlag = validateException(calendarException.get());
break; break;
} else {
schedulerFlag = true;
} }
} else { } else {
schedulerFlag = false; schedulerFlag = false;
......
...@@ -8,19 +8,19 @@ import org.springframework.stereotype.Component; ...@@ -8,19 +8,19 @@ import org.springframework.stereotype.Component;
@Component @Component
public class SFTPRoute extends RouteBuilder { public class SFTPRoute extends RouteBuilder {
@Value("${application.bytebot-integration.ftp.username}") @Value("${application.AVB-integration.ftp.username}")
private String username; private String username;
@Value("${application.bytebot-integration.ftp.password}") @Value("${application.AVB-integration.ftp.password}")
private String password; private String password;
@Value("${application.bytebot-integration.ftp.directory:}") @Value("${application.AVB-integration.ftp.directory:}")
private String directory; private String directory;
@Value("${application.bytebot-integration.ftp.host}") @Value("${application.AVB-integration.ftp.host}")
private String host; private String host;
@Value("${application.bytebot-integration.ftp.passiveMode:true}") @Value("${application.AVB-integration.ftp.passiveMode:true}")
private boolean passiveMode; private boolean passiveMode;
@Value("${application.services.multi-tenant:false}") @Value("${application.services.multi-tenant:false}")
......
...@@ -25,6 +25,7 @@ import java.io.ByteArrayInputStream; ...@@ -25,6 +25,7 @@ import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.time.OffsetDateTime;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
...@@ -72,16 +73,16 @@ public class BucketService { ...@@ -72,16 +73,16 @@ public class BucketService {
response.setMessage("NOT.FOUND.BUSINESS.PARAMETER"); response.setMessage("NOT.FOUND.BUSINESS.PARAMETER");
throw new NotFoundException(); throw new NotFoundException();
} }
if (deployment.get().getDefaultValue() != null) { List<BusinessParameterConfiguration> deploy = businessParameterConfigurationRepository
bucketName = deployment.get().getDefaultValue(); .findBusinessParameterConfigurationListByBusinessParameter(deployment.get().getId());
} else { if (deploy.isEmpty()) {
List<BusinessParameterConfiguration> deploy = businessParameterConfigurationRepository response.setMessage("NOT.FOUND.BUSINESS.PARAMETER");
.findBusinessParameterConfigurationListByBusinessParameter(deployment.get().getId()); throw new NotFoundException();
if (deploy.isEmpty()) { }
response.setMessage("NOT.FOUND.BUSINESS.PARAMETER"); if (deploy.get(0).getFrom().isAfter(OffsetDateTime.now())) {
throw new NotFoundException();
}
bucketName = deploy.get(0).getValue(); bucketName = deploy.get(0).getValue();
} else if (deployment.get().getDefaultValue() != null) {
bucketName = deployment.get().getDefaultValue();
} }
boolean result = false; boolean result = false;
......
...@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service; ...@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.time.OffsetDateTime;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
...@@ -65,16 +66,16 @@ public class OrquestadorService { ...@@ -65,16 +66,16 @@ public class OrquestadorService {
response.setMessage("NOT.FOUND.BUSINESS.PARAMETER"); response.setMessage("NOT.FOUND.BUSINESS.PARAMETER");
throw new NotFoundException(); throw new NotFoundException();
} }
if (deployment.get().getDefaultValue() != null) { List<BusinessParameterConfiguration> deploy = businessParameterConfigurationRepository
modeDeployment = deployment.get().getDefaultValue(); .findBusinessParameterConfigurationListByBusinessParameter(deployment.get().getId());
} else { if (deploy.isEmpty()) {
List<BusinessParameterConfiguration> deploy = businessParameterConfigurationRepository response.setMessage("NOT.FOUND.BUSINESS.PARAMETER");
.findBusinessParameterConfigurationListByBusinessParameter(deployment.get().getId()); throw new NotFoundException();
if (deploy.isEmpty()) { }
response.setMessage("NOT.FOUND.BUSINESS.PARAMETER"); if (deploy.get(0).getFrom().isAfter(OffsetDateTime.now())) {
throw new NotFoundException();
}
modeDeployment = deploy.get(0).getValue(); modeDeployment = deploy.get(0).getValue();
} else if (deployment.get().getDefaultValue() != null) {
modeDeployment = deployment.get().getDefaultValue();
} }
//Valida y guarda en base de datos //Valida y guarda en base de datos
response = fileManagementService.saveFile(uuid, file); response = fileManagementService.saveFile(uuid, file);
...@@ -138,16 +139,16 @@ public class OrquestadorService { ...@@ -138,16 +139,16 @@ public class OrquestadorService {
response.setMessage("NOT.FOUND.BUSINESS.PARAMETER"); response.setMessage("NOT.FOUND.BUSINESS.PARAMETER");
throw new NotFoundException(); throw new NotFoundException();
} }
if (deployment.get().getDefaultValue() != null) { List<BusinessParameterConfiguration> deploy = businessParameterConfigurationRepository
modeDeployment = deployment.get().getDefaultValue(); .findBusinessParameterConfigurationListByBusinessParameter(deployment.get().getId());
} else { if (deploy.isEmpty()) {
List<BusinessParameterConfiguration> deploy = businessParameterConfigurationRepository response.setMessage("NOT.FOUND.BUSINESS.PARAMETER");
.findBusinessParameterConfigurationListByBusinessParameter(deployment.get().getId()); throw new NotFoundException();
if (deploy.isEmpty()) { }
response.setMessage("NOT.FOUND.BUSINESS.PARAMETER"); if (deploy.get(0).getFrom().isAfter(OffsetDateTime.now())) {
throw new NotFoundException();
}
modeDeployment = deploy.get(0).getValue(); modeDeployment = deploy.get(0).getValue();
} else if (deployment.get().getDefaultValue() != null) {
modeDeployment = deployment.get().getDefaultValue();
} }
if (model.getStatus().equals(StatusBcdEnum.CARGADO.getName())) { if (model.getStatus().equals(StatusBcdEnum.CARGADO.getName())) {
......
spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration
server: server:
servlet.context-path: ${APPLICATION_PATH:/bytebot} servlet.context-path: ${APPLICATION_PATH:/AVB}
port: ${APPLICATION_PORT:9077} port: ${APPLICATION_PORT:9077}
web: web:
#static-content-location: file:/home/mgutierrez/Documentos/Bytesw/bytebot-workspace/dist/bytebot-html/ #static-content-location: file:/home/mgutierrez/Documentos/Bytesw/bytebot-workspace/dist/bytebot-html/
static-content-location: file:/home/mgutierrez/Descargas/dist/bytebot-html/ static-content-location: file:/home/mgutierrez/Descargas/dist-20/dist/bytebot-html/
#NOTA debe terminar con / #NOTA debe terminar con /
security: security:
...@@ -72,7 +72,7 @@ application: ...@@ -72,7 +72,7 @@ application:
messaging: messaging:
queue-test: action_queue.fifo queue-test: action_queue.fifo
topic-test: topic-test topic-test: topic-test
bytebot-integration: AVB-integration:
ftp: ftp:
host: localhost host: localhost
username: ftp username: ftp
...@@ -129,7 +129,7 @@ spring: ...@@ -129,7 +129,7 @@ spring:
hikari.registerMbeans: true hikari.registerMbeans: true
security: security:
basepath: http://localhost:9077/bytebot basepath: http://localhost:9077/AVB
provider: byte # oracle, amazon provider: byte # oracle, amazon
oauth2-client: oauth2-client:
clientId: xdf-client clientId: xdf-client
...@@ -156,7 +156,7 @@ spring: ...@@ -156,7 +156,7 @@ spring:
testWhileIdle: true testWhileIdle: true
hikari.registerMbeans: true hikari.registerMbeans: true
security: security:
basepath: http://localhost:9077/bytebot basepath: http://localhost:9077/AVB
provider: byte # oracle, amazon provider: byte # oracle, amazon
oauth2-client: oauth2-client:
clientId: xdf-client clientId: xdf-client
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment