|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.applications.xmlimporter.Consultant
A Consultant object serves as the intermediary for communication between the thread that processes a transaction on one hand, and threads that handle interaction with the user on the other hand, to resolve ambiguity when more than one similar object is found to merge an object with. The processing thread should call:
| Field Summary | |
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 Summary | |
Consultant()
Creates new Consultant |
|
| Method Summary | |
void |
consultUser(TmpObject originalObject,
java.util.List 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. |
java.util.List |
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(java.lang.String source,
java.lang.String message)
Add to log using debug. |
static void |
logError(java.lang.String source,
java.lang.String message)
Add to log using error. |
static void |
logInfo(java.lang.String source,
java.lang.String message)
Add to log using info. |
static void |
logTrace(java.lang.String source,
java.lang.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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
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
| Constructor Detail |
public Consultant()
| Method Detail |
public void init()
public void consultUser(TmpObject originalObject,
java.util.List 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 java.util.List 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(java.lang.String source,
java.lang.String message)
source - Name of the message source.message - Text to add to log.
public static void logError(java.lang.String source,
java.lang.String message)
source - Name of the message source.message - Text to add to log.
public static void logDebug(java.lang.String source,
java.lang.String message)
source - Name of the message source.message - Text to add to log.
public static void logTrace(java.lang.String source,
java.lang.String message)
source - Name of the message source.message - Text to add to log.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||