|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bibalex.daf.managers.MainController
public final class MainController
Main Controller of the System. This class is final, (sealed)
Nested Class Summary | |
---|---|
static class |
MainController.Views
An enumeration listing the different views in the system. |
Field Summary | |
---|---|
private WorkStation |
currentWorkstation
|
private static MainController |
defaultInstance
|
private User |
loggedInUser
|
protected ResourceManager |
resourceManager
|
private java.lang.String |
userName
|
Constructor Summary | |
---|---|
private |
MainController()
Constructor, private Applying singltone pattern. |
Method Summary | |
---|---|
boolean |
authenticateUser(java.lang.String userName,
java.lang.String password)
Authenticates a user using a Username and Password. |
User |
getCurrentUser()
Gets the currently logged in User |
WorkStation |
getCurrentWorkstation()
Gets the current workstation |
java.lang.String |
getCurrentWorkstationIP()
Retreives Current Workstation IP |
java.lang.String |
getCurrentWorkstationName()
Retreives Current Workstation Name |
static MainController |
getMainController()
Public method to retrieve or create the only instance of the MainController |
boolean |
hasAccessTo(MainController.Views view)
Indicate whether the current logged in user has access or not to a specific view in the System. |
boolean |
isLoggedIn()
Indicates if a user is logged in or not. |
boolean |
isValidUser()
This method validates the user using only the UserName, either he is an LDAP user or not. |
boolean |
isValidWorkstation(java.lang.String workstationName,
java.lang.String workstationIP)
This method validates the current workstation in the system DB. |
void |
logoffUser()
Log-Off the currently logged in user if exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private User loggedInUser
private WorkStation currentWorkstation
private static MainController defaultInstance
private java.lang.String userName
protected ResourceManager resourceManager
Constructor Detail |
---|
private MainController()
Method Detail |
---|
public static MainController getMainController()
public boolean isValidWorkstation(java.lang.String workstationName, java.lang.String workstationIP)
workstationName
- The name of the Workstation to check for validity.workstationIP
- The IP of the Workstation to check for validity (used only in case the name didn't match).
public User getCurrentUser()
public WorkStation getCurrentWorkstation()
public java.lang.String getCurrentWorkstationName()
public java.lang.String getCurrentWorkstationIP()
public boolean isLoggedIn()
public boolean isValidUser()
public boolean authenticateUser(java.lang.String userName, java.lang.String password)
userName
- the UserName to authenticatepassword
- the password to authenticate with
public void logoffUser()
public boolean hasAccessTo(MainController.Views view)
view
- The view to check access for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |