|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.db.entity.MaintenanceDisplayElement
org.pajes.db.entity.Viewer
Abstract super-class of all classes that create a Paje to display an Entity object.
All sub-classes MUST have a no-parameter constructor.
| Constructor Summary | |
Viewer()
|
|
| Method Summary | |
protected void |
build(TraversableElement container)
Populates the tags in the specified container. |
protected Entity |
getEntity()
Returns the Entity to be viewed. |
abstract Paje |
getPaje()
Returns the Paje to view an Entity object. |
protected Scope |
getScope()
Returns the Scope will retrieve the Entity to be
viewed. |
void |
init(Manager manager,
javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request)
Deprecated. 2.1.1 - use init(Manager, ServletContext) and
setRequest(HttpServletRequest). |
protected Entity |
retrieve()
Returns the Entity object to be displayed. |
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the request that this instance of the Viewer will show. |
| Methods inherited from class org.pajes.db.entity.MaintenanceDisplayElement |
clone, getManager, getRequest, getServletContext, init, init, isInitialised |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Viewer()
| Method Detail |
public abstract Paje getPaje()
throws java.io.IOException
Paje to view an Entity object.
Sub-class implementations should build or acquire a Paje instance
(either by building the Paje on the fly, or creating one from a PajeFactory), and then call the build(org.pajes.html.TraversableElement) method
to populate the named tags.
Paje.
java.io.IOException - if an IO exception occurs.build(org.pajes.html.TraversableElement)
public void setRequest(javax.servlet.http.HttpServletRequest request)
throws EntityNotFoundException,
java.io.IOException,
java.sql.SQLException
setRequest in class MaintenanceDisplayElementrequest - the request object.
EntityNotFoundException - if the Entity to be edited does not
exist.
java.io.IOException - if an IO exception occurs.
java.sql.SQLException - if an error occurs retrieving the Entity
objects.
public void init(Manager manager,
javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request)
throws EntityNotFoundException,
java.io.IOException,
java.sql.SQLException
init(Manager, ServletContext) and
setRequest(HttpServletRequest).
manager - the Manager that manages the Entity object to be
viewed.context - the ServletContext.request - the request object.
EntityNotFoundException - if the Entity to be edited does not
exist.
java.io.IOException - if an IO exception occurs.
java.sql.SQLException - if an error occurs retrieving the Entity
objects.protected Entity getEntity()
Entity to be viewed.
protected Scope getScope()
Scope will retrieve the Entity to be
viewed. The default implementation assumes that there is sufficient
information in the HttpServletRequest to uniquely
identify the Entity.
Sub-classes may over-ride this method to return a scope that, for example, imposes additional constraints.
retrieve()
protected void build(TraversableElement container)
throws EntityNotFoundException,
java.io.IOException,
java.sql.SQLException
container - The container with the tags to be populated.
EntityNotFoundException - if the Entity does not exist.
java.io.IOException - if an IO exception occurs.
java.sql.SQLException - if an error occurs retrieving the Entity
object.Entity.assignTagContents(org.pajes.html.TraversableElement)
protected Entity retrieve()
throws EntityNotFoundException,
java.sql.SQLException
Entity object to be displayed. The method is called
by the init(org.pajes.db.entity.Manager,
javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
method, before calling the init(org.pajes.db.entity.Manager, javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest) method.
The default implementation returns the Entity that meets the scope.
EntityNotFoundException - if the Entity requested by the Scope
does not exist.
java.sql.SQLException - if an error occurs retrieving the Entity
objects.getScope()
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||