public class MemberImport
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
department |
protected java.lang.String |
email |
protected java.lang.String |
firstName |
protected java.util.Collection<java.lang.String> |
groupIds
A collection of Group's id.
|
protected boolean |
isBlockingError
True if any blocking error.
|
protected boolean |
isError
True if any error.
|
protected boolean |
isSimulation |
protected java.lang.String |
jobTitle |
protected java.lang.String |
login |
protected java.lang.String |
message
The information message.
|
protected java.lang.String |
mobile |
protected java.lang.String |
name |
protected java.lang.String |
organization |
protected java.lang.String |
phone |
static java.lang.String |
REVISION |
protected java.lang.String |
sourceLine
The source line.
|
protected ControllerStatus |
status
A custom integrity error message, or a JCMS integrity message.
|
protected java.lang.String |
userLang |
Constructor and Description |
---|
MemberImport(com.csvreader.CsvReader csvReader)
Constructor used to set this's members from a CsvReader.
|
MemberImport(int line,
java.lang.String sourceLine,
java.lang.String separator,
java.lang.String userLang)
Constructor used to keep trace of the source informations.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(MemberImport mbrImport)
Copy fields from given mbrImport to this instance.
|
java.lang.String |
getDepartment() |
java.lang.String |
getEmail() |
java.lang.String |
getFirstName() |
java.util.Collection<java.lang.String> |
getGroupIds() |
java.lang.String |
getJobTitle() |
int |
getLine() |
java.lang.String |
getLogin() |
Member |
getMember() |
java.lang.String |
getMessage() |
java.lang.String |
getMobile() |
java.lang.String |
getName() |
java.lang.String |
getOrganization() |
java.lang.String |
getPhone() |
java.lang.String |
getSourceLine() |
ControllerStatus |
getStatus() |
int |
getUsage() |
boolean |
isAccount() |
boolean |
isBlockingError() |
boolean |
isContact() |
boolean |
isCreate() |
boolean |
isError() |
boolean |
isSimulation() |
boolean |
isSuccess()
If import was successfull.
|
boolean |
isUpdate() |
boolean |
isUseMemberClass() |
boolean |
performSave(Member opAuthor)
Calls
Data.performCreate(Member, java.util.Map) , or Data.performUpdate(Member, java.util.Map) ,
depending on the Member already exist. |
void |
setBlockingError(boolean isBlockingError) |
void |
setDepartment(java.lang.String department) |
void |
setEmail(java.lang.String email) |
void |
setError(boolean isError) |
void |
setFirstName(java.lang.String firstName) |
void |
setGroupIds(java.util.Collection<java.lang.String> groupIds) |
void |
setJobTitle(java.lang.String jobTitle) |
void |
setLine(int line) |
void |
setLogin(java.lang.String login) |
void |
setMember(Member member) |
void |
setMessage(java.lang.String message) |
void |
setMobile(java.lang.String mobile) |
void |
setName(java.lang.String name) |
void |
setOrganization(java.lang.String organization) |
void |
setPhone(java.lang.String phone) |
void |
setSimulation(boolean isSimulation) |
void |
setSourceLine(java.lang.String sourceLine) |
void |
setStatus(ControllerStatus status) |
void |
setSuccess(boolean success) |
void |
setUsage(int usage) |
void |
setUseMemberClass(boolean useMemberClass) |
java.lang.String |
toString()
Used for debug purpose.
|
void |
updateMember()
Updates the associated Member's fields if mock Member's values are not empty.
|
protected void |
updateMemberGroups()
Add the Member to the optional Groups.
|
public static final java.lang.String REVISION
protected boolean isSimulation
protected boolean isError
protected boolean isBlockingError
protected ControllerStatus status
protected java.lang.String message
protected java.lang.String sourceLine
protected java.lang.String name
protected java.lang.String firstName
protected java.lang.String email
protected java.lang.String login
protected java.lang.String organization
protected java.lang.String department
protected java.lang.String jobTitle
protected java.lang.String phone
protected java.lang.String mobile
protected java.lang.String userLang
protected java.util.Collection<java.lang.String> groupIds
public MemberImport(int line, java.lang.String sourceLine, java.lang.String separator, java.lang.String userLang)
line
- : the corresponding line number in the .csv file.sourceLine
- : the corresponding line as source in the .csv file.separator
- The separator used to split CSV.userLang
- the user lang to use.public MemberImport(com.csvreader.CsvReader csvReader) throws java.io.IOException
csvReader
- the csv reader to use.java.io.IOException
- if an exception occurs on reading csvReader.public boolean isSimulation()
public void setSimulation(boolean isSimulation)
isSimulation
- the isSimulation to setpublic boolean isCreate()
public boolean isUpdate()
public boolean isError()
public void setError(boolean isError)
isError
- the isError to setpublic boolean isBlockingError()
public void setBlockingError(boolean isBlockingError)
isBlockingError
- the isBlockingError to setpublic ControllerStatus getStatus()
public void setStatus(ControllerStatus status)
status
- the status to setpublic int getLine()
public void setLine(int line)
line
- the line to setpublic java.lang.String getSourceLine()
public void setSourceLine(java.lang.String sourceLine)
sourceLine
- the sourceLine to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic java.lang.String getFirstName()
public void setFirstName(java.lang.String firstName)
firstName
- the firstName to setpublic java.lang.String getEmail()
public void setEmail(java.lang.String email)
email
- the email to setpublic java.lang.String getLogin()
public void setLogin(java.lang.String login)
login
- the login to setpublic java.lang.String getOrganization()
public void setOrganization(java.lang.String organization)
organization
- the organization to setpublic java.lang.String getDepartment()
public void setDepartment(java.lang.String department)
department
- the department to setpublic java.lang.String getJobTitle()
public void setJobTitle(java.lang.String jobTitle)
jobTitle
- the jobTitle to setpublic java.lang.String getPhone()
public void setPhone(java.lang.String phone)
phone
- the phone to setpublic java.lang.String getMobile()
public void setMobile(java.lang.String mobile)
mobile
- the mobile to setpublic java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- the message to setpublic Member getMember()
public void setMember(Member member)
member
- the member to setpublic java.util.Collection<java.lang.String> getGroupIds()
public void setGroupIds(java.util.Collection<java.lang.String> groupIds)
groupIds
- the groupIds to setpublic boolean isUseMemberClass()
public void setUseMemberClass(boolean useMemberClass)
useMemberClass
- true to use Member.class, false to use DBMember.class.public int getUsage()
public void setUsage(int usage)
usage
- the usage (Account or contact) for members to create to set.public boolean isAccount()
public boolean isContact()
public void setSuccess(boolean success)
success
- the success to setpublic boolean isSuccess()
public void updateMember()
protected void updateMemberGroups()
public void copy(MemberImport mbrImport)
mbrImport
- the MemberImport to use to feed this instance.public boolean performSave(Member opAuthor)
Data.performCreate(Member, java.util.Map)
, or Data.performUpdate(Member, java.util.Map)
,
depending on the Member already exist.opAuthor
- the Member performing the operation.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2001-2010 Jalios SA. All Rights Reserved.