}
// TODO make this configurable
- private final static String IMPORT_ENCODING = "ISO-8859-1";
+ private final static String IMPORT_ENCODING = "ISO-8859-1";// "UTF-8";
/* DEPENDENCY INJECTION */
private Repository repository;
@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;
}
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);
}
});
resourceTypeCombo.setItems(KNOWN_TEMPLATES.keySet().toArray(new String[0]));
+ resourceTypeCombo.select(0);
// File upload
Label lbl = new Label(composite, SWT.NONE);
if (EclipseUiUtils.notEmpty(lastName))
tmpPerson.setProperty(PEOPLE_LAST_NAME, lastName);
Node newPersonNode = peopleService.createEntity(targetParent, PeopleTypes.PEOPLE_PERSON, tmpPerson);
- if (EclipseUiUtils.notEmpty(position))
- PersonJcrUtils.addJob(newPersonNode, newOrgNode, position, true);
+ // if (EclipseUiUtils.notEmpty(position))
+ PersonJcrUtils.addJob(resourcesService, peopleService, newPersonNode, newOrgNode, position, true);
// Save the newly created entity without creating a base version
- newOrgNode = peopleService.saveEntity(newOrgNode, false);
+ newPersonNode = peopleService.saveEntity(newPersonNode, false);
}
}
stStr, cStr, true, null, 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(peopleService, resourcesService, tmpOrg, mobileStr, true, null, null,
+ null);
String phoneStr = getStringValue(sheet, telephoneNumberIndex, i);
if (notEmpty(phoneStr))
PeopleJcrUtils.createPhone(peopleService, resourcesService, tmpOrg, phoneStr, true, null,
String contactsStr = getStringValue(sheet, contactsIndex, i);
if (notEmpty(contactsStr))
importOrgEmployees(tmpParent, targetParent, newOrgNode, contactsStr);
-
}
} catch (PeopleException | RepositoryException e) {
throw new SuiteException("Cannot import mapping file, error at line: " + (i + 1), e);