Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.infohazard.maverick.flow
Class ViewRegistry  view ViewRegistry download ViewRegistry.java

java.lang.Object
  extended byorg.infohazard.maverick.flow.ViewRegistry
Direct Known Subclasses:
ViewRegistryShunted, ViewRegistrySimple

abstract class ViewRegistry
extends java.lang.Object

Factory for defining global view objects which can then be referenced for the creation of individual commands.


Field Summary
static java.lang.String ANONYMOUS_VIEW_NAME
          The name assigned to anonymous views.
protected static java.lang.String ATTR_VIEW_ID
           
protected static java.lang.String ATTR_VIEW_MODE
           
protected static java.lang.String ATTR_VIEW_NAME
           
protected static java.lang.String ATTR_VIEW_REF
           
private static org.apache.commons.logging.Log log
          Logger.
protected  MasterFactory masterFact
           
protected static java.lang.String TAG_VIEW
           
 
Constructor Summary
ViewRegistry(MasterFactory masterFact)
           
 
Method Summary
protected abstract  void addView(java.util.Map target, java.lang.String viewName, java.lang.String ref)
          Adds any views to the target Map which are associated with the viewName.
protected abstract  void addView(java.util.Map target, java.lang.String viewName, java.lang.String mode, View v)
          Adds one view to the target Map, using the specified mode.
 java.util.Map createViewsMap(java.util.List viewNodes)
          Creates a mapping from view name to View object.
protected abstract  void defineGlobalView(java.lang.String id, java.lang.String mode, View v)
          Defines a global view which can later be used by calling addView() with the ref parameter.
 void defineGlobalViews(org.jdom.Element viewsNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANONYMOUS_VIEW_NAME

public static final java.lang.String ANONYMOUS_VIEW_NAME
The name assigned to anonymous views. No risk of conflicts because anonymous views are only allowed when there are no other views specified.

See Also:
Constant Field Values

TAG_VIEW

protected static final java.lang.String TAG_VIEW
See Also:
Constant Field Values

ATTR_VIEW_ID

protected static final java.lang.String ATTR_VIEW_ID
See Also:
Constant Field Values

ATTR_VIEW_MODE

protected static final java.lang.String ATTR_VIEW_MODE
See Also:
Constant Field Values

ATTR_VIEW_NAME

protected static final java.lang.String ATTR_VIEW_NAME
See Also:
Constant Field Values

ATTR_VIEW_REF

protected static final java.lang.String ATTR_VIEW_REF
See Also:
Constant Field Values

log

private static org.apache.commons.logging.Log log
Logger.


masterFact

protected MasterFactory masterFact
Constructor Detail

ViewRegistry

public ViewRegistry(MasterFactory masterFact)
Method Detail

defineGlobalViews

public void defineGlobalViews(org.jdom.Element viewsNode)
                       throws ConfigException

createViewsMap

public java.util.Map createViewsMap(java.util.List viewNodes)
                             throws ConfigException
Creates a mapping from view name to View object. Nameless views are given the name ANONYMOUS_VIEW_NAME, in which case it will be the only view available.


defineGlobalView

protected abstract void defineGlobalView(java.lang.String id,
                                         java.lang.String mode,
                                         View v)
                                  throws ConfigException
Defines a global view which can later be used by calling addView() with the ref parameter.


addView

protected abstract void addView(java.util.Map target,
                                java.lang.String viewName,
                                java.lang.String ref)
                         throws ConfigException
Adds any views to the target Map which are associated with the viewName.


addView

protected abstract void addView(java.util.Map target,
                                java.lang.String viewName,
                                java.lang.String mode,
                                View v)
                         throws ConfigException
Adds one view to the target Map, using the specified mode.