|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectpl.aislib.fm.Page
Abstract class representing one page of application.
| Tomasz Pik, AIS.PL |
| Michal Jastak, AIS.PL |
| Field Summary | |
protected Application |
application
Contains Application description to which this Page belongs. |
protected org.apache.commons.logging.Log |
log
Contains Logging Component. |
protected PageInfo |
pageInfo
Contains additional information about this Page. |
protected java.util.Map |
properties
Map of properties of the page. |
protected javax.servlet.http.HttpServletRequest |
request
Contains HTTP request description. |
protected javax.servlet.http.HttpServletResponse |
response
Contains HTTP response description. |
protected javax.servlet.http.HttpServlet |
servlet
Contains Servlet description, part of which is this Page. |
protected javax.servlet.http.HttpSession |
session
HTTP Session object describing session corresponding to current request. |
| Constructor Summary | |
Page()
|
|
| Method Summary | |
protected void |
cleanSession()
Cleans all session objects associated with this application. |
protected java.lang.String |
getConfigParameter(java.lang.String paramName)
Gets configuration parameter. |
protected Form |
getForm(java.lang.String formName)
Gets form. |
protected Message |
getMessage(int messageCode)
Gets message for given code. |
protected Page |
getPage(java.lang.String actionKey)
Gets new Page object corresponding to given actionKey. |
abstract PageResponse |
getPageResponse()
Method which every subclass of Page must implement. |
protected java.lang.String |
getParameter(java.lang.String paramName)
Gets request parameter with a given name. |
protected java.lang.String[] |
getParameterValues(java.lang.String paramName)
Gets request parameters with a given name. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Gets property with given name. |
java.lang.Object |
getProperty(java.lang.String propertyName,
java.lang.Object defaultValue)
Gets property with given name. |
protected java.lang.Object |
getRequestAttribute(java.lang.String attrName)
Gets the request attribute for application. |
protected java.lang.Object |
getSessionAttribute(java.lang.String attrName)
Gets session attribute for application. |
protected java.util.Iterator |
getSessionAttributeNames()
Gets an Iterator of String
objects containing the names of all the session objects of application. |
protected boolean |
hasImageParameter(java.lang.String paramName)
Checks if there is a request parameter with given name. |
protected boolean |
hasParameter(java.lang.String paramName)
Checks if there is a request parameter with given name. |
boolean |
hasProperty(java.lang.String propertyName)
Check if a given property exists. |
protected boolean |
hasRequestAttribute(java.lang.String attrName)
Check if there is a session attribute for the application. |
protected boolean |
hasSessionAttribute(java.lang.String attrName)
Checks if there is a session attribute for application. |
protected java.lang.Object |
loadTemplate(java.lang.String templateName)
Loads application-specific template using TemplateEngine object. |
protected void |
onLoad()
Trigger method is called afer the initialization of the internal strucures for page instance (request, response, application). |
java.util.Iterator |
propertyNames()
Gets names of properties of the page. |
protected void |
removeRequestAttribute(java.lang.String attrName)
Removes the session attribute for application. |
protected void |
removeSessionAttribute(java.lang.String attrName)
Removes session attribute for the application. |
protected void |
setRequestAttribute(java.lang.String attrName,
java.lang.Object attrValue)
Sets the request attribute for application. |
protected void |
setSessionAttribute(java.lang.String attrName,
java.lang.Object attrValue)
Sets session attribute for the application. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.servlet.http.HttpSession session
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
protected javax.servlet.http.HttpServlet servlet
protected PageInfo pageInfo
protected Application application
protected org.apache.commons.logging.Log log
protected java.util.Map properties
| Constructor Detail |
public Page()
| Method Detail |
public abstract PageResponse getPageResponse()
throws java.io.IOException,
javax.servlet.ServletException
Page must implement.
javax.servlet.ServletException - in case of invalid execution.
java.io.IOException - in case of I/O errors.public java.lang.Object getProperty(java.lang.String propertyName)
propertyName - name of a property.
public java.lang.Object getProperty(java.lang.String propertyName,
java.lang.Object defaultValue)
propertyName - name of a property.defaultValue - default value for the property.
public boolean hasProperty(java.lang.String propertyName)
propertyName - name of the property.
true if the property exists, false otherwise.public java.util.Iterator propertyNames()
Iterator object.protected java.lang.String getParameter(java.lang.String paramName)
paramName - name of request parameter.
null otherwise.ServletRequest.getParameter(java.lang.String)protected java.lang.String[] getParameterValues(java.lang.String paramName)
paramName - name of request parameter.
ServletRequest.getParameterValues(java.lang.String)protected boolean hasParameter(java.lang.String paramName)
paramName - name for requested parameter.
true if the request contains the parameter, false otherwise.protected boolean hasImageParameter(java.lang.String paramName)
paramName - name for requested parameter.
true if the request contains parameter
with the given name or the given name with .x
or .y suffix, false otherwise.protected void onLoad()
protected java.lang.Object getSessionAttribute(java.lang.String attrName)
attrName - name for an attribute.
null.protected boolean hasSessionAttribute(java.lang.String attrName)
attrName - name of the attribute.
true if there is an attribute with the given key,
false otherwise.protected void removeSessionAttribute(java.lang.String attrName)
attrName - attribute name to remove.
protected void setSessionAttribute(java.lang.String attrName,
java.lang.Object attrValue)
attrName - name of the attribute.attrValue - value of the attribute.protected java.util.Iterator getSessionAttributeNames()
Iterator of String
objects containing the names of all the session objects of application.
Iterator object.protected void cleanSession()
protected java.lang.Object getRequestAttribute(java.lang.String attrName)
attrName - name of the attribute for the application.
null.protected boolean hasRequestAttribute(java.lang.String attrName)
attrName - name of the attribute for the application.
true if there is an attribute with the given key,
false otherwise.protected void removeRequestAttribute(java.lang.String attrName)
attrName - name of the attribute to remove.
protected void setRequestAttribute(java.lang.String attrName,
java.lang.Object attrValue)
attrName - name of the attribute.attrValue - value of the attribute.protected java.lang.String getConfigParameter(java.lang.String paramName)
paramName - name of the parameter.
protected java.lang.Object loadTemplate(java.lang.String templateName)
throws java.io.IOException,
javax.servlet.ServletException
TemplateEngine object.
templateName - TemplateEngine-specific template name.
null.
java.io.IOException - if an error occurs while loading.
javax.servlet.ServletException - if an error occurs while loading.
protected Page getPage(java.lang.String actionKey)
throws javax.servlet.ServletException
actionKey.
actionKey - action key describing which Page Object should be created.
Page object or null if Page cannot be found.
javax.servlet.ServletException - if an error occurs.protected Message getMessage(int messageCode)
messageCode - identification code for the message.
Application.getMessage(int, String)protected Form getForm(java.lang.String formName)
formName - name of the form.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||