org.mmbase.applications.xmlimporter
Class InteractiveTransaction
java.lang.Object
org.mmbase.applications.xmlimporter.Transaction
org.mmbase.applications.xmlimporter.InteractiveTransaction
- All Implemented Interfaces:
- Runnable
- public class InteractiveTransaction
- extends Transaction
Extended from Transaction for interactive handling of dulpicates.
- Since:
- MMBase-1.5
- Version:
- $Id: InteractiveTransaction.java,v 1.3 2003/03/07 08:50:02 pierre Exp $
| Methods inherited from class org.mmbase.applications.xmlimporter.Transaction |
accessObject, appendReportBuffer, caculateMerge, commit, createObject, createRelation, createTransaction, createTransaction, delete, deleteObject, equalRelations, getAccessObject, getKey, getMergedObject, getRelations, getTmpObjects, leave, markDeleteObject, merge, mergeObjects, openObject, openTransaction, run, start, stillExists, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InteractiveTransaction
protected InteractiveTransaction(UserTransactionInfo uti,
String key,
String id,
boolean commitOnClose,
long timeOut,
File reportFile,
Consultant consultant)
- Creates new InteractiveTransaction.
- Parameters:
timeOut - if the transactions is not finished after the timeout
(in seconds) the transaction is cancelled.uti - transaction info for current user.key - TransactionManager key for this transaction.id - TransactionHandler id for this transactions.commitOnClose - - The user-specified commit-on-close setting.
True if this transaction is to be committed
when the user leaves it's context, false otherwise.reportFile - The file to use as duplicates file.consultant - The intermediate import object. Used to set and get status from and set and get objects to and from.
handleDuplicates
protected boolean handleDuplicates(TmpObject tempObj,
List similarObjects,
ObjectMerger merger)
throws TransactionHandlerException
- Handles sitiuations where more then one similar objects are found to
merge with. This implementation confronts the user with the merge results.
The user can choose which result is preferred. The preferred result is
used to merge with.
- Overrides:
handleDuplicates in class Transaction
- Parameters:
tempObj - the original objectsimilarObjects - the similar objectsmerger - the merger
- Returns:
- True if duplicates are resolved.
Throws TransactionHandlerException When failing to resolve
the duplicates by consulting the user.
- Throws:
TransactionHandlerException - When a failure occurred.
MMBase build 1.8.1.20060716