generated from pagopa/pagopa-functions-template
-
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 #14 from pagopa/PRDP-70-single-template-implementa…
…tion [PRDP-70] feat: New single template implementation
- Loading branch information
Showing
38 changed files
with
1,000 additions
and
793 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
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
26 changes: 26 additions & 0 deletions
26
src/main/java/it/gov/pagopa/receipt/pdf/generator/exception/GeneratePDFException.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,26 @@ | ||
package it.gov.pagopa.receipt.pdf.generator.exception; | ||
|
||
/** Thrown in case an error occurred when generating a PDF Receipt */ | ||
public class GeneratePDFException extends PDFReceiptGenerationException { | ||
|
||
/** | ||
* Constructs new exception with provided message, status code and cause | ||
* | ||
* @param message Detail message | ||
* @param statusCode Error code | ||
* @param cause Exception thrown | ||
*/ | ||
public GeneratePDFException(String message, int statusCode, Throwable cause) { | ||
super(message, statusCode, cause); | ||
} | ||
|
||
/** | ||
* Constructs new exception with provided message, status code | ||
* | ||
* @param message Detail message | ||
* @param statusCode Error code | ||
*/ | ||
public GeneratePDFException(String message, int statusCode) { | ||
super(message, statusCode); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...ain/java/it/gov/pagopa/receipt/pdf/generator/exception/PDFReceiptGenerationException.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,34 @@ | ||
package it.gov.pagopa.receipt.pdf.generator.exception; | ||
|
||
/** Thrown in case an error occurred when generating or saving a PDF Receipt */ | ||
public class PDFReceiptGenerationException extends Exception { | ||
|
||
private final int statusCode; | ||
|
||
/** | ||
* Constructs new exception with provided message, status code and cause | ||
* | ||
* @param message Detail message | ||
* @param statusCode Error code | ||
* @param cause Exception thrown | ||
*/ | ||
public PDFReceiptGenerationException(String message, int statusCode, Throwable cause) { | ||
super(message, cause); | ||
this.statusCode = statusCode; | ||
} | ||
|
||
/** | ||
* Constructs new exception with provided message, status code | ||
* | ||
* @param message Detail message | ||
* @param statusCode Error code | ||
*/ | ||
public PDFReceiptGenerationException(String message, int statusCode) { | ||
super(message); | ||
this.statusCode = statusCode; | ||
} | ||
|
||
public int getStatusCode() { | ||
return statusCode; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/it/gov/pagopa/receipt/pdf/generator/exception/SavePDFToBlobException.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,26 @@ | ||
package it.gov.pagopa.receipt.pdf.generator.exception; | ||
|
||
/** Thrown in case an error occurred when saving a PDF Receipt to the Blob storage */ | ||
public class SavePDFToBlobException extends PDFReceiptGenerationException { | ||
|
||
/** | ||
* Constructs new exception with provided message, status code and cause | ||
* | ||
* @param message Detail message | ||
* @param statusCode Error code | ||
* @param cause Exception thrown | ||
*/ | ||
public SavePDFToBlobException(String message, int statusCode, Throwable cause) { | ||
super(message, statusCode, cause); | ||
} | ||
|
||
/** | ||
* Constructs new exception with provided message, status code | ||
* | ||
* @param message Detail message | ||
* @param statusCode Error code | ||
*/ | ||
public SavePDFToBlobException(String message, int statusCode) { | ||
super(message, statusCode); | ||
} | ||
} |
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
6 changes: 3 additions & 3 deletions
6
src/main/java/it/gov/pagopa/receipt/pdf/generator/model/PdfMetadata.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
Oops, something went wrong.