Class MemberImportProcess

java.lang.Object
com.jalios.jcms.backgroundprocess.BackgroundProcess
com.jalios.jcms.member.csvimport.MemberImportProcess
All Implemented Interfaces:
JcmsConstants, MemberImportConstants, JaliosConstants

public class MemberImportProcess extends BackgroundProcess implements MemberImportConstants

A manager to be instanciated to import Members from a CSV input file.

CSV File's expected format:

 Name, First name, Email, Login, Organization, Department, JobTitle, Phone, Mobile, custom
 optional columns ...
 # First line must contain headers
 # Use '#' caracter to comment a line
 FOO, John, john.foo@example.com, , Acme, Sales, Manager, 0102030405, 0605040302
 

The limit controller is checked only if account activation mails is chosen.

Since:
jcms-10.0.8 / JCMS-10510
  • Constructor Details

  • Method Details

    • runProcess

      protected void runProcess() throws BackgroundProcessException
      Description copied from class: BackgroundProcess
      Override to implement the process.
      Specified by:
      runProcess in class BackgroundProcess
      Throws:
      BackgroundProcessException - if an error occurs
    • incrementStep

      public void incrementStep()
      Description copied from class: BackgroundProcess
      Increment the step number of this processing by one.

      Implementation detail : If this step changes the progress percentage, it triggers an update in database of the BackgroundProcessInfo used to track the process progress

      Overrides:
      incrementStep in class BackgroundProcess
    • handleComplete

      protected void handleComplete()
      Always deletes csv file process failed.
      Overrides:
      handleComplete in class BackgroundProcess
    • getLabelProp

      public String getLabelProp()
      Description copied from class: BackgroundProcess
      Retrieve the I18N property key to use to provide the I18Ned label of this BackgroundProcess to the user.
      Overrides:
      getLabelProp in class BackgroundProcess
      Returns:
      a property
    • performImport

      protected void performImport(MemberImport mbrImport)
      Perform save of the Member object if possible.
      Checks limit controller if needed (when accounts are activated).
      Updates counters.
      Parameters:
      mbrImport - the mock Member to be imported.
      Since:
      jcms-10.0.8
    • getCtx

      public MemberImportContext getCtx()
    • toString

      public String toString()
      Overrides:
      toString in class BackgroundProcess
    • toString

      public String toString(org.apache.commons.lang3.builder.ToStringStyle style)