Class UserBulkImportParser

java.lang.Object
com.avoka.fc.core.security.UserBulkImportParser

public class UserBulkImportParser extends Object
Provides parsing of a user bulk import file in XLS format.
Since:
3.6.0
  • Field Details

    • COLUMN_LOGIN_NAME

      public static final String COLUMN_LOGIN_NAME
      The case-insensitive name of the column containing the login name
      See Also:
    • COLUMN_GIVEN_NAME

      public static final String COLUMN_GIVEN_NAME
      The case-insensitive name of the column containing the given name
      See Also:
    • COLUMN_FAMILY_NAME

      public static final String COLUMN_FAMILY_NAME
      The case-insensitive name of the column containing the family name
      See Also:
    • COLUMN_EMAIL

      public static final String COLUMN_EMAIL
      The case-insensitive name of the column containing the email address
      See Also:
    • COLUMN_PASSWORD

      public static final String COLUMN_PASSWORD
      The case-insensitive name of the column containing the password
      See Also:
    • COLUMN_CHANGE_PASSWORD

      public static final String COLUMN_CHANGE_PASSWORD
      The case-insensitive name of the column containing the change password flag
      See Also:
    • COLUMN_PORTAL_NAMES

      public static final String COLUMN_PORTAL_NAMES
      The case-insensitive name of the column containing the portal names, separated by |
      See Also:
    • COLUMN_GROUP_NAMES

      public static final String COLUMN_GROUP_NAMES
      The case-insensitive name of the column containing the group names, separated by |
      See Also:
    • COLUMN_SEND_USER_ENROLLMENT_APPROVAL_EMAIL

      public static final String COLUMN_SEND_USER_ENROLLMENT_APPROVAL_EMAIL
      The case-insensitive name of the column containing the send user enrollment approval emaild flag
      See Also:
    • COLUMN_PHONE

      public static final String COLUMN_PHONE
      The case-insensitive name of the column containing the phone number
      See Also:
    • COLUMN_MOBILE

      public static final String COLUMN_MOBILE
      The case-insensitive name of the column containing the mobile phone number
      See Also:
    • COLUMN_ROLE_NAMES

      public static final String COLUMN_ROLE_NAMES
      The case-insensitive name of the column containing the role names, separated by |
      Since:
      20.5.0
      See Also:
    • COLUMN_ORG_CODES

      public static final String COLUMN_ORG_CODES
      The case-insensitive name of the column containing the client codes, separated by |
      Since:
      20.5.0
      See Also:
    • COLUMN_GLOBAL_ACCESS

      public static final String COLUMN_GLOBAL_ACCESS
      The case-insensitive name of the column containing the global access flag
      Since:
      20.5.0
      See Also:
  • Constructor Details

    • UserBulkImportParser

      public UserBulkImportParser(org.apache.poi.hssf.usermodel.HSSFSheet worksheet)
      Creates a parser based on the given worksheet
      Parameters:
      worksheet - the worksheet (required)
  • Method Details

    • validateHeader

      public void validateHeader() throws ApplicationException
      Validate the header of the worksheet. This header must contain the following columns in order: COLUMN_LOGIN_NAME, COLUMN_GIVEN_NAME, COLUMN_FAMILY_NAME, COLUMN_EMAIL, COLUMN_PASSWORD, COLUMN_CHANGE_PASSWORD, COLUMN_PORTAL_NAMES In addition, it may also contain the following columns in any order: COLUMN_PHONE, COLUMN_MOBILE, COLUMN_GROUP_NAMES
      Throws:
      ApplicationException - if a required column is missing, or duplicate column names are encountered
    • hasMoreRows

      public boolean hasMoreRows()
      Specifies whether the parser has parsed all available rows
      Returns:
      true if more rows are available
    • getCurrentRowNumber

      public int getCurrentRowNumber()
      Returns the current row number (the number of the row that the next call to getNextRow() will return). Note that the row number is zero based but will always be at least 1 since the header row is skipped.
      Returns:
      the current row number
    • getNextRow

      public Map<String,String> getNextRow()
      Parse the next row and return the cell values in a map keyed by column name
      Returns:
      the contents of the next row, or null if the worksheet row was null