generated from ministryofjustice/template-repository
-
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.
Showing
27 changed files
with
528 additions
and
96 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
24 changes: 24 additions & 0 deletions
24
...and-delius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/AddressGenerator.kt
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,24 @@ | ||
package uk.gov.justice.digital.hmpps.data.generator | ||
|
||
import uk.gov.justice.digital.hmpps.integrations.delius.entity.Person | ||
import uk.gov.justice.digital.hmpps.integrations.delius.person.entity.PersonAddress | ||
import java.time.LocalDate | ||
|
||
object AddressGenerator { | ||
val MAIN_ADDRESS = generate(person = PersonGenerator.DEFAULT) | ||
|
||
fun generate( | ||
id: Long? = IdGenerator.getAndIncrement(), | ||
person: Person, | ||
notes: String? = null, | ||
postcode: String? = null, | ||
) = PersonAddress( | ||
id = id, | ||
start = LocalDate.now(), | ||
status = ReferenceDataGenerator.MAIN_ADDRESS_STATUS, | ||
personId = person.id!!, | ||
notes = notes, | ||
postcode = postcode, | ||
type = ReferenceDataGenerator.AWAITING_ASSESSMENT | ||
) | ||
} |
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
13 changes: 13 additions & 0 deletions
13
projects/common-platform-and-delius/src/dev/resources/db/oracle.sql
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,13 @@ | ||
CREATE OR REPLACE PACKAGE offender_support_api IS | ||
FUNCTION getNextCRN RETURN VARCHAR2; | ||
END offender_support_api; | ||
|
||
GRANT EXECUTE ON offender_support_api TO delius_app_schema; | ||
|
||
CREATE OR REPLACE PACKAGE BODY offender_support_api IS | ||
FUNCTION getNextCRN RETURN VARCHAR2 IS | ||
BEGIN | ||
RETURN 'A111111'; | ||
END getNextCRN; | ||
END offender_support_api; | ||
/ |
29 changes: 29 additions & 0 deletions
29
...platform-and-delius/src/dev/resources/messages/common-platform-hearing-blank-address.json
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,29 @@ | ||
{ | ||
"Type": "Notification", | ||
"MessageId": "aa2c2828-167f-529b-8e19-73735a2fb85c", | ||
"TopicArn": "arn:aws:sns:eu-west-2:000000000000:example", | ||
"Message": "{\"hearing\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"courtCentre\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"code\":\"A00AA00\",\"roomId\":\"00000000-0000-0000-0000-000000000000\",\"roomName\":\"Courtroom 01\"},\"type\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"description\":\"First hearing\",\"welshDescription\":null},\"jurisdictionType\":\"MAGISTRATES\",\"hearingDays\":[{\"sittingDay\":\"2024-01-01T12:00:00\",\"listedDurationMinutes\":30,\"listingSequence\":1}],\"prosecutionCases\":[{\"id\":\"00000000-0000-0000-0000-000000000000\",\"initiationCode\":\"A\",\"prosecutionCaseIdentifier\":{\"prosecutionAuthorityCode\":\"AAAAA\",\"prosecutionAuthorityId\":\"00000000-0000-0000-0000-000000000000\",\"caseURN\":\"00AA000000\"},\"defendants\":[{\"id\":\"00000000-0000-0000-0000-000000000000\",\"offences\":[{\"id\":\"00000000-0000-0000-0000-000000000000\",\"offenceDefinitionId\":\"00000000-0000-0000-0000-000000000000\",\"offenceCode\":\"AA00000\",\"offenceTitle\":\"Example Offense Title\",\"wording\":\"Example of the offense committed\",\"offenceLegislation\":\"Example legislation\",\"listingNumber\":1,\"judicialResults\":[],\"plea\":null,\"verdict\":null}],\"prosecutionCaseId\":\"00000000-0000-0000-0000-000000000000\",\"personDefendant\":{\"personDetails\":{\"gender\":\"MALE\",\"lastName\":\"Example Last Name\",\"middleName\":null,\"firstName\":\"Example First Name\",\"dateOfBirth\":\"2000-01-01\",\"address\":{\"address1\":null,\"address2\":null,\"address3\":null,\"address4\":null,\"address5\":null,\"postcode\":null},\"contact\":{\"home\":null,\"mobile\":\"07000000000\",\"work\":null},\"ethnicity\":{\"observedEthnicityDescription\":\"White\",\"selfDefinedEthnicityDescription\":\"British\"}}},\"legalEntityDefendant\":null,\"masterDefendantId\":\"00000000-0000-0000-0000-000000000000\",\"pncId\":\"00000000000A\",\"croNumber\":\"000000/00A\"}],\"caseStatus\":\"ACTIVE\",\"caseMarkers\":[]}]}}", | ||
"Timestamp": "2022-07-27T14:22:08.509Z", | ||
"SignatureVersion": "1", | ||
"Signature": "EXAMPLE", | ||
"SigningCertURL": "https://sns.eu-west-2.amazonaws.com/EXAMPLE.pem", | ||
"UnsubscribeURL": "https://sns.eu-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=EXAMPLE", | ||
"MessageAttributes": { | ||
"tracestate": { | ||
"Type": "String", | ||
"Value": "00-01a234b56c7de8f9g01h234i56789j0k-1l234m567n8o9p01-01" | ||
}, | ||
"eventType": { | ||
"Type": "String", | ||
"Value": "COMMON_PLATFORM_HEARING" | ||
}, | ||
"hearingEventType": { | ||
"Type": "String", | ||
"Value": "ConfirmedOrUpdated" | ||
}, | ||
"traceparent": { | ||
"Type": "String", | ||
"Value": "00-01a234b56c7de8f9g01h234i56789j0k-1l234m567n8o9p01-01" | ||
} | ||
} | ||
} |
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.