Package com.hybris.datahub.core.facades
Class ItemImportResult
java.lang.Object
de.hybris.platform.dataimportcommons.facades.DataItemImportResult<ImportError>
com.hybris.datahub.core.facades.ItemImportResult
- All Implemented Interfaces:
Serializable
Encapsulates result of importing the data.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPossible event status. -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates successful import result.Instantiates error result for a crashed import process.ItemImportResult(String msg) Instantiates error result for a crashed import process. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves all errors reported by the import process.Retrieves message of exception that happened during the import process.Return the status of anItemImportResultbased on whether the import had no errors or importExceptionMessage (SUCCESS), had errors but no importException (PARTIAL_SUCCESS), or had importException (FAILURE)booleanDetermines whether the item import ran successfully or not.toString()Methods inherited from class de.hybris.platform.dataimportcommons.facades.DataItemImportResult
addErrors, getImportExceptionMessage, isSuccess, setExceptionMessage
-
Constructor Details
-
ItemImportResult
public ItemImportResult()Instantiates successful import result. -
ItemImportResult
Instantiates error result for a crashed import process.- Parameters:
e- an exception that was intercepted from the import process.
-
ItemImportResult
Instantiates error result for a crashed import process.- Parameters:
msg- an error message explaining the problem with the import process.
-
-
Method Details
-
isSuccessful
public boolean isSuccessful()Determines whether the item import ran successfully or not.- Returns:
true, if import was successful;false, if the import crashed or there are rejected items.
-
getErrors
Retrieves all errors reported by the import process.- Returns:
- a collection of errors or an empty collection, if all items were successfully imported.
-
getExceptionMessage
Retrieves message of exception that happened during the import process.- Returns:
- an exception or
null, if there were no exception.
-
toString
- Overrides:
toStringin classDataItemImportResult<ImportError>
-
getStatus
Return the status of anItemImportResultbased on whether the import had no errors or importExceptionMessage (SUCCESS), had errors but no importException (PARTIAL_SUCCESS), or had importException (FAILURE)- Returns:
- The status of import
-
getExportErrorDatas
- Overrides:
getExportErrorDatasin classDataItemImportResult<ImportError>
-