public interface

ImportContext

com.atlassian.bitbucket.migration.ImportContext

Class Overview

Allows the consumption of entries contained in an import archive.

Summary

Public Methods
void addError(KeyedMessage message, Object entity)
Report a failed import
void addError(KeyedMessage message, Object entity, Throwable t)
Report a failed import
void addWarning(KeyedMessage message, Object entity)
Report a warning during an import
void addWarning(KeyedMessage message, Object entity, Throwable t)
Report a warning during an import
@Nonnull AttributeMap getAttributeMap()
Returns the AttributeMap object for this context.
@Nonnull <T> EntityImportMapping<T> getEntityMapping(MigrationEntityType<T> entityType)
Returns the EntityImportMapping of the MigrationEntityType for this context.
boolean hasErrors()

Public Methods

public void addError (KeyedMessage message, Object entity)

Report a failed import

Parameters
message the failure message
entity the entity for which export failed

public void addError (KeyedMessage message, Object entity, Throwable t)

Report a failed import

Parameters
message the failure message
entity the entity for which export failed
t an optional Throwable for the warning

public void addWarning (KeyedMessage message, Object entity)

Report a warning during an import

Parameters
message the failure message
entity the entity for which export failed

public void addWarning (KeyedMessage message, Object entity, Throwable t)

Report a warning during an import

Parameters
message the failure message
entity the entity for which export failed
t an optional Throwable for the warning

@Nonnull public AttributeMap getAttributeMap ()

Returns the AttributeMap object for this context. This allows storage of attributes associated with this context for the lifetime of this context.

Returns
See Also

@Nonnull public EntityImportMapping<T> getEntityMapping (MigrationEntityType<T> entityType)

Returns the EntityImportMapping of the MigrationEntityType for this context. If the mapping does not exist for the type, it'll be created.

Parameters
entityType Entity type that this mapping should map
Returns

public boolean hasErrors ()

Returns