public class ErrorAccessControl extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
ErrorAccessControl.AccessObject
This object is the logic lock.
|
| Modifier and Type | Field and Description |
|---|---|
protected Hashtable<String,ErrorAccessControl.AccessObject> |
hAccessControl |
int |
numMaxErrorAccess |
| Constructor and Description |
|---|
ErrorAccessControl(int numberMaxAcces) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccessAttempToUser(String user)
Add an access attempt to the user which username is passed by param.
|
void |
allowLogin(String user)
Unlocks a blocked user which username is passed by param.
|
boolean |
checkAccessControl(String user)
Check if the user which username is passed by param is blocked.
|
boolean |
checkLastAttempt(String user)
Check if the last attempt to login is more or equals to the max number of
allowed attempts
|
int |
getNumMaxErrorAccess() |
ErrorAccessControl.AccessObject |
getUserAccessObject(String user)
Return the AccessObject of the user which username is passed by param.
|
public int numMaxErrorAccess
protected Hashtable<String,ErrorAccessControl.AccessObject> hAccessControl
public int getNumMaxErrorAccess()
public boolean checkAccessControl(String user) throws UserBlockedException
user - The username to checkUserBlockedExceptionpublic void allowLogin(String user)
user - The user who will be allowed accesspublic ErrorAccessControl.AccessObject getUserAccessObject(String user)
user - The username of the AccessObject to be recovered.null if no exists.public void addAccessAttempToUser(String user)
user - The user of the AccessObject to which you will add a new
attempt.public boolean checkLastAttempt(String user)
user - The user of the object to which you will retrieve the last
attemptCopyright © 2016 Imatia Innovation S.L.. All rights reserved.