public class ImportAccountsFromXlsController
extends org.openmdx.portal.servlet.AbstractWizardController
Modifier and Type | Class and Description |
---|---|
static class |
ImportAccountsFromXlsController.AccountRecord
AccountRecord
|
static class |
ImportAccountsFromXlsController.AccountRecordDefinition
AccountRecordDefinition
|
static class |
ImportAccountsFromXlsController.AccountType
AccountType
|
static class |
ImportAccountsFromXlsController.MapFieldContext
MapFieldContext
|
static class |
ImportAccountsFromXlsController.ProgressMeter
ProgressMeter
|
Modifier and Type | Field and Description |
---|---|
protected static NumberFormat |
DECIMAL_FORMAT_4 |
static String |
EOL_HTML |
static String |
EXTSTRING0PREFIX |
static String |
FEATURE_ACADEMICTITLE |
static String |
FEATURE_MEMBERROLE |
static String |
FEATURE_POSTALCOUNTRY_CODE |
static String |
FEATURE_SALUTATION_CODE |
static String |
LOCALE_SEPARATOR |
static String |
UPLOAD_FILE_FIELD_NAME |
Constructor and Description |
---|
ImportAccountsFromXlsController(boolean requiresAdminRole)
Constructor
|
Modifier and Type | Method and Description |
---|---|
LocalizedField |
createOrUpdateLocalizedField(LocalizedFieldContainer container,
String name,
String description,
short locale,
short usage,
String localizedValue)
Create or update localized field.
|
Member |
createOrUpdateMember(Account parentAccount,
Account memberAccount,
String keyMemberRole,
List<String> userStrings,
List<Short> userCodes,
List<BigDecimal> userNumbers,
String feature,
org.openmdx.portal.servlet.Codes codes,
Segment accountSegment)
Create or update member.
|
Note |
createOrUpdateNote(Account account,
String noteTitle,
String noteText)
Create or update note.
|
void |
doCancel()
Cancel action.
|
void |
doOK(Short locale,
String description)
OK action.
|
void |
doRefresh(Short locale,
String description)
Refresh action.
|
void |
doUpdateProgressMeter()
UpdateProgressMeter action.
|
List<AbstractGroup> |
findAbstractGroup(String name,
String aliasName,
String emailAddress,
String extString0,
boolean allowDtypeGroup,
boolean allowDtypeLegalEntity,
boolean allowDtypeUnspecifiedAccount,
Segment accountSegment)
Find group.
|
List<Contact> |
findContact(String firstName,
String lastName,
String aliasName,
String emailAddress,
String extString0,
Segment accountSegment)
Find contact.
|
Account |
findUniqueTargetAccount(String valueToMatch,
Segment accountSegment)
Find unique account.
|
org.openmdx.portal.servlet.DataBinding |
getCompositeObjectDataBinding(String type,
short usage,
String parameters,
org.openmdx.portal.servlet.DataBinding dataBinding)
Get data binding for CompositeObject.
|
org.openmdx.portal.servlet.DataBinding |
getEmailAddressDataBinding(short usage,
short emailType,
String parameters,
org.openmdx.portal.servlet.DataBinding dataBinding)
Get data binding for EmailAddress.
|
String |
getErrorMessage() |
short |
getLocale() |
org.openmdx.portal.servlet.DataBinding |
getPhoneNumberDataBinding(short usage,
String parameters,
org.openmdx.portal.servlet.DataBinding dataBinding)
Get data binding for PhoneNumber.
|
org.openmdx.portal.servlet.DataBinding |
getPostalAddressDataBinding(short usage,
String parameters,
org.openmdx.portal.servlet.DataBinding dataBinding)
Get data binding for PostalAddress.
|
String |
getSelectObjectHref(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
Get href of select object action.
|
void |
mapField(int nRow,
Account account,
ImportAccountsFromXlsController.AccountRecord accountRecord,
int fieldIndex,
String fieldName,
String fieldParameters,
Short fieldLocale,
Object fieldValue,
Segment accountSegment,
org.openmdx.portal.servlet.Codes codes,
org.openmdx.portal.servlet.ApplicationContext app,
ImportAccountsFromXlsController.MapFieldContext context)
Map field to account.
|
String |
normalizeMultiLineString(String s)
Normalize multi-line string.
|
Date |
parseDate(String s)
Parse date.
|
void |
performImport(Writer importReport,
ImportAccountsFromXlsController.ProgressMeter progressMeter)
Perform the import and generate report.
|
void |
readAccountRecord(org.apache.poi.ss.usermodel.Row row,
int nRow,
int maxCell,
ImportAccountsFromXlsController.AccountRecord record,
Writer importReport,
List<String> errors)
Read account record.
|
int |
readImportDefinition(org.apache.poi.ss.usermodel.Row row,
int nRow,
ImportAccountsFromXlsController.AccountRecordDefinition recordDefinition,
Writer importReport)
Read import definition (first row in excel sheet).
|
protected void |
setUserFields(CrxObject crxObject,
List<String> userStrings,
List<Short> userCodes,
List<BigDecimal> userNumbers)
Set user fields for CrxObject.
|
void |
updateAccount(ImportAccountsFromXlsController.AccountRecord accountRecord,
Account account,
Integer nRow,
org.openmdx.portal.servlet.Codes codes,
org.openmdx.portal.servlet.ApplicationContext app,
List<String> errors)
Map fields of account record to account.
|
close, forward, getApp, getCodes, getCommand, getCurrentView, getExitAction, getFieldLabel, getFirstParameterValue, getForm, getForms, getObject, getObjectIdentity, getParameterValues, getPm, getProviderName, getRequest, getRequestId, getRequestParameter, getSegmentName, getServletPath, getServletPathPrefix, getSession, getTexts, getToolTip, getWizardName, handle, init, initFormFields, prepare, setApp, setCodes, setCurrentView, setExitAction, setForms, setObject, setObjectIdentity, setPm, setProviderName, setRequest, setRequestId, setSegmentName, setSession, setTexts
public static final String FEATURE_POSTALCOUNTRY_CODE
public static final String FEATURE_SALUTATION_CODE
public static final String FEATURE_ACADEMICTITLE
public static final String FEATURE_MEMBERROLE
public static final String EXTSTRING0PREFIX
public static final String LOCALE_SEPARATOR
public static final String EOL_HTML
public static final String UPLOAD_FILE_FIELD_NAME
protected static NumberFormat DECIMAL_FORMAT_4
public ImportAccountsFromXlsController(boolean requiresAdminRole)
public List<Contact> findContact(String firstName, String lastName, String aliasName, String emailAddress, String extString0, Segment accountSegment)
firstName
- lastName
- aliasName
- emailAddress
- extString0
- accountSegment
- public List<AbstractGroup> findAbstractGroup(String name, String aliasName, String emailAddress, String extString0, boolean allowDtypeGroup, boolean allowDtypeLegalEntity, boolean allowDtypeUnspecifiedAccount, Segment accountSegment)
name
- aliasName
- emailAddress
- extString0
- allowDtypeGroup
- allowDtypeLegalEntity
- allowDtypeUnspecifiedAccount
- accountSegment
- public Account findUniqueTargetAccount(String valueToMatch, Segment accountSegment)
valueToMatch
- accountSegment
- protected void setUserFields(CrxObject crxObject, List<String> userStrings, List<Short> userCodes, List<BigDecimal> userNumbers)
crxObject
- userStrings
- userCodes
- userNumbers
- public Member createOrUpdateMember(Account parentAccount, Account memberAccount, String keyMemberRole, List<String> userStrings, List<Short> userCodes, List<BigDecimal> userNumbers, String feature, org.openmdx.portal.servlet.Codes codes, Segment accountSegment)
parentAccount
- memberAccount
- keyMemberRole
- feature
- codes
- accountSegment
- public LocalizedField createOrUpdateLocalizedField(LocalizedFieldContainer container, String name, String description, short locale, short usage, String localizedValue)
container
- name
- description
- locale
- usage
- localizedValue
- public Note createOrUpdateNote(Account account, String noteTitle, String noteText)
account
- noteTitle
- noteText
- public String getSelectObjectHref(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
object
- public int readImportDefinition(org.apache.poi.ss.usermodel.Row row, int nRow, ImportAccountsFromXlsController.AccountRecordDefinition recordDefinition, Writer importReport) throws IOException
row
- nRow
- maxCell
- recordDefinition
- IOException
public void readAccountRecord(org.apache.poi.ss.usermodel.Row row, int nRow, int maxCell, ImportAccountsFromXlsController.AccountRecord record, Writer importReport, List<String> errors) throws org.openmdx.base.exception.ServiceException, IOException
row
- nRow
- maxCell
- recordDefinition
- record
- org.openmdx.base.exception.ServiceException
IOException
public String normalizeMultiLineString(String s)
s
- public org.openmdx.portal.servlet.DataBinding getPostalAddressDataBinding(short usage, String parameters, org.openmdx.portal.servlet.DataBinding dataBinding)
parameters
- public org.openmdx.portal.servlet.DataBinding getPhoneNumberDataBinding(short usage, String parameters, org.openmdx.portal.servlet.DataBinding dataBinding)
parameters
- public org.openmdx.portal.servlet.DataBinding getEmailAddressDataBinding(short usage, short emailType, String parameters, org.openmdx.portal.servlet.DataBinding dataBinding)
usage
- parameters
- public org.openmdx.portal.servlet.DataBinding getCompositeObjectDataBinding(String type, short usage, String parameters, org.openmdx.portal.servlet.DataBinding dataBinding)
usage
- parameters
- public void mapField(int nRow, Account account, ImportAccountsFromXlsController.AccountRecord accountRecord, int fieldIndex, String fieldName, String fieldParameters, Short fieldLocale, Object fieldValue, Segment accountSegment, org.openmdx.portal.servlet.Codes codes, org.openmdx.portal.servlet.ApplicationContext app, ImportAccountsFromXlsController.MapFieldContext context) throws org.openmdx.base.exception.ServiceException
nRow
- account
- accountRecord
- fieldName
- fieldParameters
- fieldLocale
- fieldValue
- jsBuffer
- FIXED_MAPPED_ATTRIBUTES
- accountSegment
- codes
- app
- context
- org.openmdx.base.exception.ServiceException
public void updateAccount(ImportAccountsFromXlsController.AccountRecord accountRecord, Account account, Integer nRow, org.openmdx.portal.servlet.Codes codes, org.openmdx.portal.servlet.ApplicationContext app, List<String> errors) throws org.openmdx.base.exception.ServiceException
accountRecord
- contact
- nRow
- codes
- jsBuffer
- app
- org.openmdx.base.exception.ServiceException
public void doRefresh(Short locale, String description)
locale
- description
- public void doCancel()
public void doUpdateProgressMeter()
public void doOK(Short locale, String description) throws org.openmdx.base.exception.ServiceException
locale
- description
- org.openmdx.base.exception.ServiceException
public String getErrorMessage()
getErrorMessage
in class org.openmdx.portal.servlet.AbstractWizardController
public void performImport(Writer importReport, ImportAccountsFromXlsController.ProgressMeter progressMeter) throws org.openmdx.base.exception.ServiceException, IOException
org.openmdx.base.exception.ServiceException
IOException
public short getLocale()
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.