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:
java.io.Serializable
public class ItemImportResult extends DataItemImportResult<ImportError>
Encapsulates result of importing the data.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classItemImportResult.DatahubAdapterEventStatusPossible event status.
-
Constructor Summary
Constructors Constructor Description ItemImportResult()Instantiates successful import result.ItemImportResult(java.lang.Exception e)Instantiates error result for a crashed import process.ItemImportResult(java.lang.String msg)Instantiates error result for a crashed import process.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ImportError>getErrors()Retrieves all errors reported by the import process.java.lang.StringgetExceptionMessage()Retrieves message of exception that happened during the import process.java.util.List<ImportError>getExportErrorDatas()ItemImportResult.DatahubAdapterEventStatusgetStatus()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)booleanisSuccessful()Determines whether the item import ran successfully or not.java.lang.StringtoString()-
Methods inherited from class de.hybris.platform.dataimportcommons.facades.DataItemImportResult
addErrors, getImportExceptionMessage, isSuccess, setExceptionMessage
-
-
-
-
Constructor Detail
-
ItemImportResult
public ItemImportResult()
Instantiates successful import result.
-
ItemImportResult
public ItemImportResult(java.lang.Exception e)
Instantiates error result for a crashed import process.- Parameters:
e- an exception that was intercepted from the import process.
-
ItemImportResult
public ItemImportResult(java.lang.String msg)
Instantiates error result for a crashed import process.- Parameters:
msg- an error message explaining the problem with the import process.
-
-
Method Detail
-
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
public java.util.Collection<ImportError> 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
public java.lang.String getExceptionMessage()
Retrieves message of exception that happened during the import process.- Returns:
- an exception or
null, if there were no exception.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classDataItemImportResult<ImportError>
-
getStatus
public ItemImportResult.DatahubAdapterEventStatus 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
public java.util.List<ImportError> getExportErrorDatas()
- Overrides:
getExportErrorDatasin classDataItemImportResult<ImportError>
-
-