Le Business Proxy doit prendre sa configuration dans mongodb et ne plus exposer un rest d'administration
This commit is contained in:
parent
0025a7cec0
commit
824c4336b7
23 changed files with 250 additions and 458 deletions
|
|
@ -205,7 +205,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<artifactId>drools-framewwork-business-proxy-persistence</artifactId>
|
||||
<artifactId>drools-framework-business-proxy-persistence</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
|
|
|||
|
|
@ -2,20 +2,13 @@ package org.chtijbug.drools.console;
|
|||
|
||||
|
||||
import org.chtijbug.drools.console.service.util.ApplicationContextProvider;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.transport.client.PreBuiltTransportClient;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
import org.springframework.context.annotation.*;
|
||||
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
|
||||
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
|
||||
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
|
||||
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Configuration
|
||||
@SpringBootApplication
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import org.drools.workbench.models.guided.template.backend.RuleTemplateModelXMLP
|
|||
import org.drools.workbench.models.guided.template.shared.TemplateModel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RequestCallback;
|
||||
|
|
|
|||
|
|
@ -1,213 +0,0 @@
|
|||
package org.chtijbug.drools.console.service;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.vaadin.flow.component.UI;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.chtijbug.drools.console.AddLog;
|
||||
import org.chtijbug.drools.console.service.model.kie.KieContainerInfo;
|
||||
import org.chtijbug.drools.console.service.model.kie.KieServerJobStatus;
|
||||
import org.chtijbug.drools.console.service.model.kie.SpaceProject;
|
||||
import org.chtijbug.drools.proxy.persistence.model.ProjectPersist;
|
||||
import org.kie.server.api.model.KieContainerResource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RequestCallback;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Scanner;
|
||||
|
||||
@Service
|
||||
public class KieServerRepositoryService {
|
||||
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(KieServerRepositoryService.class);
|
||||
|
||||
|
||||
private RestTemplate restTemplateKiewb = new RestTemplate();
|
||||
|
||||
private ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
///spaces/{spaceName}/projects/{projectName}
|
||||
|
||||
public void getProjectContent(String url, String username, String password, String space, String project) {
|
||||
String completeurl = url + "/spaces/" + space + "/projects/" + project;
|
||||
logger.info("url project content : " + completeurl);
|
||||
ResponseEntity<SpaceProject> response = restTemplateKiewb
|
||||
.execute(completeurl, HttpMethod.GET, requestCallback(null, username, password), clientHttpResponse -> {
|
||||
SpaceProject extractedResponse = null;
|
||||
if (clientHttpResponse.getBody() != null) {
|
||||
Scanner s = new Scanner(clientHttpResponse.getBody()).useDelimiter("\\A");
|
||||
String result = s.hasNext() ? s.next() : "";
|
||||
|
||||
SpaceProject values = mapper.readValue(result, SpaceProject.class);
|
||||
extractedResponse = values;
|
||||
}
|
||||
ResponseEntity<SpaceProject> extractedValue = new ResponseEntity<>(extractedResponse, clientHttpResponse.getHeaders(), clientHttpResponse.getStatusCode());
|
||||
return extractedValue;
|
||||
});
|
||||
SpaceProject reponseMoteur;
|
||||
|
||||
reponseMoteur = response.getBody();
|
||||
System.out.println(reponseMoteur);
|
||||
}
|
||||
|
||||
public List<KieContainerInfo> getContainerList(String url, String username, String password) {
|
||||
List<KieContainerInfo> results = new ArrayList<>();
|
||||
String completeurl = url ;
|
||||
logger.info("url kie server container : " + completeurl);
|
||||
ResponseEntity<Map<String, Object>> response = restTemplateKiewb
|
||||
.execute(completeurl, HttpMethod.GET, requestCallback(null, username, password), clientHttpResponse -> {
|
||||
Map<String, Object> extractedResponse = null;
|
||||
if (clientHttpResponse.getBody() != null) {
|
||||
Scanner s = new Scanner(clientHttpResponse.getBody()).useDelimiter("\\A");
|
||||
String result = s.hasNext() ? s.next() : "";
|
||||
Map<String, Object> map = mapper.readValue(
|
||||
result,
|
||||
new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> values = mapper.readValue(result, Map.class);
|
||||
extractedResponse = values;
|
||||
}
|
||||
ResponseEntity<Map<String, Object>> extractedValue = new ResponseEntity<>(extractedResponse, clientHttpResponse.getHeaders(), clientHttpResponse.getStatusCode());
|
||||
return extractedValue;
|
||||
});
|
||||
Map<String, Object> reponseMoteur;
|
||||
|
||||
reponseMoteur = response.getBody();
|
||||
// Object resultMap = reponseMoteur.get("containers");
|
||||
// Object containersMap = ((Map) resultMap).get("kie-containers");
|
||||
// Map containerMap = ((Map) containersMap);
|
||||
if (reponseMoteur != null
|
||||
&& reponseMoteur.get("containers")!= null) {
|
||||
List<Map<String, Object>> listContainers = (List) reponseMoteur.get("containers");
|
||||
for (Map<String, Object> container : listContainers) {
|
||||
KieContainerInfo kieContainerInfo = new KieContainerInfo();
|
||||
System.out.println("coucou");
|
||||
kieContainerInfo.setContainerId((String) container.get("containerId"));
|
||||
Map artifact = (Map) container.get("resolvedReleaseId");
|
||||
if (artifact != null) {
|
||||
kieContainerInfo.setArtifactId((String) artifact.get("artifactId"));
|
||||
kieContainerInfo.setGroupId((String) artifact.get("groupId"));
|
||||
kieContainerInfo.setVersion((String) artifact.get("version"));
|
||||
}
|
||||
kieContainerInfo.setContainerAlias((String) container.get("container-alias"));
|
||||
results.add(kieContainerInfo);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public KieServerJobStatus stopContainer(String url, String username, String password, String containerId, AddLog workOnGoingView, UI ui) {
|
||||
KieServerJobStatus results = null;
|
||||
String completeurl = url +"/"+ containerId;
|
||||
logger.info("url kie server container : " + completeurl);
|
||||
ResponseEntity<KieServerJobStatus> response = restTemplateKiewb
|
||||
.execute(completeurl, HttpMethod.DELETE, requestCallback(null, username, password), clientHttpResponse -> {
|
||||
KieServerJobStatus extractedResponse = null;
|
||||
if (clientHttpResponse.getBody() != null) {
|
||||
Scanner s = new Scanner(clientHttpResponse.getBody()).useDelimiter("\\A");
|
||||
String result = s.hasNext() ? s.next() : "";
|
||||
KieServerJobStatus values = mapper.readValue(result, KieServerJobStatus.class);
|
||||
extractedResponse = values;
|
||||
}
|
||||
ResponseEntity<KieServerJobStatus> extractedValue = new ResponseEntity<>(extractedResponse, clientHttpResponse.getHeaders(), clientHttpResponse.getStatusCode());
|
||||
return extractedValue;
|
||||
});
|
||||
KieServerJobStatus reponseMoteur;
|
||||
reponseMoteur = response.getBody();
|
||||
workOnGoingView.addRow(reponseMoteur.toString(),ui);
|
||||
return reponseMoteur;
|
||||
}
|
||||
|
||||
public KieContainerInfo createContainer(String url, String username, String password, String containerId, KieContainerResource request, AddLog workOnGoingView,UI ui) {
|
||||
String completeurl = url + "/"+containerId;
|
||||
logger.info("url kie server container : " + completeurl);
|
||||
ResponseEntity<Map<String, Object>> response = restTemplateKiewb
|
||||
.execute(completeurl, HttpMethod.PUT, requestCallback(request, username, password), clientHttpResponse -> {
|
||||
Map<String, Object> extractedResponse = null;
|
||||
if (clientHttpResponse.getBody() != null) {
|
||||
Scanner s = new Scanner(clientHttpResponse.getBody()).useDelimiter("\\A");
|
||||
String result = s.hasNext() ? s.next() : "";
|
||||
Map<String, Object> map = mapper.readValue(
|
||||
result,
|
||||
new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> values = mapper.readValue(result, Map.class);
|
||||
extractedResponse = values;
|
||||
}
|
||||
ResponseEntity<Map<String, Object>> extractedValue = new ResponseEntity<>(extractedResponse, clientHttpResponse.getHeaders(), clientHttpResponse.getStatusCode());
|
||||
return extractedValue;
|
||||
});
|
||||
Map<String, Object> reponseMoteur;
|
||||
|
||||
reponseMoteur = response.getBody();
|
||||
workOnGoingView.addRow(reponseMoteur.toString(),ui);
|
||||
KieContainerInfo result = new KieContainerInfo();
|
||||
if (reponseMoteur.get("result") != null) {
|
||||
String containerID = (String) ((Map) ((Map) reponseMoteur.get("result")).get("kie-container")).get("container-id");
|
||||
result.setContainerId(containerID);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public KieContainerInfo createContainerWithBusinessInterface(String url, String username, String password, ProjectPersist projectPersist, KieContainerResource request, AddLog workOnGoingView, UI ui) {
|
||||
String completeurl = url + "/business/"+projectPersist.getContainerID()+"/"+projectPersist.getMainClass()+"/"+projectPersist.getProcessID();
|
||||
logger.info("url kie server business container : " + completeurl);
|
||||
ResponseEntity<Map<String, Object>> response = restTemplateKiewb
|
||||
.execute(completeurl, HttpMethod.POST, requestCallback(request, username, password), clientHttpResponse -> {
|
||||
Map<String, Object> extractedResponse = null;
|
||||
if (clientHttpResponse.getBody() != null) {
|
||||
Scanner s = new Scanner(clientHttpResponse.getBody()).useDelimiter("\\A");
|
||||
String result = s.hasNext() ? s.next() : "";
|
||||
Map<String, Object> map = mapper.readValue(
|
||||
result,
|
||||
new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
Map<String, Object> values = mapper.readValue(result, Map.class);
|
||||
extractedResponse = values;
|
||||
}
|
||||
ResponseEntity<Map<String, Object>> extractedValue = new ResponseEntity<>(extractedResponse, clientHttpResponse.getHeaders(), clientHttpResponse.getStatusCode());
|
||||
return extractedValue;
|
||||
});
|
||||
Map<String, Object> reponseMoteur;
|
||||
|
||||
reponseMoteur = response.getBody();
|
||||
workOnGoingView.addRow(reponseMoteur.toString(),ui);
|
||||
KieContainerInfo result = new KieContainerInfo();
|
||||
if (reponseMoteur.get("result") != null) {
|
||||
String containerID = (String) ((Map) ((Map) reponseMoteur.get("result")).get("kie-container")).get("container-id");
|
||||
result.setContainerId(containerID);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private RequestCallback requestCallback(final Object content, String username, String password) {
|
||||
return clientHttpRequest -> {
|
||||
if (content != null) {
|
||||
mapper.writeValue(clientHttpRequest.getBody(), content);
|
||||
}
|
||||
clientHttpRequest.getHeaders().add(
|
||||
HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
|
||||
clientHttpRequest.getHeaders().add(
|
||||
HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE);
|
||||
String auth = username + ":" + password;
|
||||
byte[] encodedAuth = Base64.encodeBase64(
|
||||
auth.getBytes(Charset.forName("UTF-8")));
|
||||
String authHeader = "Basic " + new String(encodedAuth);
|
||||
clientHttpRequest.getHeaders().add(
|
||||
HttpHeaders.AUTHORIZATION, authHeader);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -6,16 +6,15 @@ import org.chtijbug.drools.console.AddLog;
|
|||
import org.chtijbug.drools.console.service.model.UserConnected;
|
||||
import org.chtijbug.drools.console.service.model.kie.JobStatus;
|
||||
import org.chtijbug.drools.console.service.model.kie.KieConfigurationData;
|
||||
import org.chtijbug.drools.console.service.model.kie.KieContainerInfo;
|
||||
import org.chtijbug.drools.console.service.model.kie.KieServerJobStatus;
|
||||
import org.chtijbug.drools.console.service.util.AppContext;
|
||||
import org.chtijbug.drools.proxy.persistence.json.KeyProject;
|
||||
import org.chtijbug.drools.proxy.persistence.model.ContainerPojoPersist;
|
||||
import org.chtijbug.drools.proxy.persistence.model.ProjectPersist;
|
||||
import org.chtijbug.drools.proxy.persistence.model.RuntimePersist;
|
||||
import org.chtijbug.drools.proxy.persistence.repository.ContainerRepository;
|
||||
import org.chtijbug.drools.proxy.persistence.repository.ProjectRepository;
|
||||
import org.chtijbug.drools.proxy.persistence.repository.RuntimeRepository;
|
||||
import org.chtijbug.guvnor.server.jaxrs.model.PlatformProjectResponse;
|
||||
import org.kie.server.api.model.KieContainerResource;
|
||||
import org.kie.server.api.model.ReleaseId;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -38,9 +37,12 @@ public class ProjectPersistService {
|
|||
@Autowired
|
||||
private UserConnectedService userConnectedService;
|
||||
|
||||
@Autowired
|
||||
private KieServerRepositoryService kieServerRepositoryService;
|
||||
|
||||
@Autowired
|
||||
private ContainerRepository containerRepository;
|
||||
|
||||
@Autowired
|
||||
private RuntimeRepository runtimeRepository;
|
||||
|
||||
public ProjectPersistService(){
|
||||
this.config = AppContext.getApplicationContext().getBean(KieConfigurationData.class);
|
||||
|
|
@ -145,13 +147,35 @@ public class ProjectPersistService {
|
|||
userConnected.getUserPassword(), projectPersist.getProjectName().getSpaceName(), projectPersist.getProjectName().getName(), "install", workOnGoingView,ui);
|
||||
|
||||
executeWrite(url,username,password,workOnGoingView,result.getJobId(),ui);
|
||||
|
||||
/**
|
||||
if (projectPersist.getContainerID() != null) {
|
||||
KieServerJobStatus jobresult = kieServerRepositoryService.stopContainer(config.getKieserverUrl(), config.getKieserverUserName(), config.getKieserverPassword(), projectPersist.getContainerID(), workOnGoingView,ui);
|
||||
if (jobresult != null
|
||||
&& "SUCCESS".equals(jobresult.getType())) {
|
||||
}
|
||||
}
|
||||
**/
|
||||
// ContainerPojoPersist toto = containerRepository.findByServerNameAndContainerId(projectPersist.getContainerID());
|
||||
List<RuntimePersist> kieservers = runtimeRepository.findByServerName(projectPersist.getServerName());
|
||||
if (kieservers.size()==1) {
|
||||
ContainerPojoPersist existingContainer = containerRepository.findByServerNameAndContainerId(projectPersist.getServerName(),projectPersist.getContainerID());
|
||||
if (existingContainer==null) {
|
||||
ContainerPojoPersist newContainer = new ContainerPojoPersist();
|
||||
newContainer.setStatus(ContainerPojoPersist.STATUS.TODEPLOY.toString());
|
||||
newContainer.setClassName(projectPersist.getMainClass());
|
||||
newContainer.setProcessID(projectPersist.getProcessID());
|
||||
newContainer.setContainerId(projectPersist.getContainerID());
|
||||
newContainer.setServerName(projectPersist.getServerName());
|
||||
newContainer.setGroupId(projectPersist.getGroupID());
|
||||
newContainer.setArtifactId(projectPersist.getArtifactID());
|
||||
newContainer.setVersion(projectPersist.getProjectVersion());
|
||||
containerRepository.save(newContainer);
|
||||
}else{
|
||||
existingContainer.setStatus(ContainerPojoPersist.STATUS.TODEPLOY.toString());
|
||||
containerRepository.save(existingContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
KieContainerResource newContainer = new KieContainerResource();
|
||||
newContainer.setContainerId(projectPersist.getContainerID());
|
||||
newContainer.setReleaseId(new ReleaseId());
|
||||
|
|
@ -159,7 +183,8 @@ public class ProjectPersistService {
|
|||
newContainer.getReleaseId().setGroupId(projectPersist.getGroupID());
|
||||
newContainer.getReleaseId().setVersion(projectPersist.getProjectVersion());
|
||||
KieContainerInfo createdContainer = kieServerRepositoryService.createContainerWithBusinessInterface(config.getKieserverUrl(), config.getKieserverUserName(), config.getKieserverPassword(), projectPersist, newContainer, workOnGoingView, ui);
|
||||
|
||||
**/
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import org.springframework.web.client.RestTemplate;
|
|||
public class RuntimeService {
|
||||
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(KieServerRepositoryService.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(RuntimeService.class);
|
||||
|
||||
@Autowired
|
||||
private RuntimeRepository runtimeRepository;
|
||||
|
|
|
|||
|
|
@ -1,124 +0,0 @@
|
|||
package org.chtijbug.drools.console.vaadinComponent.componentView;
|
||||
|
||||
import com.vaadin.flow.component.button.Button;
|
||||
import com.vaadin.flow.component.dependency.StyleSheet;
|
||||
import com.vaadin.flow.component.dialog.Dialog;
|
||||
import com.vaadin.flow.component.icon.VaadinIcon;
|
||||
import com.vaadin.flow.component.html.Label;
|
||||
import com.vaadin.flow.component.notification.Notification;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.data.value.ValueChangeMode;
|
||||
import org.chtijbug.drools.console.service.RuntimeService;
|
||||
import org.chtijbug.drools.console.service.model.ReturnPerso;
|
||||
import org.chtijbug.drools.console.service.util.AppContext;
|
||||
import org.chtijbug.drools.console.vaadinComponent.ComponentPerso.TextFieldPerso;
|
||||
import org.chtijbug.drools.console.vaadinComponent.Squelette.SqueletteComposant;
|
||||
import org.chtijbug.drools.proxy.persistence.model.RuntimePersist;
|
||||
import org.kie.server.api.model.KieServerInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@StyleSheet("css/accueil.css")
|
||||
public class AddRuntime extends VerticalLayout {
|
||||
|
||||
private TextFieldPerso host;
|
||||
|
||||
private TextFieldPerso port;
|
||||
|
||||
private Button testConnexion;
|
||||
|
||||
private Label label;
|
||||
|
||||
private RuntimeService runtimeService;
|
||||
|
||||
public AddRuntime(Dialog dialog, SqueletteComposant squeletteComposant){
|
||||
|
||||
runtimeService = AppContext.getApplicationContext().getBean(RuntimeService.class);
|
||||
|
||||
setClassName("creation-runtime-content");
|
||||
|
||||
label=new Label("Add Runtime");
|
||||
label.setClassName("creation-runtime-title");
|
||||
add(label);
|
||||
|
||||
host=new TextFieldPerso("Host","http://111.111.1.111",VaadinIcon.HARDDRIVE.create());
|
||||
host.getTextField().setRequired(true);
|
||||
host.getTextField().setValueChangeMode(ValueChangeMode.EAGER);
|
||||
host.getTextField().addValueChangeListener(textFieldStringComponentValueChangeEvent -> {
|
||||
verify();
|
||||
});
|
||||
|
||||
add(host);
|
||||
|
||||
port=new TextFieldPerso("Port","",VaadinIcon.INBOX.create());
|
||||
port.getTextField().setRequired(true);
|
||||
port.getTextField().setValueChangeMode(ValueChangeMode.EAGER);
|
||||
port.getTextField().addValueChangeListener(textFieldStringComponentValueChangeEvent -> {
|
||||
verify();
|
||||
});
|
||||
|
||||
|
||||
add(port);
|
||||
|
||||
testConnexion=new Button("Tester connexion");
|
||||
testConnexion.setEnabled(false);
|
||||
testConnexion.setClassName("login-application-connexion");
|
||||
add(testConnexion);
|
||||
testConnexion.addClickListener(buttonClickEvent -> {
|
||||
|
||||
ReturnPerso<KieServerInfo> returnPerso= runtimeService.verifyIfKieServerExist(
|
||||
host.getTextField().getValue()+":"+port.getTextField().getValue()
|
||||
);
|
||||
|
||||
if(returnPerso.getaBoolean()){
|
||||
Notification.show(returnPerso.getError());
|
||||
runtimeService.saveRuntime(new RuntimePersist(
|
||||
returnPerso.getBody().getName(),
|
||||
returnPerso.getBody().getVersion(),host.getTextField().getValue()+":"+port.getTextField().getValue()
|
||||
));
|
||||
|
||||
List<RuntimePersist> runtimePersists=runtimeService.getRuntimeRepository().findAll();
|
||||
squeletteComposant.getLeftMenuGlobal().getInformationStructure().actualiseKieServer(runtimePersists!=null?runtimePersists.size():0);
|
||||
dialog.close();
|
||||
}else {
|
||||
Notification.show(returnPerso.getError());
|
||||
testConnexion.setClassName("login-application-connexion-error");
|
||||
testConnexion.setIcon(VaadinIcon.ROTATE_LEFT.create());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void verify(){
|
||||
if(port.getTextField().isInvalid()||port.getTextField().getValue().isEmpty()||port.getTextField().getValue()==null&&
|
||||
host.getTextField().isInvalid()||host.getTextField().getValue().isEmpty()||host.getTextField().getValue()==null){
|
||||
testConnexion.setEnabled(false);
|
||||
}else {
|
||||
testConnexion.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public TextFieldPerso getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setHost(TextFieldPerso host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public TextFieldPerso getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(TextFieldPerso port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public Button getTestConnexion() {
|
||||
return testConnexion;
|
||||
}
|
||||
|
||||
public void setTestConnexion(Button testConnexion) {
|
||||
this.testConnexion = testConnexion;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +1,14 @@
|
|||
package org.chtijbug.drools.console.vaadinComponent.leftMenu.Action;
|
||||
|
||||
import com.vaadin.flow.component.button.Button;
|
||||
import com.vaadin.flow.component.dialog.Dialog;
|
||||
import com.vaadin.flow.component.html.Label;
|
||||
import com.vaadin.flow.component.icon.VaadinIcon;
|
||||
import com.vaadin.flow.component.notification.Notification;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.component.textfield.TextField;
|
||||
import com.vaadin.flow.data.value.ValueChangeMode;
|
||||
import org.chtijbug.drools.console.service.IndexerService;
|
||||
import org.chtijbug.drools.console.service.util.AppContext;
|
||||
import org.chtijbug.drools.console.vaadinComponent.ComponentPerso.DialogPerso;
|
||||
import org.chtijbug.drools.console.vaadinComponent.ComponentPerso.TextFieldPerso;
|
||||
import org.chtijbug.drools.console.vaadinComponent.Squelette.SqueletteComposant;
|
||||
import org.chtijbug.drools.console.vaadinComponent.componentView.AddRuntime;
|
||||
import org.chtijbug.drools.console.vaadinComponent.componentView.DefineProject;
|
||||
import org.chtijbug.drools.console.vaadinComponent.componentView.GridActionLogging;
|
||||
import org.chtijbug.drools.console.vaadinComponent.componentView.GridLogging;
|
||||
import org.chtijbug.drools.console.view.ActionLoggingView;
|
||||
import org.chtijbug.drools.console.view.LoggingView;
|
||||
import org.chtijbug.drools.indexer.persistence.model.BusinessTransactionPersistence;
|
||||
|
|
|
|||
|
|
@ -1,23 +1,19 @@
|
|||
package org.chtijbug.drools.console.vaadinComponent.leftMenu.Action;
|
||||
|
||||
import com.vaadin.flow.component.button.Button;
|
||||
import com.vaadin.flow.component.dialog.Dialog;
|
||||
import com.vaadin.flow.component.icon.VaadinIcon;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import org.chtijbug.drools.console.vaadinComponent.ComponentPerso.DialogPerso;
|
||||
import org.chtijbug.drools.console.vaadinComponent.Squelette.SqueletteComposant;
|
||||
import org.chtijbug.drools.console.vaadinComponent.componentView.AddRuntime;
|
||||
|
||||
public class RuntimesAction extends VerticalLayout {
|
||||
|
||||
private Button addRuntime;
|
||||
// private Button addRuntime;
|
||||
|
||||
|
||||
public RuntimesAction(SqueletteComposant squeletteComposant){
|
||||
|
||||
setClassName("leftMenu-global-action");
|
||||
|
||||
|
||||
/**
|
||||
addRuntime=new Button("add runtime", VaadinIcon.PLUS.create());
|
||||
addRuntime.setClassName("leftMenu-global-button");
|
||||
add(addRuntime);
|
||||
|
|
@ -30,7 +26,9 @@ public class RuntimesAction extends VerticalLayout {
|
|||
|
||||
dialog.open();
|
||||
});
|
||||
**/
|
||||
}
|
||||
|
||||
private boolean isActive(Button button){
|
||||
return button.getClassNames().contains("active");
|
||||
}
|
||||
|
|
@ -41,7 +39,7 @@ public class RuntimesAction extends VerticalLayout {
|
|||
}
|
||||
}
|
||||
private void active(Button button){
|
||||
removeActive(addRuntime);
|
||||
// removeActive(addRuntime);
|
||||
button.getClassNames().add("active");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,9 @@ package org.chtijbug.drools.console.vaadinComponent.menu;
|
|||
|
||||
import com.vaadin.flow.component.button.Button;
|
||||
import com.vaadin.flow.component.dependency.StyleSheet;
|
||||
import com.vaadin.flow.component.dialog.Dialog;
|
||||
import com.vaadin.flow.component.icon.VaadinIcon;
|
||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import org.chtijbug.drools.console.vaadinComponent.Squelette.SqueletteComposant;
|
||||
import org.chtijbug.drools.console.vaadinComponent.componentView.AddRuntime;
|
||||
import org.chtijbug.drools.console.vaadinComponent.leftMenu.Action.DeploymentAction;
|
||||
import org.chtijbug.drools.console.view.DeploymentView;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,9 @@ package org.chtijbug.drools.console.vaadinComponent.menu;
|
|||
|
||||
import com.vaadin.flow.component.button.Button;
|
||||
import com.vaadin.flow.component.dependency.StyleSheet;
|
||||
import com.vaadin.flow.component.dialog.Dialog;
|
||||
import com.vaadin.flow.component.icon.VaadinIcon;
|
||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||
import org.chtijbug.drools.console.vaadinComponent.Squelette.SqueletteComposant;
|
||||
import org.chtijbug.drools.console.vaadinComponent.componentView.AddRuntime;
|
||||
import org.chtijbug.drools.console.vaadinComponent.leftMenu.Action.DeploymentAction;
|
||||
import org.chtijbug.drools.console.vaadinComponent.leftMenu.Action.RuntimesAction;
|
||||
import org.chtijbug.drools.console.view.DeploymentView;
|
||||
import org.chtijbug.drools.console.view.RuntimesView;
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ public class PackageResource {
|
|||
}
|
||||
|
||||
@POST
|
||||
@Path("{organizationalUnitName}/{projectName}/asset/{assetName}/source")
|
||||
@Path("{organizationalUnitName}/{projectName}/asset/{assetName:.+}}/source")
|
||||
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN})
|
||||
public void updateAssetSource(
|
||||
@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("projectName") String projectName, @PathParam("assetName") String assetName, String content) {
|
||||
|
|
|
|||
|
|
@ -137,8 +137,8 @@
|
|||
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.16.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.16.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.16.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.17.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.17.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.17.0.Final" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -92,8 +92,8 @@
|
|||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.16.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.16.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.16.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.17.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.17.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.17.0.Final" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<artifactId>drools-framewwork-business-proxy-persistence</artifactId>
|
||||
<artifactId>drools-framework-business-proxy-persistence</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<!-- Spring Boot -->
|
||||
|
|
@ -92,6 +92,10 @@
|
|||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-jackson-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-quartz2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package org.chtijbug.drools.proxy.camel;
|
||||
|
||||
import org.apache.camel.builder.RouteBuilder;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class AutodeployRouter extends RouteBuilder {
|
||||
|
||||
|
||||
@Override
|
||||
public void configure() throws Exception {
|
||||
|
||||
from("quartz2://myGroup/myTimerName?cron=0+0/1+*+?+*+MON-FRI").to("bean:kieService?method=updateConfig()");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -18,12 +18,13 @@ package org.chtijbug.drools.proxy.service;
|
|||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.camel.CamelContext;
|
||||
import org.chtijbug.drools.proxy.camel.DroolsRouter;
|
||||
import org.chtijbug.drools.proxy.persistence.repository.ContainerRepository;
|
||||
import org.chtijbug.drools.proxy.persistence.model.ContainerPojoPersist;
|
||||
import org.chtijbug.drools.proxy.persistence.model.RuntimePersist;
|
||||
import org.chtijbug.drools.proxy.persistence.repository.ContainerRepository;
|
||||
import org.chtijbug.drools.proxy.persistence.repository.RuntimeRepository;
|
||||
import org.chtijbug.kieserver.services.drools.DroolsChtijbugKieServerExtension;
|
||||
import org.chtijbug.kieserver.services.drools.DroolsChtijbugRulesExecutionService;
|
||||
import org.kie.server.api.model.*;
|
||||
import org.kie.server.services.api.KieContainerInstance;
|
||||
import org.kie.server.services.api.KieServerExtension;
|
||||
import org.kie.server.services.api.KieServerRegistry;
|
||||
import org.kie.server.services.impl.KieContainerInstanceImpl;
|
||||
|
|
@ -33,12 +34,15 @@ import org.kie.server.services.impl.marshal.MarshallerHelper;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -60,8 +64,12 @@ public class KieServiceCommon {
|
|||
@Inject
|
||||
private ContainerRepository containerRepository;
|
||||
|
||||
@Inject
|
||||
private RuntimeRepository runtimeRepository;
|
||||
@Autowired
|
||||
CamelContext camelContext;
|
||||
@Value("${server.port}")
|
||||
private int serverPort;
|
||||
|
||||
public KieServiceCommon() {
|
||||
// for now, if no server impl is passed as parameter, create one
|
||||
|
|
@ -86,10 +94,36 @@ public class KieServiceCommon {
|
|||
|
||||
@PostConstruct
|
||||
private void initCamelBusinessRoutes() {
|
||||
try {
|
||||
String serverName = System.getProperty("org.kie.server.id");
|
||||
String sftpPort=System.getProperty("org.chtijbug.server.sftpPort");
|
||||
List<RuntimePersist> itIsMes = runtimeRepository.findByServerName(serverName);
|
||||
if (itIsMes.size()==0){
|
||||
ServiceResponse<KieServerInfo> result = server.getInfo();
|
||||
String version = result.getResult().getVersion();
|
||||
String hostName="localhost";
|
||||
try {
|
||||
InetAddress inetAddress = InetAddress.getLocalHost();
|
||||
hostName=inetAddress.getHostName();
|
||||
} catch (UnknownHostException e) {
|
||||
logger.info("initCamelBusinessRoutes.getLocalHost", e);
|
||||
}
|
||||
//org.chtijbug.server.sftpPort
|
||||
RuntimePersist runtimePersist = new RuntimePersist(serverName,version,"http://"+hostName+":"+serverPort,String.valueOf(serverPort),sftpPort);
|
||||
runtimeRepository.save(runtimePersist);
|
||||
}
|
||||
try {
|
||||
|
||||
List<ContainerPojoPersist> containers = containerRepository.findByServerName(serverName);
|
||||
for (ContainerPojoPersist container : containers) {
|
||||
this.initCamelBusinessRoute(container);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("initCamelBusinessRoutes", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void initCamelBusinessRoute(ContainerPojoPersist container) throws Exception {
|
||||
ClassLoader localClassLoader = null;
|
||||
String containerId = container.getContainerId();
|
||||
KieContainerInstanceImpl kieContainerInstance = registry.getContainer(containerId);
|
||||
|
|
@ -108,7 +142,7 @@ public class KieServiceCommon {
|
|||
Class<?> theClass = classLoader.loadClass(className);
|
||||
camelContext.setApplicationContextClassLoader(classLoader);
|
||||
Thread.currentThread().setContextClassLoader(classLoader);
|
||||
String projectName = container.getProjectName();
|
||||
String projectName = container.getContainerId();
|
||||
String processId = container.getProcessID();
|
||||
DroolsRouter droolsRouter = new DroolsRouter(camelContext, theClass, projectName, kieContainerInstance, processId);
|
||||
camelContext.addRoutes(droolsRouter);
|
||||
|
|
@ -119,10 +153,8 @@ public class KieServiceCommon {
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("CreationContainer", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public KieServerImpl getServer() {
|
||||
return server;
|
||||
|
|
@ -150,7 +182,25 @@ public class KieServiceCommon {
|
|||
return result.getResult();
|
||||
}
|
||||
|
||||
public void updateConfig() throws Exception {
|
||||
String serverName = System.getProperty("org.kie.server.id");
|
||||
List<ContainerPojoPersist> containers= containerRepository.findByServerNameAndStatus(serverName, ContainerPojoPersist.STATUS.TODEPLOY.toString());
|
||||
for (ContainerPojoPersist element:containers){
|
||||
//this.disposeContainer(element.getContainerId());
|
||||
|
||||
KieContainerResource newContainer = new KieContainerResource();
|
||||
newContainer.setContainerId(element.getContainerId());
|
||||
newContainer.setReleaseId(new ReleaseId());
|
||||
newContainer.getReleaseId().setArtifactId(element.getArtifactId());
|
||||
newContainer.getReleaseId().setGroupId(element.getGroupId());
|
||||
newContainer.getReleaseId().setVersion(element.getVersion());
|
||||
this.createContainer(element.getContainerId(),newContainer);
|
||||
this.initCamelBusinessRoute(element);
|
||||
element.setStatus(ContainerPojoPersist.STATUS.UP.toString());
|
||||
containerRepository.save(element);
|
||||
}
|
||||
|
||||
}
|
||||
public KieContainerResource createContainerWithRestBusinessService(String id, KieContainerResource container, String className, String processID) {
|
||||
|
||||
|
||||
|
|
@ -167,17 +217,6 @@ public class KieServiceCommon {
|
|||
logger.info("GenericResource.runSession", e);
|
||||
}
|
||||
try {
|
||||
KieContainerInstance kci = registry.getContainer(id);
|
||||
Set<Class<?>> classes = kci.getExtraClasses();
|
||||
|
||||
Class foundClass = this.getClassFromName(classes, className);
|
||||
if (foundClass != null) {
|
||||
ClassLoader classLoader = foundClass.getClassLoader();
|
||||
Class<?> theClass = classLoader.loadClass(className);
|
||||
Thread.currentThread().setContextClassLoader(classLoader);
|
||||
camelContext.setApplicationContextClassLoader(classLoader);
|
||||
DroolsRouter droolsRouter = new DroolsRouter(camelContext, theClass, id, kci, processID);
|
||||
camelContext.addRoutes(droolsRouter);
|
||||
String serverName = System.getProperty("org.kie.server.id");
|
||||
ContainerPojoPersist containerPojoPersist = containerRepository.findByServerNameAndContainerId(serverName, id);
|
||||
if (containerPojoPersist == null) {
|
||||
|
|
@ -188,18 +227,17 @@ public class KieServiceCommon {
|
|||
containerPojoPersist.setProjectName(id);
|
||||
containerPojoPersist.setServerName(serverName);
|
||||
containerPojoPersist.setProcessID(processID);
|
||||
containerRepository.save(containerPojoPersist);
|
||||
|
||||
} else {
|
||||
containerPojoPersist.setContainerId(id);
|
||||
containerPojoPersist.setClassName(className);
|
||||
containerPojoPersist.setProjectName(id);
|
||||
containerPojoPersist.setProcessID(processID);
|
||||
containerPojoPersist.setServerName(serverName);
|
||||
|
||||
}
|
||||
this.initCamelBusinessRoute(containerPojoPersist);
|
||||
containerRepository.save(containerPojoPersist);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (ClassNotFoundException e) {
|
||||
logger.error("createContainerWithRestBusinessService", e);
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>drools-framewwork-business-proxy-persistence</artifactId>
|
||||
<artifactId>drools-framework-business-proxy-persistence</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ import org.springframework.data.mongodb.core.mapping.Document;
|
|||
|
||||
@Document
|
||||
public class ContainerPojoPersist {
|
||||
|
||||
public enum STATUS {
|
||||
UP,
|
||||
DOWN,
|
||||
TODEPLOY
|
||||
}
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
|
|
@ -22,6 +26,14 @@ public class ContainerPojoPersist {
|
|||
|
||||
private String projectName;
|
||||
|
||||
private String status;
|
||||
|
||||
private String groupId;
|
||||
|
||||
private String artifactId;
|
||||
|
||||
private String version;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -70,6 +82,38 @@ public class ContainerPojoPersist {
|
|||
this.processID = processID;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getArtifactId() {
|
||||
return artifactId;
|
||||
}
|
||||
|
||||
public void setArtifactId(String artifactId) {
|
||||
this.artifactId = artifactId;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuffer sb = new StringBuffer("ContainerPojoPersist{");
|
||||
|
|
@ -79,6 +123,10 @@ public class ContainerPojoPersist {
|
|||
sb.append(", serverName='").append(serverName).append('\'');
|
||||
sb.append(", processID='").append(processID).append('\'');
|
||||
sb.append(", projectName='").append(projectName).append('\'');
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", groupId='").append(groupId).append('\'');
|
||||
sb.append(", artifactId='").append(artifactId).append('\'');
|
||||
sb.append(", version='").append(version).append('\'');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,16 @@ public class RuntimePersist {
|
|||
|
||||
private String hostname;
|
||||
|
||||
public RuntimePersist(String serverName, String version, String hostname) {
|
||||
private String serverPort;
|
||||
|
||||
private String sftpPort;
|
||||
|
||||
public RuntimePersist(String serverName, String version, String hostname,String serverPort,String sftpPort) {
|
||||
this.serverName = serverName;
|
||||
this.version = version;
|
||||
this.hostname = hostname;
|
||||
this.serverPort = serverPort;
|
||||
this.sftpPort = sftpPort;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
@ -55,4 +61,20 @@ public class RuntimePersist {
|
|||
public void setHostname(String hostname) {
|
||||
this.hostname = hostname;
|
||||
}
|
||||
|
||||
public String getSftpPort() {
|
||||
return sftpPort;
|
||||
}
|
||||
|
||||
public void setSftpPort(String sftpPort) {
|
||||
this.sftpPort = sftpPort;
|
||||
}
|
||||
|
||||
public String getServerPort() {
|
||||
return serverPort;
|
||||
}
|
||||
|
||||
public void setServerPort(String serverPort) {
|
||||
this.serverPort = serverPort;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ public interface ContainerRepository extends MongoRepository<ContainerPojoPersis
|
|||
List<ContainerPojoPersist> findByContainerId(String containerId);
|
||||
|
||||
List<ContainerPojoPersist> findByServerName(String serverName);
|
||||
List<ContainerPojoPersist> findByServerNameAndStatus(String serverName, String status);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
2
pom.xml
2
pom.xml
|
|
@ -19,7 +19,7 @@
|
|||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<jbpm.version>7.16.0.Final</jbpm.version>
|
||||
<jbpm.version>7.17.0.Final</jbpm.version>
|
||||
<spring.boot.version>1.5.12.RELEASE</spring.boot.version>
|
||||
<spring.version>4.3.16.RELEASE</spring.version>
|
||||
<version.thorntail>2.2.1.Final</version.thorntail>
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue