Package com.avoka.fc.core.security
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 Summary
Fields Modifier and Type Field Description static String
COLUMN_CHANGE_PASSWORD
The case-insensitive name of the column containing the change password flagstatic String
COLUMN_EMAIL
The case-insensitive name of the column containing the email addressstatic String
COLUMN_FAMILY_NAME
The case-insensitive name of the column containing the family namestatic String
COLUMN_GIVEN_NAME
The case-insensitive name of the column containing the given namestatic String
COLUMN_GLOBAL_ACCESS
The case-insensitive name of the column containing the global access flagstatic String
COLUMN_GROUP_NAMES
The case-insensitive name of the column containing the group names, separated by |static String
COLUMN_LOGIN_NAME
The case-insensitive name of the column containing the login namestatic String
COLUMN_MOBILE
The case-insensitive name of the column containing the mobile phone numberstatic String
COLUMN_ORG_CODES
The case-insensitive name of the column containing the client codes, separated by |static String
COLUMN_PASSWORD
The case-insensitive name of the column containing the passwordstatic String
COLUMN_PHONE
The case-insensitive name of the column containing the phone numberstatic String
COLUMN_PORTAL_NAMES
The case-insensitive name of the column containing the portal names, separated by |static String
COLUMN_ROLE_NAMES
The case-insensitive name of the column containing the role names, separated by |static String
COLUMN_SEND_USER_ENROLLMENT_APPROVAL_EMAIL
The case-insensitive name of the column containing the send user enrollment approval emaild flag
-
Constructor Summary
Constructors Constructor Description UserBulkImportParser(org.apache.poi.hssf.usermodel.HSSFSheet worksheet)
Creates a parser based on the given worksheet
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurrentRowNumber()
Returns the current row number (the number of the row that the next call to getNextRow() will return).Map<String,String>
getNextRow()
Parse the next row and return the cell values in a map keyed by column nameboolean
hasMoreRows()
Specifies whether the parser has parsed all available rowsvoid
validateHeader()
Validate the header of the worksheet.
-
-
-
Field Detail
-
COLUMN_LOGIN_NAME
public static final String COLUMN_LOGIN_NAME
The case-insensitive name of the column containing the login name- See Also:
- Constant Field Values
-
COLUMN_GIVEN_NAME
public static final String COLUMN_GIVEN_NAME
The case-insensitive name of the column containing the given name- See Also:
- Constant Field Values
-
COLUMN_FAMILY_NAME
public static final String COLUMN_FAMILY_NAME
The case-insensitive name of the column containing the family name- See Also:
- Constant Field Values
-
COLUMN_EMAIL
public static final String COLUMN_EMAIL
The case-insensitive name of the column containing the email address- See Also:
- Constant Field Values
-
COLUMN_PASSWORD
public static final String COLUMN_PASSWORD
The case-insensitive name of the column containing the password- See Also:
- Constant Field Values
-
COLUMN_CHANGE_PASSWORD
public static final String COLUMN_CHANGE_PASSWORD
The case-insensitive name of the column containing the change password flag- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
COLUMN_PHONE
public static final String COLUMN_PHONE
The case-insensitive name of the column containing the phone number- See Also:
- Constant Field Values
-
COLUMN_MOBILE
public static final String COLUMN_MOBILE
The case-insensitive name of the column containing the mobile phone number- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Method Detail
-
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
-
-