Package com.avoka.fc.core.security
Class UserBulkImportParser
java.lang.Object
com.avoka.fc.core.security.UserBulkImportParser
Provides parsing of a user bulk import file in XLS format.
- Since:
- 3.6.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The case-insensitive name of the column containing the change password flagstatic final String
The case-insensitive name of the column containing the email addressstatic final String
The case-insensitive name of the column containing the family namestatic final String
The case-insensitive name of the column containing the given namestatic final String
The case-insensitive name of the column containing the global access flagstatic final String
The case-insensitive name of the column containing the group names, separated by |static final String
The case-insensitive name of the column containing the login namestatic final String
The case-insensitive name of the column containing the mobile phone numberstatic final String
The case-insensitive name of the column containing the client codes, separated by |static final String
The case-insensitive name of the column containing the passwordstatic final String
The case-insensitive name of the column containing the phone numberstatic final String
The case-insensitive name of the column containing the portal names, separated by |static final String
The case-insensitive name of the column containing the role names, separated by |static final String
The case-insensitive name of the column containing the send user enrollment approval emaild flag -
Constructor Summary
ConstructorDescriptionUserBulkImportParser
(org.apache.poi.hssf.usermodel.HSSFSheet worksheet) Creates a parser based on the given worksheet -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the current row number (the number of the row that the next call to getNextRow() will return).Parse the next row and return the cell values in a map keyed by column nameboolean
Specifies whether the parser has parsed all available rowsvoid
Validate the header of the worksheet.
-
Field Details
-
COLUMN_LOGIN_NAME
The case-insensitive name of the column containing the login name- See Also:
-
COLUMN_GIVEN_NAME
The case-insensitive name of the column containing the given name- See Also:
-
COLUMN_FAMILY_NAME
The case-insensitive name of the column containing the family name- See Also:
-
COLUMN_EMAIL
The case-insensitive name of the column containing the email address- See Also:
-
COLUMN_PASSWORD
The case-insensitive name of the column containing the password- See Also:
-
COLUMN_CHANGE_PASSWORD
The case-insensitive name of the column containing the change password flag- See Also:
-
COLUMN_PORTAL_NAMES
The case-insensitive name of the column containing the portal names, separated by |- See Also:
-
COLUMN_GROUP_NAMES
The case-insensitive name of the column containing the group names, separated by |- See Also:
-
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
The case-insensitive name of the column containing the phone number- See Also:
-
COLUMN_MOBILE
The case-insensitive name of the column containing the mobile phone number- See Also:
-
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
The case-insensitive name of the column containing the client codes, separated by |- Since:
- 20.5.0
- See Also:
-
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
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
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
-