|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjitas.admin.GUIHelper
public class GUIHelper
This class acts as an intermediate pathway between the gui (AdminFrame) and jitas.core.Admin
| Constructor Summary | |
|---|---|
GUIHelper()
|
|
| Method Summary | |
|---|---|
void |
addDomain(int row)
Called when the add button is pressed in the gui. |
void |
addDomainToSelectedDomains(java.lang.String domain)
Adds a domain to the set of domains a new student will have access to. |
void |
addNewStudent(java.lang.String username,
java.lang.String password)
Creates a new student with all domains from previous calls to addDomainToSelectedDomains. |
boolean |
allInputValid()
checks whether the username, password are valid, and also whether there is at least one domain from calls to addDomainToSelectedDomains. |
java.lang.String |
checkPassword(java.lang.String password)
Checks whether a password is valid or not, and returns a message. |
java.lang.String |
checkUsername(java.lang.String username)
checks whether the student with username already exists |
void |
deleteUser(java.lang.String username)
deletes a student from the entire JITAS System |
java.util.SortedSet<java.lang.String> |
getAllDomainNames()
gets the set of all domain names |
java.lang.String[] |
getAllDomainNameStrings()
gets an array of all domain names |
boolean |
getPasswordEntryStatus()
|
java.lang.String[] |
getSelectedDomainStrings()
gets all the domains names which are currently selected. |
javax.swing.table.TableModel |
getStudentTableModel()
gets the table model for the current student |
java.lang.String[] |
getStudentUsernameStrings()
Used to return an array of student usernames depending on what the filter is set to. |
java.lang.String[] |
getUnselectedDomainStrings()
gets the domains which the new student will not currently belong to. |
boolean |
getUsernameEntryStatus()
|
boolean |
isAllowedInDomain(int row)
tests whether a student has access to a certain domain |
void |
removeDomain(int row)
Called when the remove button is pressed in the gui. |
void |
removeDomainFromSelectedDomains(java.lang.String domain)
Removes a domain from the domains a new student will have access to. |
void |
resetNewStudentDomainLists()
Resets the currently selected domains which the new student will belong to, to the default which is: no domains are selected. |
void |
setCurrentUser(java.lang.String username)
Sets the current student which is selected in the gui |
void |
setFilter(java.lang.String filter)
Sets the domaain of which we wish to filter by If the filter is null, then all domains are selected |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GUIHelper()
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public java.lang.String[] getStudentUsernameStrings()
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic void setCurrentUser(java.lang.String username)
username -
public void removeDomain(int row)
throws DomainNotFoundException,
DomainNotLoadedException,
UserNotFoundException,
UserNotLoggedInException,
java.rmi.RemoteException,
jess.JessException
row - - current domain selected in the gui
DomainNotFoundException
DomainNotLoadedException
UserNotFoundException
UserNotLoggedInException
java.rmi.RemoteException
jess.JessException
public void addDomain(int row)
throws DomainNotFoundException,
DomainNotLoadedException,
StudentModelAlreadyExistsException,
UserNotFoundException,
java.rmi.RemoteException,
jess.JessException,
AddUserDeniedException
row - - the row of the domain selected
DomainNotFoundException
DomainNotLoadedException
StudentModelAlreadyExistsException
UserNotFoundException
java.rmi.RemoteException
jess.JessException
AddUserDeniedExceptionpublic java.util.SortedSet<java.lang.String> getAllDomainNames()
public java.lang.String[] getAllDomainNameStrings()
public javax.swing.table.TableModel getStudentTableModel()
public boolean isAllowedInDomain(int row)
throws UserNotFoundException
row - - the row of the domain currently selected
UserNotFoundExceptionpublic void setFilter(java.lang.String filter)
filter - - the domain name we wish to filter by or null if all domains are selectedpublic void resetNewStudentDomainLists()
public java.lang.String[] getUnselectedDomainStrings()
public java.lang.String[] getSelectedDomainStrings()
public java.lang.String checkUsername(java.lang.String username)
username - -username of the student
public java.lang.String checkPassword(java.lang.String password)
public boolean allInputValid()
public void addNewStudent(java.lang.String username,
java.lang.String password)
throws AddUserDeniedException,
DomainNotFoundException,
DomainNotLoadedException,
IllegalUserNameException,
StudentModelAlreadyExistsException,
java.rmi.RemoteException,
jess.JessException
username - - the students usernamepassword - - the students password
AddUserDeniedException
DomainNotFoundException
DomainNotLoadedException
IllegalUserNameException
StudentModelAlreadyExistsException
java.rmi.RemoteException
jess.JessExceptionpublic void addDomainToSelectedDomains(java.lang.String domain)
domain - - the domain namepublic void removeDomainFromSelectedDomains(java.lang.String domain)
domain - - the domain namepublic boolean getUsernameEntryStatus()
public boolean getPasswordEntryStatus()
public void deleteUser(java.lang.String username)
throws DomainNotFoundException,
DomainNotLoadedException,
UserNotFoundException,
UserNotLoggedInException,
java.rmi.RemoteException,
jess.JessException
username - - the username of the student
DomainNotFoundException
DomainNotLoadedException
UserNotFoundException
UserNotLoggedInException
java.rmi.RemoteException
jess.JessException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||