Package org.openbravo.service.db
Class ClientImportProcessor
- java.lang.Object
-
- org.openbravo.service.db.ClientImportProcessor
-
- All Implemented Interfaces:
EntityXMLProcessor
public class ClientImportProcessor extends Object implements EntityXMLProcessor
This ImportProcessor is used during client import. It repairs the names of client, user and a number of other entities to prevent unique constraint violations during client import. ThereplaceValue(org.openbravo.base.structure.BaseOBObject, org.openbravo.base.model.Property, java.lang.Object)
method does not contain logic in this class.- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description ClientImportProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getNewName()
void
process(List<BaseOBObject> newObjects, List<BaseOBObject> updatedObjects)
This method is called after the import process has parsed the xml and created the in-memory object graph of objects which are inserted and updated in the database.protected String
replace(String currentValue, String orginalName)
Object
replaceValue(BaseOBObject owner, Property property, Object importedValue)
Always returns the importedValue without changing it.void
setNewName(String newName)
-
-
-
Method Detail
-
process
public void process(List<BaseOBObject> newObjects, List<BaseOBObject> updatedObjects)
Description copied from interface:EntityXMLProcessor
This method is called after the import process has parsed the xml and created the in-memory object graph of objects which are inserted and updated in the database. This method can access the database using the Data Access Layer. It will operate in the same transaction as the import process itself.- Specified by:
process
in interfaceEntityXMLProcessor
- Parameters:
newObjects
- the list of objects which will be inserted into the databaseupdatedObjects
- the list of objects which will be updated in the database- See Also:
EntityXMLProcessor.process(List, List)
-
replaceValue
public Object replaceValue(BaseOBObject owner, Property property, Object importedValue)
Always returns the importedValue without changing it.- Specified by:
replaceValue
in interfaceEntityXMLProcessor
- Parameters:
owner
- the owner object of the propertyproperty
- the property being setimportedValue
- the value converted from the import xml- Returns:
- a new value which is used by the import process
- See Also:
EntityXMLProcessor.replaceValue(BaseOBObject, Property, Object)
-
getNewName
public String getNewName()
-
setNewName
public void setNewName(String newName)
-
-