Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency hashicorp/terraform to v1.7.4 #217

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion infrastructure/.terraform-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.2
1.7.4
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public ResponseEntity<List<ApplicationFunctionEntity>> postApplicationFunctionsS

List<ApplicationFunctionEntity> response = applicationFunctionService.searchApplicationFunctions(criteria);

log.info(":POST:postApplicationFunctionsSearch: response count: {}", response.size());

return buildResponse(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public ResponseEntity<List<BusinessUnitUserEntity>> postBusinessUnitUsersSearch(

List<BusinessUnitUserEntity> response = businessUnitUserService.searchBusinessUnitUsers(criteria);

log.info(":POST:postBusinessUnitUsersSearch: response count: {}", response.size());

return buildResponse(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public ResponseEntity<List<TemplateEntity>> postTemplatesSearch(@RequestBody Tem

List<TemplateEntity> response = templateService.searchTemplates(criteria);

log.info(":POST:postTemplatesSearch: response count: {}", response.size());

return buildResponse(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.springframework.web.bind.annotation.RestController;
import uk.gov.hmcts.opal.dto.search.TemplateMappingSearchDto;
import uk.gov.hmcts.opal.entity.TemplateMappingEntity;
import uk.gov.hmcts.opal.entity.TemplateMappingEntity.MappingId;
import uk.gov.hmcts.opal.service.TemplateMappingServiceInterface;

import java.util.List;
Expand All @@ -40,10 +39,10 @@ public TemplateMappingController(
public ResponseEntity<TemplateMappingEntity> getTemplateMappingById(@PathVariable Long templateId,
@PathVariable Long applicationFunctionId) {

MappingId mappingId = new MappingId(templateId, applicationFunctionId);
log.info(":GET:getTemplateMappingById: mappingId: {}", mappingId);
log.info(":GET:getTemplateMappingById: templateId: {}, applicationFunctionId: {}",
templateId, applicationFunctionId);

TemplateMappingEntity response = templateMappingService.getTemplateMapping(mappingId);
TemplateMappingEntity response = templateMappingService.getTemplateMapping(templateId, applicationFunctionId);

return buildResponse(response);
}
Expand All @@ -56,6 +55,8 @@ public ResponseEntity<List<TemplateMappingEntity>> postTemplateMappingsSearch(

List<TemplateMappingEntity> response = templateMappingService.searchTemplateMappings(criteria);

log.info(":POST:postTemplateMappingsSearch: response count: {}", response.size());

return buildResponse(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public ResponseEntity<List<UserEntity>> postUsersSearch(@RequestBody UserSearchD

List<UserEntity> response = userService.searchUsers(criteria);

log.info(":POST:postUsersSearch: response count: {}", response.size());

return buildResponse(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public ResponseEntity<List<UserEntitlementEntity>> postUserEntitlementsSearch(

List<UserEntitlementEntity> response = userEntitlementService.searchUserEntitlements(criteria);

log.info(":POST:postUserEntitlementsSearch: response count: {}", response.size());

return buildResponse(response);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package uk.gov.hmcts.opal.dto.search;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import uk.gov.hmcts.opal.dto.ToJsonString;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ApplicationFunctionSearchDto implements ToJsonString {

private String applicationFunctionId;
private String functionName;

}
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
package uk.gov.hmcts.opal.dto.search;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import uk.gov.hmcts.opal.dto.ToJsonString;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class BusinessUnitUserSearchDto implements ToJsonString {

private String businessUnitUserId;

private String businessUnitId;
private String businessUnitName;
private String businessUnitType;
private String parentBusinessUnitId;

private String userId;
private String username;
private String userDescription;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
package uk.gov.hmcts.opal.dto.search;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import uk.gov.hmcts.opal.dto.ToJsonString;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TemplateMappingSearchDto implements ToJsonString {

private String templateId;
private String templateName;
private String applicationFunctionId;

}
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package uk.gov.hmcts.opal.dto.search;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import uk.gov.hmcts.opal.dto.ToJsonString;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TemplateSearchDto implements ToJsonString {

private String templateId;

private String templateName;
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
package uk.gov.hmcts.opal.dto.search;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import uk.gov.hmcts.opal.dto.ToJsonString;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserEntitlementSearchDto implements ToJsonString {

private String userEntitlementId;

private String businessUnitUserId;

private String businessUnitId;
private String businessUnitName;
private String businessUnitType;
private String parentBusinessUnitId;

private String userId;
private String username;
private String userDescription;

private String functionName;

}
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
package uk.gov.hmcts.opal.dto.search;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import uk.gov.hmcts.opal.dto.ToJsonString;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserSearchDto implements ToJsonString {

private String userId;

private String username;
private String password;
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Entity
@Table(name = "application_functions")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ApplicationFunctionEntity {
public class ApplicationFunctionEntity implements Serializable {

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "application_function_id_seq_generator")
Expand Down
19 changes: 15 additions & 4 deletions src/main/java/uk/gov/hmcts/opal/entity/BusinessUnitUserEntity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package uk.gov.hmcts.opal.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -15,16 +22,20 @@
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "businessUnitUserId")
public class BusinessUnitUserEntity {

@Id
@Column(name = "business_unit_user_id", length = 6)
private String businessUnitUserId;

@Column(name = "business_unit_id")
private Short businessUnitId;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "business_unit_id", nullable = false)
private BusinessUnitEntity businessUnit;

@Column(name = "user_id", length = 100)
private String userId;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", nullable = false)
private UserEntity user;

}
9 changes: 8 additions & 1 deletion src/main/java/uk/gov/hmcts/opal/entity/TemplateEntity.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package uk.gov.hmcts.opal.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
Expand All @@ -12,13 +15,17 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Entity
@Table(name = "templates")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TemplateEntity {
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "templateId")
public class TemplateEntity implements Serializable {

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "template_id_seq_generator")
Expand Down
21 changes: 12 additions & 9 deletions src/main/java/uk/gov/hmcts/opal/entity/TemplateMappingEntity.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package uk.gov.hmcts.opal.entity;

import jakarta.persistence.Column;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -22,21 +25,21 @@
public class TemplateMappingEntity {

@Id
@Column(name = "template_id")
private Long templateId;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "template_id", nullable = false)
private TemplateEntity template;

@Id
@Column(name = "application_function_id")
private Long applicationFunctionId;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "application_function_id", nullable = false)
private ApplicationFunctionEntity applicationFunction;

@Data
@NoArgsConstructor
@AllArgsConstructor
public static class MappingId implements Serializable {

private Long templateId;

private Long applicationFunctionId;
private TemplateEntity template;
private ApplicationFunctionEntity applicationFunction;
}

}
14 changes: 10 additions & 4 deletions src/main/java/uk/gov/hmcts/opal/entity/UserEntitlementEntity.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package uk.gov.hmcts.opal.entity;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.SequenceGenerator;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
Expand All @@ -27,9 +31,11 @@ public class UserEntitlementEntity {
@Column(name = "user_entitlement_id")
private Long userEntitlementId;

@Column(name = "business_unit_user_id", length = 6)
private String businessUnitUserId;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "business_unit_user_id", nullable = false)
private BusinessUnitUserEntity businessUnitUser;

@Column(name = "application_function_id")
private Long applicationFunctionId;
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "application_function_id", nullable = false)
private ApplicationFunctionEntity applicationFunction;
}
5 changes: 5 additions & 0 deletions src/main/java/uk/gov/hmcts/opal/entity/UserEntity.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package uk.gov.hmcts.opal.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
Expand All @@ -15,6 +18,8 @@
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "userId")
public class UserEntity {

@Id
Expand Down
Loading