echoxul.view.impl
Class ViewImpl

java.lang.Object
  extended byechoxul.view.impl.ViewImpl
All Implemented Interfaces:
java.io.Serializable, View

public class ViewImpl
extends java.lang.Object
implements View, java.io.Serializable

Implementation of the View interface for the builder package. The mutator methods on this class are package private.

Author:
Terry Laurenzo
See Also:
Serialized Form

Constructor Summary
ViewImpl(java.lang.ClassLoader cl)
           
 
Method Summary
 int addStaticReference(java.lang.Object obj)
          Set the static references.
protected  void assertWriteable()
          Throws IllegalStateException if lock() has been called
 ModelViewContextStub createModelViewContextStub(ViewContextImpl vc, nextapp.echo.Component insertionPoint)
          Create a ViewContextStub from a ViewContext, storing the serialized data in the static references.
 ViewContextStub createViewContextStub(ViewContextImpl vc)
          Create a ViewContextStub from a ViewContext, storing the serialized data in the static references.
 java.lang.Object getStaticReference(int index)
          Used by components to retrieve static data that is shared across all sessions.
 java.lang.ClassLoader getViewClassLoader()
          The ClassLoader used to load objects for the View
 ViewContext instantiateRootContext()
          Instantiate a new Root ViewContext
 void lock()
           
 void setRootStub(ViewContextStub stub)
          Set the root context stub.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewImpl

public ViewImpl(java.lang.ClassLoader cl)
Method Detail

assertWriteable

protected void assertWriteable()
Throws IllegalStateException if lock() has been called


lock

public void lock()

addStaticReference

public int addStaticReference(java.lang.Object obj)
Set the static references. Each entry is identified by its index in the array.


createModelViewContextStub

public ModelViewContextStub createModelViewContextStub(ViewContextImpl vc,
                                                       nextapp.echo.Component insertionPoint)
                                                throws ViewException
Create a ViewContextStub from a ViewContext, storing the serialized data in the static references.

Parameters:
vc -
Returns:
Throws:
ViewException

createViewContextStub

public ViewContextStub createViewContextStub(ViewContextImpl vc)
                                      throws ViewException
Create a ViewContextStub from a ViewContext, storing the serialized data in the static references.

Parameters:
vc -
Returns:
Throws:
ViewException

setRootStub

public void setRootStub(ViewContextStub stub)
Set the root context stub. Must be set prior to use.

Parameters:
stub -

getViewClassLoader

public java.lang.ClassLoader getViewClassLoader()
Description copied from interface: View
The ClassLoader used to load objects for the View

Specified by:
getViewClassLoader in interface View
Returns:
ClassLoader

instantiateRootContext

public ViewContext instantiateRootContext()
Description copied from interface: View
Instantiate a new Root ViewContext

Specified by:
instantiateRootContext in interface View
Returns:
new ViewContext

getStaticReference

public java.lang.Object getStaticReference(int index)
Description copied from interface: View
Used by components to retrieve static data that is shared across all sessions. This is the same index assigned at creation time.

Specified by:
getStaticReference in interface View
Parameters:
index -
Returns:


Copyright © 2004 Terry Laurenzo. All Rights Reserved.