-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CB2-15349): Generate the VTG/VTP12 Documents (#141)
* feat(CB2-15349): Generate the VTG/VTP12 Documents * feat(CB2-15349): Added new tests for html testing, and vt12.hbs stylesheet build path fix * feat(CB2-15349): fixes for payload * feat(CB2-15349): removing print outs * feat(CB2-15349): adding new fields to match prototype: payload * feat(CB2-15349): fixes for the look of the VTP12 and VTG12 cert, also updating of tests * feat(CB2-15349): updating test and vbs for latest requested changes * feat(CB2-15349): removing fileoutput code and imports * feat(CB2-15349): minor coding changes * feat(CB2-15349): removing unneeded comment * feat(CB2-15349): re-ordering getters and setters * feat(CB2-15349): re-ordering getters and setters * feat(CB2-15349): re-ordering getters and setters * feat(CB2-15349): re-ordering getters and setters * feat(CB2-15349): re-ordering private and protected properties * feat(CB2-15349): re-ordering private and protected properties * feat(CB2-15349): fixes requested from reviews * feat(CB2-15349): better way of doing tests * feat(CB2-15349): improving tests * feat(CB2-15349): html change for correct title * feat(CB2-15349): fixes for 1998 text bug to 1988
- Loading branch information
1 parent
dd16f9e
commit fce23ba
Showing
18 changed files
with
1,034 additions
and
5 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
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
51 changes: 51 additions & 0 deletions
51
src/main/java/uk/gov/dvsa/model/cvs/AbandonedCertificate.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,51 @@ | ||
package uk.gov.dvsa.model.cvs; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import uk.gov.dvsa.model.Document; | ||
import uk.gov.dvsa.model.cvs.certificateData.AbandonedData; | ||
import uk.gov.dvsa.model.cvs.certificateData.Signature; | ||
|
||
public abstract class AbandonedCertificate extends Document { | ||
protected String regulationText; | ||
protected String vehicleTypeText; | ||
protected String titleTextIncludingRollingHeaders; | ||
protected String sectionTextRef; | ||
protected String formNumber; | ||
@JsonProperty("ABANDONED_DATA") | ||
private AbandonedData data; | ||
@JsonProperty("Signature") | ||
private Signature signature; | ||
|
||
public String getRegulationText() { return this.regulationText; } | ||
|
||
public String getVehicleTypeText() { return this.vehicleTypeText; } | ||
|
||
public String getTitleTextIncludingRollingHeaders() { | ||
return this.titleTextIncludingRollingHeaders; | ||
} | ||
|
||
public String getSectionTextRef() { return this.sectionTextRef; } | ||
|
||
public String getFormNumber() { return formNumber; } | ||
|
||
public AbandonedData getData() { | ||
return data; | ||
} | ||
|
||
public Signature getSignature() { | ||
return signature; | ||
} | ||
|
||
public Document setData(AbandonedData data) { | ||
this.data = data; | ||
return this; | ||
} | ||
|
||
public void setSignature(Signature signature) { | ||
this.signature = signature; | ||
} | ||
|
||
public String getDocumentType() { | ||
return this.getDocumentName().split("/")[1]; | ||
} | ||
} |
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 @@ | ||
package uk.gov.dvsa.model.cvs; | ||
|
||
public class VTG12 extends AbandonedCertificate { | ||
|
||
public VTG12() { | ||
super(); | ||
super.regulationText = "Regulations 7 and 8 of the Goods Vehicles (Plating and Testing) Regulations 1988 as Amended"; | ||
super.vehicleTypeText = "In respect of the goods vehicle with registration number / chassis serial number / trailer identification mark :"; | ||
super.titleTextIncludingRollingHeaders = "Goods Vehicle for Examination"; | ||
super.formNumber = "0440"; | ||
super.sectionTextRef = "49 and 51"; | ||
} | ||
} |
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 @@ | ||
package uk.gov.dvsa.model.cvs; | ||
|
||
public class VTP12 extends AbandonedCertificate { | ||
|
||
public VTP12() { | ||
super(); | ||
super.regulationText = "Regulation 13 of the Motor Vehicles (Tests) Regulations 1981 as amended"; | ||
super.vehicleTypeText = "In respect of the public service vehicle with registration number / chassis serial number :"; | ||
super.titleTextIncludingRollingHeaders = "Public Service Vehicle for Examination"; | ||
super.formNumber = "0453"; | ||
super.sectionTextRef = "45"; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
src/main/java/uk/gov/dvsa/model/cvs/certificateData/AbandonedData.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,68 @@ | ||
package uk.gov.dvsa.model.cvs.certificateData; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AbandonedData { | ||
@JsonProperty("RegistrationNumber") | ||
private String registrationNumber; | ||
@JsonProperty("ReasonsForRefusal") | ||
private String[] reasonsForRefusal; | ||
@JsonProperty("TestStationName") | ||
private String testStationName; | ||
@JsonProperty("TestStationPNumber") | ||
private String testStationPNumber; | ||
@JsonProperty("IssuersName") | ||
private String issuersName; | ||
@JsonProperty("AdditionalComments") | ||
private String additionalComments; | ||
@JsonProperty("DateOfTheTest") | ||
private String dateOfTheTest; | ||
|
||
public AbandonedData() { | ||
} | ||
|
||
public AbandonedData(String registrationNumber, | ||
String[] reasonsForRefusal, | ||
String dateOfTheTest, | ||
String testStationName, | ||
String testStationPNumber, | ||
String issuersName, | ||
String additionalComments) { | ||
this.registrationNumber = registrationNumber; | ||
this.reasonsForRefusal = reasonsForRefusal; | ||
this.dateOfTheTest = dateOfTheTest; | ||
this.testStationName = testStationName; | ||
this.testStationPNumber = testStationPNumber; | ||
this.issuersName = issuersName; | ||
this.additionalComments = additionalComments; | ||
} | ||
|
||
public String[] getRegistrationNumber() { | ||
return registrationNumber.split(""); | ||
} | ||
|
||
public String[] getReasonsForRefusal() { | ||
return reasonsForRefusal; | ||
} | ||
|
||
public String getTestStationName() { | ||
return testStationName; | ||
} | ||
|
||
public String getTestStationPNumber() { | ||
return testStationPNumber; | ||
} | ||
|
||
public String getIssuersName() { | ||
return issuersName; | ||
} | ||
|
||
public String getAdditionalComments() { | ||
return additionalComments; | ||
} | ||
|
||
public String getDateOfTheTest() { | ||
return dateOfTheTest; | ||
} | ||
|
||
} |
Oops, something went wrong.