-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from cabinetoffice/release/6.0
Release/6.0
- Loading branch information
Showing
52 changed files
with
1,445 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Description | ||
|
||
Ticket # and link | ||
|
||
Summary of the changes and the related issue. List any dependencies that are required for this change: | ||
|
||
## Type of change | ||
|
||
Please check the relevant options. | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue). | ||
- [ ] New feature (non-breaking change which adds functionality). | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). | ||
- [ ] This change requires a documentation update. | ||
|
||
## How Has This Been Tested? | ||
|
||
Please describe the tests that you ran to verify your changes: | ||
|
||
- [ ] Unit Test | ||
|
||
- [ ] Integration Test (if applicable) | ||
|
||
- [ ] End to End Test (if applicable) | ||
|
||
## Screenshots (if appropriate): | ||
|
||
Please attach screenshots of the change if it is a UI change: | ||
|
||
# Checklist: | ||
|
||
- [ ] If I have listed dependencies above, I have ensured that they are present in the target branch. | ||
- [ ] I have performed a self-review of my code. | ||
- [ ] I have commented my code in hard-to-understand areas. | ||
- [ ] I have made corresponding changes to the documentation where applicable. | ||
- [ ] I have ran cypress tests and they all pass locally. |
17 changes: 17 additions & 0 deletions
17
src/main/java/gov/cabinetoffice/gap/applybackend/config/SQSConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package gov.cabinetoffice.gap.applybackend.config; | ||
|
||
import com.amazonaws.services.sqs.AmazonSQS; | ||
import com.amazonaws.services.sqs.AmazonSQSClientBuilder; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
@RequiredArgsConstructor | ||
public class SQSConfig { | ||
|
||
@Bean | ||
AmazonSQS amazonSQS() { | ||
return AmazonSQSClientBuilder.defaultClient(); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/gov/cabinetoffice/gap/applybackend/config/SpotlightQueueConfigProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package gov.cabinetoffice.gap.applybackend.config; | ||
|
||
import lombok.*; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Configuration | ||
@ConfigurationProperties(prefix = "spotlight-queue") | ||
public class SpotlightQueueConfigProperties { | ||
|
||
@NotNull | ||
private String queueUrl; | ||
|
||
} |
31 changes: 19 additions & 12 deletions
31
src/main/java/gov/cabinetoffice/gap/applybackend/constants/MandatoryQuestionConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/gov/cabinetoffice/gap/applybackend/dto/api/GetGrantApplicationDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package gov.cabinetoffice.gap.applybackend.dto.api; | ||
|
||
import gov.cabinetoffice.gap.applybackend.enums.GrantApplicantStatus; | ||
import lombok.Data; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import java.time.Instant; | ||
|
||
@Data | ||
@RequiredArgsConstructor | ||
public class GetGrantApplicationDto { | ||
private Integer id; | ||
private Integer grantSchemeId; | ||
private Integer version; | ||
private Instant created; | ||
private Instant lastUpdated; | ||
private Integer lastUpdatedBy; | ||
private String applicationName; | ||
private GrantApplicantStatus applicationStatus; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 25 additions & 18 deletions
43
src/main/java/gov/cabinetoffice/gap/applybackend/dto/api/GetGrantSchemeDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
package gov.cabinetoffice.gap.applybackend.dto.api; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import gov.cabinetoffice.gap.applybackend.model.GrantScheme; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import java.time.ZonedDateTime; | ||
import java.time.Instant; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Data | ||
@RequiredArgsConstructor | ||
public class GetGrantSchemeDto { | ||
private long id; | ||
private long funderId; | ||
private int version; | ||
private ZonedDateTime lastUpdated; | ||
private long lastUpdatedBy; | ||
private Integer id; | ||
private Integer funderId; | ||
private Integer version; | ||
private Instant createdDate; | ||
private Instant lastUpdated; | ||
private Integer lastUpdatedBy; | ||
private String ggisIdentifier; | ||
private String schemeName; | ||
private String schemeContact; | ||
private String sectionId; | ||
private String sectionTitle; | ||
private String sectionStatus; | ||
} | ||
private String name; | ||
private String email; | ||
|
||
public GetGrantSchemeDto(final GrantScheme grantScheme) { | ||
this.id = grantScheme.getId(); | ||
this.funderId = grantScheme.getFunderId(); | ||
this.version = grantScheme.getVersion(); | ||
this.createdDate = grantScheme.getCreatedDate(); | ||
this.lastUpdated = grantScheme.getLastUpdated(); | ||
this.lastUpdatedBy = grantScheme.getLastUpdatedBy(); | ||
this.ggisIdentifier = grantScheme.getGgisIdentifier(); | ||
this.name = grantScheme.getName(); | ||
this.email = grantScheme.getEmail(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...a/gov/cabinetoffice/gap/applybackend/dto/api/GetGrantSchemeWithApplicationAndAdverts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package gov.cabinetoffice.gap.applybackend.dto.api; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
public class GetGrantSchemeWithApplicationAndAdverts { | ||
private GetGrantSchemeDto grantScheme; | ||
private GetGrantApplicationDto grantApplication; | ||
private List<GetGrantAdvertDto> grantAdverts; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/gov/cabinetoffice/gap/applybackend/enums/SpotlightBatchStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package gov.cabinetoffice.gap.applybackend.enums; | ||
|
||
public enum SpotlightBatchStatus { | ||
QUEUED, | ||
SUCCESS, | ||
FAILURE | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/gov/cabinetoffice/gap/applybackend/enums/SpotlightSubmissionStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package gov.cabinetoffice.gap.applybackend.enums; | ||
|
||
public enum SpotlightSubmissionStatus { | ||
QUEUED, | ||
SENT, | ||
SEND_ERROR, | ||
GGIS_ERROR, | ||
VALIDATION_ERROR | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/gov/cabinetoffice/gap/applybackend/mapper/GrantSchemeMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package gov.cabinetoffice.gap.applybackend.mapper; | ||
|
||
import gov.cabinetoffice.gap.applybackend.dto.api.GetGrantApplicationDto; | ||
import gov.cabinetoffice.gap.applybackend.dto.api.GetGrantSchemeDto; | ||
import gov.cabinetoffice.gap.applybackend.model.GrantScheme; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.NullValueCheckStrategy; | ||
import org.mapstruct.NullValuePropertyMappingStrategy; | ||
|
||
|
||
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) | ||
public interface GrantSchemeMapper { | ||
GetGrantSchemeDto grantSchemeToGetGrantSchemeDto(GrantScheme grantScheme); | ||
|
||
@Mapping(source = "grantApplication", target = ".") | ||
GetGrantApplicationDto grantSchemeToGetGrantApplicationDto(GrantScheme grantScheme); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.