Class MemberImport

    • Field Detail

      • isSimulation

        protected boolean isSimulation
      • isError

        protected boolean isError
        True if any error.
      • status

        protected ControllerStatus status
        A custom integrity error message, or a JCMS integrity message.
      • message

        protected java.lang.String message
        The information message.
      • sourceLine

        protected java.lang.String sourceLine
        The source line.
      • name

        protected java.lang.String name
      • firstName

        protected java.lang.String firstName
      • email

        protected java.lang.String email
      • login

        protected java.lang.String login
      • organization

        protected java.lang.String organization
      • department

        protected java.lang.String department
      • jobTitle

        protected java.lang.String jobTitle
      • phone

        protected java.lang.String phone
      • mobile

        protected java.lang.String mobile
      • street

        protected java.lang.String street
      • postalCode

        protected java.lang.String postalCode
      • poBox

        protected java.lang.String poBox
      • region

        protected java.lang.String region
      • locality

        protected java.lang.String locality
      • country

        protected java.lang.String country
      • userLang

        protected java.lang.String userLang
      • groupIds

        protected java.util.Collection<java.lang.String> groupIds
        A collection of Group's id.
        Since:
        jcms-10.0.8
    • Constructor Detail

      • MemberImport

        public MemberImport​(int line,
                            java.lang.String sourceLine,
                            java.lang.String separator,
                            java.lang.String userLang)
        Constructor used to keep trace of the source informations.
        Parameters:
        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.
        Since:
        jcms-10.0.8
      • MemberImport

        public MemberImport​(com.csvreader.CsvReader csvReader)
                     throws java.io.IOException
        Constructor used to set this's members from a CsvReader.
        Parameters:
        csvReader - the csv reader to use.
        Throws:
        java.io.IOException - if an exception occurs on reading csvReader.
        Since:
        jcms-10.0.8
    • Method Detail

      • isSimulation

        public boolean isSimulation()
        Returns:
        the isSimulation
        Since:
        jcms-10.0.8
      • setSimulation

        public void setSimulation​(boolean isSimulation)
        Parameters:
        isSimulation - the isSimulation to set
        Since:
        jcms-10.0.8
      • isCreate

        public boolean isCreate()
        Returns:
        the isCreate
        Since:
        jcms-10.0.8
      • isUpdate

        public boolean isUpdate()
        Returns:
        the isUpdate
        Since:
        jcms-10.0.8
      • isError

        public boolean isError()
        Returns:
        the isError
        Since:
        jcms-10.0.8
      • setError

        public void setError​(boolean isError)
        Parameters:
        isError - the isError to set
        Since:
        jcms-10.0.8
      • getStatus

        public ControllerStatus getStatus()
        Returns:
        the status
        Since:
        jcms-10.0.8
      • setStatus

        public void setStatus​(ControllerStatus status)
        Parameters:
        status - the status to set
        Since:
        jcms-10.0.8
      • getLine

        public int getLine()
        Returns:
        the line
        Since:
        jcms-10.0.8
      • setLine

        public void setLine​(int line)
        Parameters:
        line - the line to set
        Since:
        jcms-10.0.8
      • getSourceLine

        public java.lang.String getSourceLine()
        Returns:
        the sourceLine
        Since:
        jcms-10.0.8
      • setSourceLine

        public void setSourceLine​(java.lang.String sourceLine)
        Parameters:
        sourceLine - the sourceLine to set
        Since:
        jcms-10.0.8
      • getName

        public java.lang.String getName()
        Returns:
        the name
        Since:
        jcms-10.0.8
      • setName

        public void setName​(java.lang.String name)
        Parameters:
        name - the name to set
        Since:
        jcms-10.0.8
      • getFirstName

        public java.lang.String getFirstName()
        Returns:
        the firstName
        Since:
        jcms-10.0.8
      • setFirstName

        public void setFirstName​(java.lang.String firstName)
        Parameters:
        firstName - the firstName to set
        Since:
        jcms-10.0.8
      • getEmail

        public java.lang.String getEmail()
        Returns:
        the email
        Since:
        jcms-10.0.8
      • setEmail

        public void setEmail​(java.lang.String email)
        Parameters:
        email - the email to set
        Since:
        jcms-10.0.8
      • getLogin

        public java.lang.String getLogin()
        Returns:
        the login
        Since:
        jcms-10.0.8
      • setLogin

        public void setLogin​(java.lang.String login)
        Parameters:
        login - the login to set
        Since:
        jcms-10.0.8
      • getOrganization

        public java.lang.String getOrganization()
        Returns:
        the organization
        Since:
        jcms-10.0.8
      • setOrganization

        public void setOrganization​(java.lang.String organization)
        Parameters:
        organization - the organization to set
        Since:
        jcms-10.0.8
      • getDepartment

        public java.lang.String getDepartment()
        Returns:
        the department
        Since:
        jcms-10.0.8
      • setDepartment

        public void setDepartment​(java.lang.String department)
        Parameters:
        department - the department to set
        Since:
        jcms-10.0.8
      • getJobTitle

        public java.lang.String getJobTitle()
        Returns:
        the jobTitle
        Since:
        jcms-10.0.8
      • setJobTitle

        public void setJobTitle​(java.lang.String jobTitle)
        Parameters:
        jobTitle - the jobTitle to set
        Since:
        jcms-10.0.8
      • getPhone

        public java.lang.String getPhone()
        Returns:
        the phone
        Since:
        jcms-10.0.8
      • setPhone

        public void setPhone​(java.lang.String phone)
        Parameters:
        phone - the phone to set
        Since:
        jcms-10.0.8
      • getMobile

        public java.lang.String getMobile()
        Returns:
        the mobile
        Since:
        jcms-10.0.8
      • setMobile

        public void setMobile​(java.lang.String mobile)
        Parameters:
        mobile - the mobile to set
        Since:
        jcms-10.0.8
      • getStreet

        public java.lang.String getStreet()
        Returns:
        the street
      • setStreet

        public void setStreet​(java.lang.String street)
        Parameters:
        street - the street to set
      • getPostalCode

        public java.lang.String getPostalCode()
        Returns:
        the postalCode
      • setPostalCode

        public void setPostalCode​(java.lang.String postalCode)
        Parameters:
        postalCode - the postalCode to set
      • getPoBox

        public java.lang.String getPoBox()
        Returns:
        the poBox
      • setPoBox

        public void setPoBox​(java.lang.String poBox)
        Parameters:
        poBox - the poBox to set
      • getRegion

        public java.lang.String getRegion()
        Returns:
        the region
      • setRegion

        public void setRegion​(java.lang.String region)
        Parameters:
        region - the region to set
      • getLocality

        public java.lang.String getLocality()
        Returns:
        the locality
      • setLocality

        public void setLocality​(java.lang.String locality)
        Parameters:
        locality - the locality to set
      • getCountry

        public java.lang.String getCountry()
        Returns:
        the country
      • setCountry

        public void setCountry​(java.lang.String country)
        Parameters:
        country - the country to set
      • getMessage

        public java.lang.String getMessage()
        Returns:
        the message
        Since:
        jcms-10.0.8
      • setMessage

        public void setMessage​(java.lang.String message)
        Parameters:
        message - the message to set
        Since:
        jcms-10.0.8
      • getMember

        public Member getMember()
        Returns:
        the member the member to createn or an update instance of existing member to update.
        Since:
        jcms-10.0.8
      • setMember

        public void setMember​(Member member)
        Parameters:
        member - the member to set
        Since:
        jcms-10.0.8
      • getGroupIds

        public java.util.Collection<java.lang.String> getGroupIds()
        Returns:
        the groupIds
        Since:
        jcms-10.0.8
      • setGroupIds

        public void setGroupIds​(java.util.Collection<java.lang.String> groupIds)
        Parameters:
        groupIds - the groupIds to set
        Since:
        jcms-10.0.8
      • isDBMemberImport

        public boolean isDBMemberImport()
        Returns:
        the member type to use
        Since:
        jcms-10.0.8
      • setDBMemberImport

        public void setDBMemberImport​(boolean isDBMemberImport)
        Parameters:
        isDBMemberImport - member type to set
        Since:
        jcms-10.0.8
      • getUsage

        public int getUsage()
        Returns:
        the usage (Account or contact) for members to create.
        Since:
        jcms-10.0.8
      • setUsage

        public void setUsage​(int usage)
        Parameters:
        usage - the usage (Account or contact) for members to create to set.
        Since:
        jcms-10.0.8
      • isAccount

        public boolean isAccount()
        Returns:
        true if Account.
        Since:
        jcms-10.0.8
      • isContact

        public boolean isContact()
        Returns:
        true if contact.
        Since:
        jcms-10.0.8
      • setSuccess

        public void setSuccess​(boolean success)
        Parameters:
        success - the success to set
        Since:
        jcms-10.0.8
      • isSuccess

        public boolean isSuccess()
        If import was successfull.
        Returns:
        the success
        Since:
        jcms-10.0.8
      • updateMember

        public void updateMember()
        Updates the associated Member's fields if mock Member's values are not empty.

        If account creation case :
        • Sets a DISABLED_PASSWORD to the new member.
        Since:
        jcms-10.0.8
      • updateMemberGroups

        protected void updateMemberGroups()
        Add the Member to the optional Groups.
        Since:
        jcms-10.0.8
      • getDataControllerContext

        protected java.util.Map<java.lang.String,​java.lang.Object> getDataControllerContext()
      • getAuthor

        public Member getAuthor()
        Returns:
        the author
        Since:
        10.0.8 JCMS-9383
      • setAuthor

        public void setAuthor​(Member author)
        Parameters:
        author - the author to set
        Since:
        10.0.8 JCMS-9383
      • toString

        public java.lang.String toString()
        Used for debug purpose.
        Overrides:
        toString in class java.lang.Object
        Since:
        jcms-10.0.8