Skip to content

Commit

Permalink
Merge pull request #1773 from US-CBP/release_1.11
Browse files Browse the repository at this point in the history
Release 1.11
  • Loading branch information
originalname51 authored Apr 14, 2020
2 parents 03ef7ce + 32be525 commit 6dfa5f1
Show file tree
Hide file tree
Showing 126 changed files with 4,869 additions and 1,094 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ services:
KIBANA_HOST: kibana
NEO4J_HOST: neo4j
ACTIVEMQ_HOST: activemq
JAVA_OPTS: "-Xms8048m -Xmx16000m -Duser.timezone=UTC"
volumes:
- scheduler-logs:/usr/local/tomcat/logs
secrets:
Expand Down
23 changes: 14 additions & 9 deletions gtas-parent/docker-resources/default.application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ maxPassengersPerRuleRun=2000
neo4jusername=${NEO4J_USERNAME}
neo4jpassword=${NEO4J_PASSWORD}
neo4jEnabled=false
threadsOnRules=5
threadsOnLoader=5
maxFlightsPerRuleRun=50
maxFlightsProcessedPerThread=10
neo4jRuleEngineEnabled=true

###Hibernate###
Expand Down Expand Up @@ -94,7 +98,6 @@ sqs.loader.initialDelay.in.milliseconds=1000
# 5. sqs.loader.accessKey = <enter Access Key>
# 6. sqs.loader.secretKey = <enter Secret Key>
#

sqs.loader.enabled=false
sqs.loader.usecredentials=N
sqs.loader.region=
Expand Down Expand Up @@ -144,28 +147,30 @@ ruleRunner.makeEmptyApisBagsOnNullBag=false
ruleRunner.fixedDelay.in.milliseconds=5000
ruleRunner.initialDelay.in.milliseconds=2000
loader.permits=5000
loader.worker.thread.timeout=1000
ruleRunner.isRunning=false
partial.hits.case.create=true
logs.dir.root=/logs
default.landing.page=dashboard

neo4j.protocol=https
kibana.protocol=https
neo4j.url=/browser/
cypher.url=/db/data/transaction/commit
kibana.url=/app/kibana#/dashboard/7cfbbdc0-2e13-11e9-81a3-0f5bd8b0a7ac?embed=true&_g=(refreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-3d%2Fd%2Cmode%3Arelative%2Cto%3Anow%2B3d%2Fd))
neo4j.url=https://${PROXY_IP}:443/browser/
cypher.url=https://${PROXY_IP}:443/db/data/transaction/commit
kibana.url=https://${PROXY_IP}:80/app/kibana#/dashboard/7cfbbdc0-2e13-11e9-81a3-0f5bd8b0a7ac?embed=true&_g=(refreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-3d%2Fd%2Cmode%3Arelative%2Cto%3Anow%2B3d%2Fd))

########Email service properties##########
enable.email.notification.service=false
spring.mail.host=smtp.office365.com
spring.mail.username=email
spring.mail.password=password
enable.email.notification.service=${MANUAL_HIT_NOTIFICATION_EMAIL_ENABLED}
spring.mail.host=${EMAIL_SENDER_HOST}
spring.mail.username=${EMAIL_SENDER_USERNAME}
spring.mail.password=${EMAIL_SENDER_PASSWORD}

spring.mail.port=587
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smpt.auth=true
spring.mail.properties.mail.smtp.starttls.required=true
email.hit.notification.enabled=false
email.hit.notification.enabled=${AUTOMATED_HIT_NOTIFICATION_EMAIL_ENABLED}
spring.mail.properties.ssl.trust.host=${SSL_TRUST_HOST}

login.page.url=gtas.login.page.url
path-to-attachment=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import org.springframework.util.StringUtils;

/**
* The configuration class can be imported into an XML configuration by:<br>
Expand Down Expand Up @@ -95,6 +96,10 @@ public class CommonServicesConfig {
@Value("${spring.mail.properties.mail.smtp.starttls.enable}")
private String mail_sender_smtp_starttls_enable;


@Value("${spring.mail.properties.ssl.trust.host}")
private String mailSenderSslTrustHost;

@SuppressWarnings("Duplicates")
private Properties hibProperties() {
Properties properties = new Properties();
Expand Down Expand Up @@ -182,6 +187,7 @@ public JpaTransactionManager transactionManager() {
return transactionManager;
}


@Bean
public JavaMailSenderImpl javaMailSenderImpl() {

Expand All @@ -196,6 +202,10 @@ public JavaMailSenderImpl javaMailSenderImpl() {
props.put("mail.smtp.host", mailSenderHost);
props.put("mail.smtp.port", mailSenderPort);

if(!StringUtils.isEmpty(mailSenderSslTrustHost)) {
props.put("mail.smtp.ssl.trust", mailSenderSslTrustHost);
}

mailSender.setJavaMailProperties(props);

return mailSender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private boolean hasHighPriorityHitCategory(Passenger passenger) {

public EmailDTO generateManualNotificationEmailDTO(String[] to, String note, Long paxId, String userID) throws IOException, TemplateException {
User sender = userRepository.userAndGroups(userID).orElseThrow(RuntimeException::new);
Passenger passenger = passengerService.findByIdWithFlightPaxAndDocumentsAndHitDetails(paxId);
Passenger passenger = passengerService.findByIdWithFlightAndDocumentsAndHitDetails(paxId);
EmailDTO emailDTO = new EmailDTO();

HitEmailDTO hitEmailDTO = generateHitEmailDTO(passenger, note, sender);
Expand Down
11 changes: 0 additions & 11 deletions gtas-parent/gtas-commons/src/main/java/gov/gtas/model/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ public Address() {
@ManyToMany(mappedBy = "addresses", targetEntity = Pnr.class)
private Set<Pnr> pnrs = new HashSet<>();

@OneToMany(cascade = CascadeType.ALL, mappedBy = "installationAddress", orphanRemoval = true)
private Set<FlightPax> flightPaxList = new HashSet<>();

public Set<FlightPax> getFlightPaxList() {
return flightPaxList;
}

public void setFlightPaxList(Set<FlightPax> flightPaxList) {
this.flightPaxList = flightPaxList;
}

public String getLine1() {
return line1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import javax.persistence.*;

@Deprecated
@Entity
@Table(name = "flight_pax", indexes = @Index(columnList = "ref_number", name = "flight_pax_ref_number_index"))
public class FlightPax implements Serializable {
Expand All @@ -32,10 +33,6 @@ public FlightPax(Long passengerId) {
@Column(name = "residence_country")
private String residenceCountry;

@ManyToOne
@JoinColumn(name = "install_address_id", nullable = true, referencedColumnName = "id")
private Address installationAddress;

@Column(name = "embarkation")
private String embarkation;

Expand Down Expand Up @@ -150,14 +147,6 @@ public void setResidenceCountry(String residenceCountry) {
this.residenceCountry = residenceCountry;
}

public Address getInstallationAddress() {
return installationAddress;
}

public void setInstallationAddress(Address installationAddress) {
this.installationAddress = installationAddress;
}

public String getEmbarkation() {
return embarkation;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,21 @@ public void setDisplayCondition(String displayCondition) {
@Column(name = "displayCondition")
private String displayCondition;


@Column(name = "enabled")
private boolean enabled = true;

@OneToMany(mappedBy = "graphRule")
private Set<GraphRuleParameter> graphParameter = new HashSet<>();

public boolean isEnabled() {
return enabled;
}

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

public String getCipherQuery() {
return cipherQuery;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class HitDetail extends BaseEntity {
private static final long serialVersionUID = 5219262569468670275L;

HitDetail() {
public HitDetail() {
}

@OneToMany(cascade = CascadeType.PERSIST, mappedBy = "hitDetail", fetch = FetchType.LAZY)
Expand Down Expand Up @@ -207,6 +207,22 @@ public void setHitMaker(HitMaker hitMaker) {
public void setHitMakerId(Long hitMakerId) {
this.hitMakerId = hitMakerId;
}

public static HitDetail from(PendingHitDetails pendingHitDetails) {
HitDetail hitDetail = new HitDetail(pendingHitDetails.getHitEnum());
hitDetail.setFlightId(pendingHitDetails.getFlightId());
hitDetail.setHitType(pendingHitDetails.getHitType());
hitDetail.setHitEnum(pendingHitDetails.getHitEnum());
hitDetail.setPassengerId(pendingHitDetails.getPassengerId());
hitDetail.setHitMakerId(pendingHitDetails.getHitMakerId());
hitDetail.setRuleId(pendingHitDetails.getHitMakerId()); //Set as hitmaker Id - this field is typically based on drools hit.
hitDetail.setDescription(pendingHitDetails.getDescription());
hitDetail.setCreatedDate(pendingHitDetails.getCreatedDate());
hitDetail.setTitle(pendingHitDetails.getTitle());
hitDetail.setRuleConditions(pendingHitDetails.getRuleConditions());
hitDetail.setPercentage(pendingHitDetails.getPercentage());
return hitDetail;
}

public static HitDetail from(RuleHitDetail ruleHitDetail) {
HitDetail hitDetail = new HitDetail(ruleHitDetail.getHitType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@Entity
@Table(name = "passenger_id_tag", indexes = { @Index(columnList = "idTag", name = "id_index"),
@Index(columnList = "doc_hash_id", name = "doc_hash_id_index") })
@Index(columnList = "tamr_id", name = "tamr_id_index") })
public class PassengerIDTag extends BaseEntityAudit {
private static final long serialVersionUID = 1L;

Expand Down
Loading

0 comments on commit 6dfa5f1

Please sign in to comment.