com.iplanet.jato.view
Class ViewBase

java.lang.Object
  |
  +--com.iplanet.jato.view.ViewBase
All Implemented Interfaces:
View
Direct Known Subclasses:
ContainerViewBase, DisplayFieldImpl

public class ViewBase
extends java.lang.Object
implements View

The basic view implementation from which all other, more complex views derive. This class handles the basic view behavior common to all view implementations.

Version:
JATO/1.2.2 $Id: ViewBase.java,v 1.11 2002/03/16 03:26:41 todd Exp $

Fields inherited from interface com.iplanet.jato.view.View
QUALIFIED_VIEW_NAME_SEPARATOR
 
Constructor Summary
ViewBase()
          Default constructor
ViewBase(java.lang.String name)
          Constructs an instance with the specified name
ViewBase(View parent)
          Constructs an instance with the specified parent
ViewBase(View parent, java.lang.String name)
          Constructs an instance with the specified parent and name
 
Method Summary
 java.lang.String getName()
          Returns the view's logical (unqualified) name
 View getParent()
          Returns the immeditate parent of this view
 ViewBean getParentViewBean()
          Locates and returns the ultimate view bean parent of this view
 java.lang.String getQualifiedName()
          Returns the view's qualified name
 ViewBean getRootView()
          Locates and returns the ultimate view bean parent of this view.
static ViewBean getRootView(View view)
          Locates and returns the ultimate ViewBean parent of the specified view
 void setName(java.lang.String value)
          Sets this view's logical name.
 void setParent(View parent)
          Sets the immeditate parent of this view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewBase

public ViewBase()
Default constructor

ViewBase

public ViewBase(View parent)
Constructs an instance with the specified parent
Parameters:
parent - The parent view of this view

ViewBase

public ViewBase(java.lang.String name)
Constructs an instance with the specified name
Parameters:
name - The logical name of this view

ViewBase

public ViewBase(View parent,
                java.lang.String name)
Constructs an instance with the specified parent and name
Parameters:
parent - The parent view of this view
name - The logical name of this view
Method Detail

getName

public java.lang.String getName()
Returns the view's logical (unqualified) name
Specified by:
getName in interface View
Returns:
the view's logical (unqualified) name

setName

public void setName(java.lang.String value)
Sets this view's logical name. This name can be any arbitrary string, and is specific to this view alone regardless of containership or other relationships. Because of the use of nested views, users should avoid using periods (".") in the name of a view, as they are normally used to separate parent and child names in a view's qualified name.
Parameters:
value - The new logical name

getQualifiedName

public java.lang.String getQualifiedName()
Returns the view's qualified name
Specified by:
getQualifiedName in interface View
Returns:
the view's qualified name

getParent

public View getParent()
Returns the immeditate parent of this view
Specified by:
getParent in interface View
Returns:
The immeditate parent of this view

setParent

public void setParent(View parent)
Sets the immeditate parent of this view
Specified by:
setParent in interface View
Parameters:
parent - The immeditate parent of this view

getParentViewBean

public ViewBean getParentViewBean()
Locates and returns the ultimate view bean parent of this view
Returns:
The parent view bean, or this if this object is itself a view bean

getRootView

public ViewBean getRootView()
Locates and returns the ultimate view bean parent of this view. This method should be used in preference to getParentViewBean, but there is no functional difference between the two.
Returns:
The parent view bean, or this if this object is itself a view bean

getRootView

public static ViewBean getRootView(View view)
Locates and returns the ultimate ViewBean parent of the specified view
Parameters:
view - The view to search for a ViewBean parent
Returns:
The parent ViewBean of the provided view