| java.lang.Object projectmanagement.presentation.BasePO
All known Subclasses: projectmanagement.presentation.worksheets.AdministeringSearch, projectmanagement.presentation.Login, projectmanagement.presentation.customers.Edit, projectmanagement.presentation.employees.Edit, projectmanagement.presentation.payrates.Context, projectmanagement.presentation.customers.Administering, projectmanagement.presentation.worksheets.Context, projectmanagement.presentation.Menu, projectmanagement.presentation.employees.Administering, projectmanagement.presentation.worksheets.Edit, projectmanagement.presentation.worksheets.Search, projectmanagement.presentation.employees.Context, projectmanagement.presentation.customers.Context, projectmanagement.presentation.payrates.Administering, projectmanagement.presentation.projects.Context, projectmanagement.presentation.worksheets.Controls, projectmanagement.presentation.worksheets.Administering, projectmanagement.presentation.payrates.Edit, projectmanagement.presentation.projects.Administering, projectmanagement.presentation.projects.Edit,
BasePO | abstract public class BasePO implements HttpPresentation(Code) | | This is the parent Presentation 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.
author: Sasa Bojanic version: 1.0 |
myComms | protected HttpPresentationComms myComms(Code) | | Saved input and output context, and session data
|
checkAuthLevel | protected void checkAuthLevel() throws ClientPageRedirectException, ProjectManagementPresentationException(Code) | | Checks the session data to see if user has the authorization to
access the given page. Authorization levels include:
UNAUTH_USER (0) - login not required
ORDINARY_USER (1) - requires normal login
ADMIN_USER (2) - requires to login as administrator
Redirects to the login page if user is not authorized to access the page.
|
getApplication | public ProjectManagement 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, ProjectManagementPresentationException(Code) | | Return the current authorization level (set during login)
An int equal to the current authorization level. |
getPageContentForEvent | public XMLObject getPageContentForEvent(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
true if this particular request requires the user to be logged
in, otherwise false.
|
getUser | public Employee getUser()(Code) | | Gets the user from the session
the employee object in the session |
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. |
handleEvent | public void handleEvent(HttpPresentationComms comms) throws Exception(Code) | | Method to call the proper method for the incoming event
Parameters: HttpPresentationComms - exception: Exception - |
initSessionData | protected void initSessionData(HttpPresentationComms comms) throws ProjectManagementPresentationException(Code) | | Method to get or create the AgSessionData object from the user session
This object is saved in the EbrokerPresentation object
Parameters: HttpPresentationComms - exception: Exception - |
isNullField | protected static boolean isNullField(String field)(Code) | | Returns true if the given string is null, empty, or contains
only the white space(s).
|
removeUserFromSession | public void removeUserFromSession()(Code) | | Method to remove the current user from the session
|
run | public void run(HttpPresentationComms comms) throws Exception(Code) | | This implements the run method in HttpPresentation.
Parameters: HttpPresentationComms - exception: Exception - |
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 |
|
|