WebObjects 5.2.3

com.webobjects.directtoweb
Class TabDictionaryComputer

java.lang.Object
  extended bycom.webobjects.directtoweb.Assignment
      extended bycom.webobjects.directtoweb.TabDictionaryComputer
All Implemented Interfaces:
EOKeyValueArchiving, Serializable

public class TabDictionaryComputer
extends Assignment

The list of tab names and of tab contents is not a rule firing phenomenon. It is entirely determined by the tab names. But by making it the result of rule firing, we can take advantage of the caching mechanism which we otherwise would have to replicate in the TabInspectPage.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueArchiving
EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
 
Field Summary
 
Fields inherited from class com.webobjects.directtoweb.Assignment
KeyPathKey, ValueKey
 
Constructor Summary
TabDictionaryComputer(EOKeyValueUnarchiver unarchiver)
          Constructs a new TabDictionaryComputer based on an EOKeyValueUnarchiver.
TabDictionaryComputer(String keyPath, Object value)
          Constructs a new TabDictionaryComputer with the specified key path and value.
 
Method Summary
static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
          This method is intentionally undocumented.
 Object fire(D2WContext context)
          This method is invoked when a rule fires.
 boolean tabNameIsInHeader(String tabName)
          Tests whether the tab name is the header.
 
Methods inherited from class com.webobjects.directtoweb.Assignment
encodeWithKeyValueArchiver, keyPath, toString, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabDictionaryComputer

public TabDictionaryComputer(String keyPath,
                             Object value)
Constructs a new TabDictionaryComputer with the specified key path and value.

Parameters:
keyPath - - the key path.
value - - the value.

TabDictionaryComputer

public TabDictionaryComputer(EOKeyValueUnarchiver unarchiver)
Constructs a new TabDictionaryComputer based on an EOKeyValueUnarchiver. This is used to read the assignment information from a rule file.

Parameters:
unarchiver - - the unarchiver.
Method Detail

decodeWithKeyValueUnarchiver

public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)
Description copied from class: Assignment
This method is intentionally undocumented. You should never have to invoke or customize it.


fire

public Object fire(D2WContext context)
Description copied from class: Assignment
This method is invoked when a rule fires. It returns the right-hand side value (an Object) for a right-hand side key in the Direct to Web context. You can override this method to provide your own assignments.

Overrides:
fire in class Assignment
Parameters:
context - - the Direct to Web context.
Returns:
the value.

tabNameIsInHeader

public boolean tabNameIsInHeader(String tabName)
Tests whether the tab name is the header.

Parameters:
tabName - - the name of the tab.
Returns:
true if the name is null or empty; false, otherwise.

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.