WebObjects 5.4.2

com.webobjects.directtoweb
Class TabDictionaryComputer

java.lang.Object
  extended by com.webobjects.directtoweb.Assignment
      extended by com.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/interfaces inherited from interface 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)
           
 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

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.

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.

decodeWithKeyValueUnarchiver

public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver)

Last updated June 2008

Copyright © 2000-2008 Apple Inc.