Update of
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/forms
In directory james.mmbase.org:/tmp/cvs-serv1017/community/forms
Modified Files:
ReferenceImportExportAction.java
Log Message:
CMSC-947, Improve the newletter import/export into a generic community
import/export,fix overwrite bug
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/forms
See also: http://www.mmbase.org/jira/browse/CMSC-947
Index: ReferenceImportExportAction.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/forms/ReferenceImportExportAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ReferenceImportExportAction.java 15 Jul 2008 12:10:20 -0000 1.1
+++ ReferenceImportExportAction.java 19 Sep 2008 07:59:31 -0000 1.2
@@ -81,18 +81,10 @@
}
for (PersonExportImportVO importPerson : xpersons) {
Authentication
authentication=importPerson.getAuthentication();
- if(null ==
authentication||null==authentication.getUserId()){
+ if(null ==
authentication||null==authentication.getUserId()||StringUtils.isWhitespace(authentication.getPassword())){
continue;
}
- Person p =
personService.getPersonByUserId(importPerson.getAuthentication().getUserId());
- if(null!=p&&"over".equals(level)){
- deleteRecord(p);
- addNewRecord(importPerson);
- }
- if(null==p){
- // only add new users
- addNewRecord(importPerson);
- }
+ personService.addRelationRecord(level, importPerson);
}
}
@@ -100,14 +92,6 @@
personService.batchClean();
}
- private void deleteRecord(Person dataPerson) {
- Long id = dataPerson.getAuthenticationId();
- personService.deleteRelationRecord(id);
- }
-
- private void addNewRecord(PersonExportImportVO xperson) {
- personService.creatRelationRecord(xperson);
- }
private XStream getXStream() {
XStream xstream = new XStream(new DomDriver());
xstream.alias("community-export", CommunityExport.class);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs