All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sdi.wap.View

public interface View
The view interface defines the abstract API for the dynamic states of a web appolication. Each state is represented by a subclass of com.sdi.State which implements most of the required methods. The abstract method, controller(), is defined by each subclass to provide the state's controller. The states view is provided by private methods that return html strings to the controller.

See Also:
State, Page

Method Index

 o controller()
Abstract controller method to be implemented by all subclasses
 o encodePageRef(Page, String[], Validatable[])
URL-encode a page reference
 o forward(Page)
Forward this request to the designated page
 o forward(String)
Forward this request to the designated page
 o getAttribute(String)
Get a session attribute.
 o getCookie(String)
Get cookie value
 o getField(String, Field)
 o getParameter(String, Field)
Get a request parameter.
 o getRequest()
 o getRequestDispatcher(String)
Return the requestDispatcher for the provided context-relative url
 o getResponse()
 o getSession()
 o getWriter()
Get the printwriter for this view
 o include(Page)
Forward this request to the designated page
 o include(String)
Forward this request to this page.
 o redirect(Page)
Forward this request to the designated page
 o redirect(String)
Forward this request to the designated page
 o send(String)
 o sendPage(String)
 o sendPageClose()
 o sendPageOpen()
 o setAttribute(String, Object)
Insert the method's description here.
 o setCookie(String, String)
Set a cookie to the provided value

Methods

 o controller
 public abstract void controller() throws Exception
Abstract controller method to be implemented by all subclasses

 o encodePageRef
 public abstract String encodePageRef(Page page,
                                      String argNames[],
                                      Validatable argValues[])
URL-encode a page reference

Parameters:
Page - page the referenced page
String[] - argNames: the argument namelist or null
Field[] - argValues: the argument values or null.
 o forward
 public abstract void forward(Page toPage) throws ServletException, IOException
Forward this request to the designated page

Parameters:
Page - toPage
 o forward
 public abstract void forward(String relPath) throws ServletException, IOException
Forward this request to the designated page

Parameters:
Page - toPage
 o getAttribute
 public abstract Object getAttribute(String key) throws IOException
Get a session attribute.

 o getCookie
 public abstract String getCookie(String cookieName)
Get cookie value

Parameters:
String - cookieName
 o getField
 public abstract Field getField(String key,
                                Field defaultValue) throws Exception
 o getParameter
 public abstract String getParameter(String key,
                                     Field defaultValue) throws IOException
Get a request parameter. If null, returns defaultValue.toString()

 o getRequest
 public abstract HttpServletRequest getRequest()
 o getRequestDispatcher
 public abstract RequestDispatcher getRequestDispatcher(String relativeUrl)
Return the requestDispatcher for the provided context-relative url

Returns:
RequestDispatcher
 o getResponse
 public abstract HttpServletResponse getResponse()
 o getSession
 public abstract HttpSession getSession()
 o getWriter
 public abstract PrintWriter getWriter() throws IOException
Get the printwriter for this view

 o include
 public abstract void include(Page toPage) throws ServletException, IOException
Forward this request to the designated page

Parameters:
Page - toPage
 o include
 public abstract void include(String relPath) throws ServletException, IOException
Forward this request to this page.

Parameters:
Page - toPage
 o redirect
 public abstract void redirect(Page toPage) throws ServletException, IOException
Forward this request to the designated page

Parameters:
Page - toPage
 o redirect
 public abstract void redirect(String absPath) throws ServletException, IOException
Forward this request to the designated page

Parameters:
Page - toPage
 o send
 public abstract void send(String s) throws IOException
 o sendPage
 public abstract void sendPage(String s) throws Exception
 o sendPageClose
 public abstract void sendPageClose() throws Exception
 o sendPageOpen
 public abstract void sendPageOpen() throws Exception
 o setAttribute
 public abstract void setAttribute(String key,
                                   Object value)
Insert the method's description here. Creation date: (05/21/00 11:14:47)

 o setCookie
 public abstract void setCookie(String cookieName,
                                String cookieValue)
Set a cookie to the provided value

Parameters:
String - cookieName
String - cookieValue

All Packages  Class Hierarchy  This Package  Previous  Next  Index