Enum ErrorCode
- java.lang.Object
-
- java.lang.Enum<ErrorCode>
-
- de.hybris.platform.dataimportcommons.facades.ErrorCode
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANNOT_REMOVE_ITEMThe item cannot be deleted.HEADER_NOT_FOUNDThe header record for a data block is not recognized or not present.INVALID_DATA_FORMATThe provided value is not matching either the declared data type or the required format for the value.MISSING_REQUIRED_ATTRIBUTEAn error when one of the required attribute values is not present in the impex file.MORE_THAN_ONE_ITEM_FOUNDFinds more than one items to update matching the data row.NO_VARIANT_TYPEThe base product type cannot be resolved for a variant data record.NOT_ENOUGH_ATTRIBUTE_VALUESThe compound attribute value does not provide all parts of the value.NOT_EXISTING_ITEMThe item specified by a data row cannot be found in the system.REFERENCE_VIOLATIONThe attribute value referring another item or enum value does not exist.UNCLASSIFIEDIndicates a problem that could not be classified.UNIQUE_KEY_VIOLATIONThe item being imported violates a primary/unique key on already existing item.UNKNOWN_ATTRIBUTEIndicates that an attribute declared in the impex header does not exist.UNKNOWN_TYPEItem type specified in the impex block header does not exist in the system.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorCodeclassify(java.lang.String msg)Classifies the error based on the error message submitted.ErrorTypegetType()Retrieves type of this error code.static ErrorCodevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ErrorCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MISSING_REQUIRED_ATTRIBUTE
public static final ErrorCode MISSING_REQUIRED_ATTRIBUTE
An error when one of the required attribute values is not present in the impex file.
-
UNKNOWN_ATTRIBUTE
public static final ErrorCode UNKNOWN_ATTRIBUTE
Indicates that an attribute declared in the impex header does not exist.
-
NOT_EXISTING_ITEM
public static final ErrorCode NOT_EXISTING_ITEM
The item specified by a data row cannot be found in the system.
-
REFERENCE_VIOLATION
public static final ErrorCode REFERENCE_VIOLATION
The attribute value referring another item or enum value does not exist.
-
UNIQUE_KEY_VIOLATION
public static final ErrorCode UNIQUE_KEY_VIOLATION
The item being imported violates a primary/unique key on already existing item.
-
NOT_ENOUGH_ATTRIBUTE_VALUES
public static final ErrorCode NOT_ENOUGH_ATTRIBUTE_VALUES
The compound attribute value does not provide all parts of the value.
-
INVALID_DATA_FORMAT
public static final ErrorCode INVALID_DATA_FORMAT
The provided value is not matching either the declared data type or the required format for the value.
-
MORE_THAN_ONE_ITEM_FOUND
public static final ErrorCode MORE_THAN_ONE_ITEM_FOUND
Finds more than one items to update matching the data row.
-
UNKNOWN_TYPE
public static final ErrorCode UNKNOWN_TYPE
Item type specified in the impex block header does not exist in the system.
-
HEADER_NOT_FOUND
public static final ErrorCode HEADER_NOT_FOUND
The header record for a data block is not recognized or not present.
-
NO_VARIANT_TYPE
public static final ErrorCode NO_VARIANT_TYPE
The base product type cannot be resolved for a variant data record.
-
CANNOT_REMOVE_ITEM
public static final ErrorCode CANNOT_REMOVE_ITEM
The item cannot be deleted.
-
UNCLASSIFIED
public static final ErrorCode UNCLASSIFIED
Indicates a problem that could not be classified. This error code has no scope defined.
-
-
Method Detail
-
values
public static ErrorCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ErrorCode c : ErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ErrorCode valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
classify
public static ErrorCode classify(java.lang.String msg)
Classifies the error based on the error message submitted.- Parameters:
msg- an error message to analyze.- Returns:
- an error code matching the problem described by the message or
UNCLASSIFIEDerror, if the error could not be classified.
-
getType
public ErrorType getType()
Retrieves type of this error code.- Returns:
- type for this error code
-
-