X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=org.argeo.suite.workbench.rap%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fworkbench%2Fcommands%2FImportEntities.java;h=44bd81eddb77f6d532b2ddeeb2f2a85367cd7c05;hp=8f679be719a56905f5c0f6cea50b2f0ec3fd53da;hb=904e8d151fda67e17b232dfe561723bc0b1d98fd;hpb=361d28871743756fa4f12e4e50edaef8ead8c566 diff --git a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java index 8f679be..44bd81e 100644 --- a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java +++ b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java @@ -82,8 +82,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { } // TODO make this configurable - private final static String IMPORT_ENCODING = "ISO-8859-1";//"UTF-8"; - + private final static String IMPORT_ENCODING = "ISO-8859-1";// "UTF-8"; /* DEPENDENCY INJECTION */ private Repository repository; @@ -131,7 +130,8 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { @Override public boolean performFinish() { // Session session = null; - // String templateName = resourceTypeCombo.getItem(resourceTypeCombo.getSelectionIndex()); + // String templateName = + // resourceTypeCombo.getItem(resourceTypeCombo.getSelectionIndex()); // String type = KNOWN_TEMPLATES.get(templateName); importDefaultOrgFile(file); return true; @@ -148,7 +148,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { userInputPage.setErrorMessage("Please choose an entity type"); return false; } else if (file == null) { - userInputPage.setErrorMessage("Please upload a file1"); + userInputPage.setErrorMessage("Please upload a file"); return false; } else { userInputPage.setErrorMessage(null); @@ -364,12 +364,11 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { line = line.trim(); if (line.startsWith("https://www.facebook.com")) { - PeopleJcrUtils.createSocialMedia(peopleService, resourcesService, contactable, line, - !hasPrimaryFacebook, null, ContactValueCatalogs.CONTACT_CAT_FACEBOOK, null); + PeopleJcrUtils.createSocialMedia(resourcesService, peopleService, contactable, line, + !hasPrimaryFacebook, ContactValueCatalogs.CONTACT_CAT_FACEBOOK, null); hasPrimaryFacebook = true; } else { - PeopleJcrUtils.createWebsite(peopleService, resourcesService, contactable, line, !hasPrimary, null, - null); + PeopleJcrUtils.createWebsite(resourcesService, peopleService, contactable, line, !hasPrimary, null); hasPrimary = true; } } @@ -382,8 +381,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { if (EclipseUiUtils.isEmpty(line)) continue loop; line = line.trim(); - PeopleJcrUtils.createEmail(peopleService, resourcesService, contactable, line, !hasPrimary, null, null, - null); + PeopleJcrUtils.createEmail(resourcesService, peopleService, contactable, line, !hasPrimary, null, null); hasPrimary = true; } } @@ -443,15 +441,14 @@ public class ImportEntities extends AbstractHandler implements PeopleNames { String stStr = getStringValue(sheet, stIndex, i); String cStr = getStringValue(sheet, cIndex, i); if (notEmpty(streetStr) || notEmpty(pcStr) || notEmpty(lStr) || notEmpty(stStr) || notEmpty(cStr)) - PeopleJcrUtils.createAddress(peopleService, resourcesService, tmpOrg, streetStr, null, pcStr, lStr, - stStr, cStr, true, null, ContactValueCatalogs.CONTACT_CAT_MAIN, null); + PeopleJcrUtils.createAddress(resourcesService, peopleService, tmpOrg, streetStr, null, pcStr, lStr, + stStr, cStr, true, ContactValueCatalogs.CONTACT_CAT_MAIN, null); String mobileStr = getStringValue(sheet, mobileIndex, i); if (notEmpty(mobileStr)) - PeopleJcrUtils.createPhone(peopleService, resourcesService, tmpOrg, mobileStr, true, null, - ContactValueCatalogs.CONTACT_CAT_MOBILE, null); + PeopleJcrUtils.createPhone(resourcesService, peopleService, tmpOrg, mobileStr, true, null, null); String phoneStr = getStringValue(sheet, telephoneNumberIndex, i); if (notEmpty(phoneStr)) - PeopleJcrUtils.createPhone(peopleService, resourcesService, tmpOrg, phoneStr, true, null, + PeopleJcrUtils.createPhone(resourcesService, peopleService, tmpOrg, phoneStr, true, ContactValueCatalogs.CONTACT_CAT_DIRECT, null); String descStr = getStringValue(sheet, descriptionIndex, i); if (notEmpty(descStr))