| java.lang.Object com.lutris.airsent.presentation.BasePO
All known Subclasses: com.lutris.airsent.presentation.customer.Register, com.lutris.airsent.presentation.admin.AdminMain, com.lutris.airsent.presentation.customer.OrderPage2, com.lutris.airsent.presentation.customer.OrderPage3, com.lutris.airsent.presentation.admin.AdminLogin, com.lutris.airsent.presentation.Welcome, com.lutris.airsent.presentation.admin.AdminDetails, com.lutris.airsent.presentation.customer.Login, com.lutris.airsent.presentation.customer.AccountHistory, com.lutris.airsent.presentation.customer.OrderPage1, com.lutris.airsent.presentation.aboutAirSent, com.lutris.airsent.presentation.admin.NewMessenger, com.lutris.airsent.presentation.customer.OrderPage4, com.lutris.airsent.presentation.help, com.lutris.airsent.presentation.DeviceBasePO,
BasePO | abstract public class BasePO implements HttpPresentation(Code) | | This is the parent Presentaion object. All presentation objects
should extend this class.
The run method looks for an event parameter and then calls
handle. If the "event" Parameter is not defined then
the handleDefault() method is called in your child class.
|
checkAuthLevel | protected void checkAuthLevel() throws ClientPageRedirectException, AirSentPresentationException(Code) | | Checks the session data to see if the user has the authorization to
access the given page. Authorization levels include:
UNAUTH_USER (0) -- login not required.
CUSTOMER_USER (1) -- login as customer required.
MESSENGER_USER (2) -- login as messenger required.
ADMIN_USER (3) -- login as administrator required.
SIDE EFFECTS: redirects to login page if user not authorized to access page.
|
checkField | protected static boolean checkField(String field, int size)(Code) | | Returns true if the given string is null, empty, or contains
only white space.
|
getApplication | public AirSent getApplication()(Code) | | Returns the application object associated with the
current request.
the application object. |
getComms | public HttpPresentationComms getComms()(Code) | | Gets HttpPresentation object
The saved comms objectsto whichever subclass needs it |
getCurrentAuthLevel | protected int getCurrentAuthLevel() throws ClientPageRedirectException, AirSentPresentationException(Code) | | Checks the session data for a Student, if not there then redirects to the login page
return the current authorization level (set during login)
an int equal to the current authorization level. |
getPage | public XMLObject getPage(String event) throws Exception(Code) | | If an event parameter is defined then this invokes the method that
handles that event.
event, the incoming event name exception: Exception - |
getRequiredAuthLevel | abstract protected int getRequiredAuthLevel()(Code) | | This method should be implemented in the subclass so that it returns
the authorization level necessary to access the po.
|
handleDefault | abstract public XMLObject handleDefault() throws HttpPresentationException(Code) | | This is the procedure that is called if there is no "event"
HTTP parameter found. It must be overriden by the subclass to
do default processing or error checking/handling.
String The String representation of the HTML or (other format)of the document to be displayed. This method would need to be changedif you wanted to return binary data as well. It returns a Stringfor simplicity right now. |
handleLogout | public XMLObject handleLogout() throws AirSentPresentationException(Code) | | this logs out a user from the session. it first grabs
an instance of the sessionData associated with the request
and then sets the user to null in the session data.
Parameters: HttpServletRequest - request - this is the request thatthe session data is extracted from. exception: AirSentPresentationException - when an error occurs or ifthe session data for the request is null. |
isNullField | protected static boolean isNullField(String field)(Code) | | Returns true if the given string is null, empty, or contains
only white space.
|
writeDebugMsg | public static void writeDebugMsg(String msg)(Code) | | Method to write a debugging message to the debug log
channel when the DEBUG flag is turned on
Parameters: msg - The message to write to the DEBUG log channel |
|
|