Package com.helger.peppol.sbdh
Enum EPeppolSBDHDataError
- All Implemented Interfaces:
com.helger.commons.id.IHasID<String>,Serializable,Comparable<EPeppolSBDHDataError>,java.lang.constant.Constable
public enum EPeppolSBDHDataError
extends Enum<EPeppolSBDHDataError>
implements com.helger.commons.id.IHasID<String>
This enum contains all the errors that can occur during SBD reading
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe "BusinessScope" element is missingThis is a fallback error code, in case the ID cannot be resolved to a proper other error code.The main business message is invalidThe provided C1 country code is invalidThe value of the "DocumentIdentification/CreationDateAndTime" element is invalidThe provided document type identifier is invalidThe "HeaderVersion" element has an illegal valueThe value of the "DocumentIdentification/InstanceIdentifier" element is invalidThe provided process identifier is invalidThe "Receiver/Identifier/Authority" attribute has an invalid valueNot exactly one "Receiver" element is presentThe "Receiver/Identifier" has an invalid valueFailed to interpret StandardBusinessDocument as XMLAt least two "BusinessScope/Scope" elements must be presentThe "Sender/Identifier/Authority" attribute has an invalid valueNot exactly one "Sender" element is presentThe "Sender/Identifier" has an invalid valueThe value of the "DocumentIdentification/Standard" element is invalidThe value of the "DocumentIdentification/Type" element is invalidThe value of the "DocumentIdentification/TypeVersion" element is invalidThe C1 country code is missingThe document type identifier is missingThe process identifier is missingThe StandardBusinessDocumentHeader element is not present -
Method Summary
Modifier and TypeMethodDescriptiongetErrorMessage(Object... aArgs) static EPeppolSBDHDataErrorgetFromIDOrDefault(String sID, EPeppolSBDHDataError eDefault) static EPeppolSBDHDataErrorgetFromIDOrNull(String sID) getID()static EPeppolSBDHDataErrorReturns the enum constant of this type with the specified name.static EPeppolSBDHDataError[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INVALID_SBD_XML
Failed to interpret StandardBusinessDocument as XML -
MISSING_SBDH
The StandardBusinessDocumentHeader element is not present -
INVALID_HEADER_VERSION
The "HeaderVersion" element has an illegal value -
INVALID_SENDER_COUNT
Not exactly one "Sender" element is present -
INVALID_SENDER_AUTHORITY
The "Sender/Identifier/Authority" attribute has an invalid value -
INVALID_SENDER_VALUE
The "Sender/Identifier" has an invalid value -
INVALID_RECEIVER_COUNT
Not exactly one "Receiver" element is present -
INVALID_RECEIVER_AUTHORITY
The "Receiver/Identifier/Authority" attribute has an invalid value -
INVALID_RECEIVER_VALUE
The "Receiver/Identifier" has an invalid value -
BUSINESS_SCOPE_MISSING
The "BusinessScope" element is missing -
INVALID_SCOPE_COUNT
At least two "BusinessScope/Scope" elements must be present -
INVALID_DOCUMENT_TYPE_IDENTIFIER
The provided document type identifier is invalid -
INVALID_PROCESS_IDENTIFIER
The provided process identifier is invalid -
INVALID_COUNTRY_C1
The provided C1 country code is invalid -
MISSING_DOCUMENT_TYPE_IDENTIFIER
The document type identifier is missing -
MISSING_PROCESS_IDENTIFIER
The process identifier is missing -
MISSING_COUNTRY_C1
The C1 country code is missing -
INVALID_BUSINESS_MESSAGE
The main business message is invalid -
INVALID_STANDARD
The value of the "DocumentIdentification/Standard" element is invalid -
INVALID_TYPE_VERSION
The value of the "DocumentIdentification/TypeVersion" element is invalid -
INVALID_TYPE
The value of the "DocumentIdentification/Type" element is invalid -
INVALID_INSTANCE_IDENTIFIER
The value of the "DocumentIdentification/InstanceIdentifier" element is invalid -
INVALID_CREATION_DATE_TIME
The value of the "DocumentIdentification/CreationDateAndTime" element is invalid -
GENERIC_SBDH_ERROR
This is a fallback error code, in case the ID cannot be resolved to a proper other error code.- Since:
- 9.1.4
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getID
- Specified by:
getIDin interfacecom.helger.commons.id.IHasID<String>
-
getErrorMessage
- Returns:
- The English error message
-
getErrorMessage
- Parameters:
aArgs- The arguments to format with. May neither benullnor empty.- Returns:
- The English error message, formatted with parameters.
-
getFromIDOrNull
-
getFromIDOrDefault
@Nullable public static EPeppolSBDHDataError getFromIDOrDefault(@Nullable String sID, @Nullable EPeppolSBDHDataError eDefault)
-