forked from mosip/packet-manager
-
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.
Taken latest changes from 1.2.0-rc2 (mosip#21)
* Created 1.2.0-rc2 (mosip#23) Co-authored-by: Monobikash Das <M1045447@mindtree.com> * MOSIP-15420: Upgraded swagger2.0 to openapi3.0 for packet manager service (mosip#31) Resolved merge conflict * Added logger and fixed test cases (mosip#32) Co-authored-by: Monobikash Das <M1045447@mindtree.com> * MOSIP-15420: Generated openapi.json for packet manager service (mosip#34) * MOSIP-15420: Upgraded swagger2.0 to openapi3.0 for packet manager service Resolved merge conflict * MOSIP-15420: Generated openapi.json for packet manager service Resolved merge conflicts * MOSIP-18453 : improved usage of caching (mosip#36) Co-authored-by: Monobikash Das <M1045447@mindtree.com> * Added sonar_analysis * MOSIP-18450 : added exception for objects not available in minio (mosip#37) * MOSIP-18450 : added exception for objects not available in minio * Added sonar_analysis * MOSIP-18910 : fixed refNumber issue in DocumentDto * MOSIP-18450 : added exception for objects not available in minio * MOSIP-18910 : fixed refNumber issue in DocumentDto * initial change * MOSIP-18450 : added exception for objects not available in minio * MOSIP-18910 : fixed refNumber issue in DocumentDto * initial change * MOSIP-18793 :Added afterburner + fixes Co-authored-by: Monobikash Das <M1045447@mindtree.com> Co-authored-by: Rakshitha650 <76676196+Rakshitha650@users.noreply.github.com> Co-authored-by: Mandeep Dhiman <46880392+mandeepdhiman123@users.noreply.github.com> Co-authored-by: Admin <Admin@MONOBIKASH> * Mosip:15286 Changed openapi.json name. * updated the Sonar_analysis code and removed the Dskiptests * updated the Sonar_analysis code and removed the Dskiptests * added gpg keys Co-authored-by: Monobikash Das <M1045447@mindtree.com> Co-authored-by: kameshsr <47484458+kameshsr@users.noreply.github.com> Co-authored-by: Rakshitha650 <76676196+Rakshitha650@users.noreply.github.com> Co-authored-by: Mandeep Dhiman <46880392+mandeepdhiman123@users.noreply.github.com> Co-authored-by: Admin <Admin@MONOBIKASH> Co-authored-by: Rakshith650 <rakshitham38@gmail.com> Signed-off-by: Sowmya Ujjappa Banakar <sowmya.61022006@ltimindtree.com>
- Loading branch information
1 parent
ea6f9c3
commit 12e37fd
Showing
25 changed files
with
1,300 additions
and
1,090 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
105 changes: 53 additions & 52 deletions
105
...cket-manager/src/main/java/io/mosip/commons/packet/constants/PacketUtilityErrorCodes.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,52 +1,53 @@ | ||
package io.mosip.commons.packet.constants; | ||
|
||
public enum PacketUtilityErrorCodes { | ||
|
||
UNKNOWN_RESOURCE_EXCEPTION("KER-PUT-001", | ||
"Unknown resource provided"), | ||
FILE_NOT_FOUND_IN_DESTINATION("KER-PUT-002", "Unable to Find File in Destination Folder"), | ||
PACKET_DECRYPTION_FAILURE_EXCEPTION("KER-PUT-003", "Packet decryption failed"), | ||
API_NOT_ACCESSIBLE_EXCEPTION("KER-PUT-005", "API not accessible"), | ||
SYS_IO_EXCEPTION("KER-PUT-004", "Unable to Find File in Destination Folder"), | ||
GET_ALL_IDENTITY_EXCEPTION("KER-PUT-005", "Unable to fetch identity json from all sub packets"), | ||
NO_AVAILABLE_PROVIDER("KER-PUT-006", "No available provider for given source and process"), | ||
BIOMETRIC_FIELDNAME_NOT_FOUND("KER-PUT-007", "Biometric fieldname is not present inside packet"), | ||
GET_ALL_METAINFO_EXCEPTION("KER-PUT-008", "Unable to fetch meta information from all sub packets"), | ||
ZIP_PARSING_EXCEPTION("KER-PUT-009", "Unable to parse the zip"), | ||
SIGNATURE_EXCEPTION("KER-PUT-010", "Failed to generate digital signature"), | ||
DOCUMENT_EXCEPTION("KER-PUT-011", "Failed to get document"), | ||
BIOMETRIC_EXCEPTION("KER-PUT-012", "Unable to get biometric"), | ||
OS_ADAPTER_EXCEPTION("KER-PUT-013", "No Object store adapter found."), | ||
PACKET_KEEPER_GET_ERROR("KER-PUT-014", "Packet keeper exception occured."), | ||
PACKET_KEEPER_PUT_ERROR("KER-PUT-015", "Packet keeper exception occured."), | ||
PACKET_KEEPER_GETMETA_ERROR("KER-PUT-016", "Packet keeper exception occured."), | ||
PACKET_KEEPER_INTEGRITY_ERROR("KER-PUT-017", "Packet keeper exception occured."), | ||
CRYPTO_EXCEPTION("KER-PUT-018", "No available crypto service exception."), | ||
INTEGRITY_FAILURE("KER-PUT-019", "Packet Integrity check failed."), | ||
PACKET_VALIDATION_FAILED("KER-PUT-020", "Packet Validation exception occured."), | ||
TAGGING_FAILED("KER-PUT-021", "Failed to add tags."), | ||
TAG_ALREADY_EXIST("KER-PUT-022", "Tag Already Exist."), | ||
GET_TAG_EXCEPTION("KER-PUT-023","Failed to get tags"), | ||
TAG_NOT_FOUND("KER-PUT-024", "Requested tag not present"), | ||
SOURCE_NOT_PRESENT("KER-PUT-025", "Source not present in request."), | ||
DELETE_TAGGING_FAILED("KER-PUT-026", "Failed to delete tags."); | ||
|
||
|
||
|
||
|
||
private final String errorCode; | ||
private final String errorMessage; | ||
|
||
private PacketUtilityErrorCodes(final String errorCode, final String errorMessage) { | ||
this.errorCode = errorCode; | ||
this.errorMessage = errorMessage; | ||
} | ||
|
||
public String getErrorCode() { | ||
return errorCode; | ||
} | ||
|
||
public String getErrorMessage() { | ||
return errorMessage; | ||
} | ||
} | ||
package io.mosip.commons.packet.constants; | ||
|
||
public enum PacketUtilityErrorCodes { | ||
|
||
UNKNOWN_RESOURCE_EXCEPTION("KER-PUT-001", | ||
"Unknown resource provided"), | ||
FILE_NOT_FOUND_IN_DESTINATION("KER-PUT-002", "Unable to Find File in Destination Folder"), | ||
PACKET_DECRYPTION_FAILURE_EXCEPTION("KER-PUT-003", "Packet decryption failed"), | ||
API_NOT_ACCESSIBLE_EXCEPTION("KER-PUT-005", "API not accessible"), | ||
SYS_IO_EXCEPTION("KER-PUT-004", "Unable to Find File in Destination Folder"), | ||
GET_ALL_IDENTITY_EXCEPTION("KER-PUT-005", "Unable to fetch identity json from all sub packets"), | ||
NO_AVAILABLE_PROVIDER("KER-PUT-006", "No available provider for given source and process"), | ||
BIOMETRIC_FIELDNAME_NOT_FOUND("KER-PUT-007", "Biometric fieldname is not present inside packet"), | ||
GET_ALL_METAINFO_EXCEPTION("KER-PUT-008", "Unable to fetch meta information from all sub packets"), | ||
ZIP_PARSING_EXCEPTION("KER-PUT-009", "Unable to parse the zip"), | ||
SIGNATURE_EXCEPTION("KER-PUT-010", "Failed to generate digital signature"), | ||
DOCUMENT_EXCEPTION("KER-PUT-011", "Failed to get document"), | ||
BIOMETRIC_EXCEPTION("KER-PUT-012", "Unable to get biometric"), | ||
OS_ADAPTER_EXCEPTION("KER-PUT-013", "No Object store adapter found."), | ||
PACKET_KEEPER_GET_ERROR("KER-PUT-014", "Packet keeper exception occured."), | ||
PACKET_KEEPER_PUT_ERROR("KER-PUT-015", "Packet keeper exception occured."), | ||
PACKET_KEEPER_GETMETA_ERROR("KER-PUT-016", "Packet keeper exception occured."), | ||
PACKET_KEEPER_INTEGRITY_ERROR("KER-PUT-017", "Packet keeper exception occured."), | ||
CRYPTO_EXCEPTION("KER-PUT-018", "No available crypto service exception."), | ||
INTEGRITY_FAILURE("KER-PUT-019", "Packet Integrity check failed."), | ||
PACKET_VALIDATION_FAILED("KER-PUT-020", "Packet Validation exception occured."), | ||
TAGGING_FAILED("KER-PUT-021", "Failed to add tags."), | ||
TAG_ALREADY_EXIST("KER-PUT-022", "Tag Already Exist."), | ||
GET_TAG_EXCEPTION("KER-PUT-023","Failed to get tags"), | ||
TAG_NOT_FOUND("KER-PUT-024", "Requested tag not present"), | ||
SOURCE_NOT_PRESENT("KER-PUT-025", "Invalid source or process."), | ||
DELETE_TAGGING_FAILED("KER-PUT-026", "Failed to delete tags."), | ||
OBJECT_DOESNOT_EXISTS("KER-PUT-027", "Object doesnot exists."),; | ||
|
||
|
||
|
||
|
||
private final String errorCode; | ||
private final String errorMessage; | ||
|
||
private PacketUtilityErrorCodes(final String errorCode, final String errorMessage) { | ||
this.errorCode = errorCode; | ||
this.errorMessage = errorMessage; | ||
} | ||
|
||
public String getErrorCode() { | ||
return errorCode; | ||
} | ||
|
||
public String getErrorMessage() { | ||
return errorMessage; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...manager/src/main/java/io/mosip/commons/packet/exception/ObjectDoesnotExistsException.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 io.mosip.commons.packet.exception; | ||
|
||
import io.mosip.commons.packet.constants.PacketUtilityErrorCodes; | ||
import io.mosip.kernel.core.exception.BaseUncheckedException; | ||
|
||
public class ObjectDoesnotExistsException extends BaseUncheckedException { | ||
|
||
public ObjectDoesnotExistsException() { | ||
super(PacketUtilityErrorCodes.OBJECT_DOESNOT_EXISTS.getErrorCode(), | ||
PacketUtilityErrorCodes.OBJECT_DOESNOT_EXISTS.getErrorMessage()); | ||
} | ||
|
||
public ObjectDoesnotExistsException(String message) { | ||
super(PacketUtilityErrorCodes.OBJECT_DOESNOT_EXISTS.getErrorCode(), | ||
message); | ||
} | ||
|
||
public ObjectDoesnotExistsException(Throwable e) { | ||
super(PacketUtilityErrorCodes.OBJECT_DOESNOT_EXISTS.getErrorCode(), | ||
PacketUtilityErrorCodes.OBJECT_DOESNOT_EXISTS.getErrorMessage(), e); | ||
} | ||
|
||
public ObjectDoesnotExistsException(String errorMessage, Throwable t) { | ||
super(PacketUtilityErrorCodes.OBJECT_DOESNOT_EXISTS.getErrorCode(), errorMessage, t); | ||
} | ||
} |
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.