public class Consultant extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
IMPORT_EXCEPTION
When transaction time out.
|
static int |
IMPORT_FINISHED
When import finished.
|
static int |
IMPORT_RUNNING
When import running.
|
static int |
IMPORT_STARTING
When import finished.
|
static int |
IMPORT_TIMED_OUT
When transaction time out.
|
| Constructor and Description |
|---|
Consultant()
Creates new Consultant
|
| Modifier and Type | Method and Description |
|---|---|
void |
consultUser(TmpObject originalObject,
List<TmpObject> mergeResults)
Consult the user for a mergeresult choice.
|
boolean |
duplicatesFound()
Returns true if in a transaction duplicates are found.
|
boolean |
duplicatesResolved()
Returns true if the user has chosen a mergeresult.
|
int |
getChoice()
Returns the index of the mergeresult the user has chosen.
|
int |
getImportStatus()
Returns true if import has finished.
|
List<TmpObject> |
getMergeResults()
Returns the a list of merge results.
|
TmpObject |
getOriginalObject()
Returns the original object.
|
void |
init()
init all fields
|
boolean |
interactive()
Returns true if user has chosen interactive import mode.
|
static void |
logDebug(String source,
String message)
Add to log using debug.
|
static void |
logError(String source,
String message)
Add to log using error.
|
static void |
logInfo(String source,
String message)
Add to log using info.
|
static void |
logTrace(String source,
String message)
Add to log using trace.
|
void |
setChoice(int choice)
Sets the index of the mergeresult the user has chosen.
|
void |
setDuplicatesFound(boolean duplicatesFound)
sets the user chosen import mode
true if interactive false otherwise
|
void |
setImportStatus(int importStatus)
Sets the import status.
|
void |
setInteractive(boolean interactive)
Sets the user chosen import mode.
|
public static final int IMPORT_STARTING
public static final int IMPORT_RUNNING
public static final int IMPORT_FINISHED
public static final int IMPORT_TIMED_OUT
public static final int IMPORT_EXCEPTION
public void init()
public void consultUser(TmpObject originalObject, List<TmpObject> mergeResults)
originalObject - The original object.mergeResults - The merge results to choose from.public void setDuplicatesFound(boolean duplicatesFound)
duplicatesFound - Set true if duplicates are found. False otherwise.public boolean duplicatesFound()
public boolean duplicatesResolved()
public int getChoice()
public void setChoice(int choice)
choice - Sets the index of the mergeresult the user has chosen.public TmpObject getOriginalObject()
public List<TmpObject> getMergeResults()
public void setImportStatus(int importStatus)
importStatus - Set to a known import status.
See public static final int class variables.public int getImportStatus()
public void setInteractive(boolean interactive)
interactive - Set to true if user has chosen interactive importmode. Set false otherwise.public boolean interactive()
public static void logInfo(String source, String message)
source - Name of the message source.message - Text to add to log.public static void logError(String source, String message)
source - Name of the message source.message - Text to add to log.public static void logDebug(String source, String message)
source - Name of the message source.message - Text to add to log.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}