corelib.services.web.webapplications
Class WebPage

java.lang.Object
  extended by corelib.services.web.webapplications.WebPage
Direct Known Subclasses:
RestrictedWebPage

public class WebPage
extends java.lang.Object

The most important class of the framework: this class represents the concept of web page.

Since:
0.1.0
Author:
Infini Software : Alexia Ramaļoli & Dominique Liard

Field Summary
protected  WebApplication application
           
protected  boolean bIsValid
           
protected  java.io.PrintWriter out
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  javax.servlet.http.HttpServletResponse response
           
protected  javax.servlet.http.HttpSession session
           
protected  WebTraceLogger traceLogger
           
 
Constructor Summary
WebPage()
           
 
Method Summary
 java.lang.String getAliasForNamespace(java.lang.String namespace)
          Returns the alias (the short name) associated to the considered namespace (ie java package in Ellipse Framework).
 WebApplication getApplication()
          Return the Web Application object.
 WebComponentEventDispatcher getEventDispatcher()
          Returns the EventDispatcher instance used by this web page.
 java.util.Locale getLocale()
           
 java.lang.String getNextAutoIdentifier()
          Generates a new unique identifier: each web component has an unique identifier produces by this method.
 java.io.PrintWriter getOut()
          Returns the PrintWriter instance to use for inject text into the HTML page under generation.
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the request object associated to the actual HTML page generation.
 java.lang.String getRequestedURI()
           
 javax.servlet.http.HttpServletResponse getResponse()
          Returns the response object associated to the actual HTML page generation.
 javax.servlet.http.HttpSession getSession()
          Returns the HTTP session associated by this web page.
 WebTraceLogger getTraceLogger()
          Returns the web trace logger instance associated to the actual HTML page generation.
 java.util.List<Validator> getValidators()
          Returns all validators present in this web page.
 WebComponent getWebComponent(java.lang.String identifier)
          Returns the web component identified by the specified identifier.
 java.util.List<WebComponent> getWebComponents(java.lang.Class<?> metaClass)
          Returns all web components (for this web page) that are compatible with the specified class (passed as parameter).
 boolean isValid()
           
 void page_init(WebPageEvent webPageEvent)
          This method is invoked to permit initialization the web page.
 void page_load(WebPageEvent webPageEvent)
          This method when the page is fully load into the web server.
 void page_postRender(WebPageEvent webPageEvent)
          This method is invoked after the HTML rendering process.
 void page_preRender(WebPageEvent webPageEvent)
          This method is invoked before the HTML rendering process.
 void page_preRepeaterDuplications(WebPageEvent webPageEvent)
          This method is invoked before repeated duplication process.
 void page_render(WebPageEvent webPageEvent)
          This method starts the HTML rendering process.
 void redirect(java.lang.String newPage)
          Sends a temporary redirect response to the client using the specified redirect location URL.
 void setLocale(java.util.Locale locale)
           
 void setRequestedURI(java.lang.String requestedURI)
           
 void setTraceLogger(WebTraceLogger traceLogger)
          Inject into this web page, the WebTraceLogger instance to used for store produced web page logs.
 void setValid(boolean state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

application

protected WebApplication application

session

protected javax.servlet.http.HttpSession session

request

protected javax.servlet.http.HttpServletRequest request

response

protected javax.servlet.http.HttpServletResponse response

out

protected java.io.PrintWriter out

traceLogger

protected WebTraceLogger traceLogger

bIsValid

protected boolean bIsValid
Constructor Detail

WebPage

public WebPage()
Method Detail

getSession

public javax.servlet.http.HttpSession getSession()
Returns the HTTP session associated by this web page.

Returns:
the HTTP session.

getApplication

public WebApplication getApplication()
Return the Web Application object.

Returns:
The Web application instance.

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns the request object associated to the actual HTML page generation.

Returns:
The request object.

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Returns the response object associated to the actual HTML page generation.

Returns:
The response object.

getOut

public java.io.PrintWriter getOut()
Returns the PrintWriter instance to use for inject text into the HTML page under generation.

Returns:
The PrintWriter instance.

getTraceLogger

public WebTraceLogger getTraceLogger()
Returns the web trace logger instance associated to the actual HTML page generation. During the HTML page generation process, logs can be produced: all of this log are stored into the WebTraceLogger instance. After the generation, you can retrieve and display all logs with the WebTrace Ellipse service.

Returns:
The web trace logger instance.
See Also:
setTraceLogger( WebTraceLogger ), WebTraceManager

setTraceLogger

public void setTraceLogger(WebTraceLogger traceLogger)
Inject into this web page, the WebTraceLogger instance to used for store produced web page logs.

Parameters:
traceLogger - The new WebTraceLogger instance.
See Also:
getTraceLogger(), WebTraceManager

getRequestedURI

public java.lang.String getRequestedURI()

setRequestedURI

public void setRequestedURI(java.lang.String requestedURI)

isValid

public boolean isValid()

setValid

public void setValid(boolean state)

getLocale

public java.util.Locale getLocale()

setLocale

public void setLocale(java.util.Locale locale)

getWebComponent

public WebComponent getWebComponent(java.lang.String identifier)
Returns the web component identified by the specified identifier.

Parameters:
identifier - The identifier of the component to search.
Returns:
The associated web component, if exists, or null if not exists.

getWebComponents

public java.util.List<WebComponent> getWebComponents(java.lang.Class<?> metaClass)
Returns all web components (for this web page) that are compatible with the specified class (passed as parameter).

Parameters:
metaClass - Identify the base type of searched web components.
Returns:
A list of all web components (for this page) that are compatible with the specified class.
Since:
0.4.0

getValidators

public java.util.List<Validator> getValidators()
Returns all validators present in this web page.

Returns:
A list of all validators.
Since:
0.4.0

getEventDispatcher

public WebComponentEventDispatcher getEventDispatcher()
Returns the EventDispatcher instance used by this web page.

Returns:
The event dispatcher.

redirect

public void redirect(java.lang.String newPage)
Sends a temporary redirect response to the client using the specified redirect location URL.

Parameters:
newPage - The web page URL used for the redirection.

getAliasForNamespace

public java.lang.String getAliasForNamespace(java.lang.String namespace)
Returns the alias (the short name) associated to the considered namespace (ie java package in Ellipse Framework).

Parameters:
namespace - The considered namespace (ie java package in Ellipse Framework).
Returns:
The searched alias.

getNextAutoIdentifier

public java.lang.String getNextAutoIdentifier()
Generates a new unique identifier: each web component has an unique identifier produces by this method.

Returns:
A new unique identifier.
Since:
0.3.2

page_preRepeaterDuplications

public void page_preRepeaterDuplications(WebPageEvent webPageEvent)
This method is invoked before repeated duplication process.

Parameters:
webPageEvent - The current web page event.

page_init

public void page_init(WebPageEvent webPageEvent)
This method is invoked to permit initialization the web page.

Parameters:
webPageEvent - The current web page event.

page_load

public void page_load(WebPageEvent webPageEvent)
This method when the page is fully load into the web server. At this step of the life cycle of the page, the event handlers are not fired.

Parameters:
webPageEvent - The current web page event.

page_preRender

public void page_preRender(WebPageEvent webPageEvent)
This method is invoked before the HTML rendering process.

Parameters:
webPageEvent - The current web page event.

page_render

public void page_render(WebPageEvent webPageEvent)
This method starts the HTML rendering process.

Parameters:
webPageEvent - The current web page event.

page_postRender

public void page_postRender(WebPageEvent webPageEvent)
This method is invoked after the HTML rendering process.

Parameters:
webPageEvent - The current web page event.


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.