Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiWhiteboard


public interface EbiWhiteboard

Information that persists between requests is stored in the EbiSession object, which is available from the context. The session includes an "EbiWhiteboard" that holds values that a component might need to keep available. You give each whiteboard value a key, which you use to retrieve the value.


Method Summary
 EbiWhiteboardEraser addEraser(String eraserName)
          Adds the named eraser to the whiteboard.
 void clear()
          Clears the contents of the whiteboard.
 void dump(com.sssw.fw.api.Writer writer)
          Dumps the contents of the whiteboard to the specified writer.
 Enumeration getAttributeNames()
          Returns an Enumeration of String objects containing the names of all the objects bound to this whiteboard.
 EbiWhiteboardEraser getEraser(String eraserName)
          Returns an instance of an com.sssw.fw.api.EbiWhiteboardEraser object whose name is specified in the parameter.
 Enumeration getScopedAttributeNames()
          Returns an Enumeration of String objects containing the names of all the objects bound to this whiteboard at the narrowest session scope.
 Object getScopedValue(String key)
          Returns the object bound with the specified name in this session at the privately scoped level
 ThreadGroup getThreadGroup()
          Returns a ThreadGroup object.
 Object getValue(String key)
          Returns the object bound with the specified name in this session at the privately scoped level
 String[] getValueNames()
          Deprecated.  
 boolean hasEraser(String eraserName)
          Returns a boolean indication as to the existence of the named eraser on the current whiteboard.
 boolean hasScopedValue(String key)
          Checks to see if the specified key is found on the whiteboard within the scoped session.
 boolean hasValue(String key)
          Checks to see if the specified key is found on the whiteboard
 void log()
          Dumps the contents of the whiteboard
 void removeAllErasers()
          Clears all erasers from the current whiteboard.
 void removeAllValues()
          Clears the contents of the whiteboard.
 void removeEraser(String eraserName)
          Removes the named eraser from the whiteboard.
 void removeScopedValue(String key)
          Removes the object bound with the specified name from this whiteboard within the narrowest scope.
 void removeValue(String key)
          Removes the object bound with the specified name from this whiteboard.
 void setEraserLife(String eraserName, int life)
          Sets a timer for the named eraser.
 void setEraserMaxCounter(String eraserName, int counter)
          Set a counter for the named eraser.
 void setScopedValue(String key, Object value)
          Binds an object to the whiteboard at the narrowest scoped level with the given key as a name
 void setThreadGroup(ThreadGroup threadOwner)
          Adds the passed ThreadGroup to the current whiteboard.
 void setValue(String key, Object value)
          Binds an object to the whiteboard with the given key as a name
 String toString()
          Returns a String representation of the whiteboard
 

Method Detail

setValue

public void setValue(String key,
                     Object value)
Binds an object to the whiteboard with the given key as a name
Parameters:
key - string specifying the name of the object
value - the object to be bound to the whiteboard

setScopedValue

public void setScopedValue(String key,
                           Object value)
Binds an object to the whiteboard at the narrowest scoped level with the given key as a name

If the session does not have a privately scoped level then no object is bound. an example of a privately scoped level is the javax.portlet.PortletSession.PORTLET_SCOPE.

Parameters:
key - string specifying the name of the object
value -  
Since:
v5.0

getValue

public Object getValue(String key)
Returns the object bound with the specified name in this session at the privately scoped level

If the session does not have a privately scoped level then null is returned. an example of a privately scoped level is the javax.portlet.PortletSession.PORTLET_SCOPE.

Parameters:
key - string specifying the name of the object
Returns:
The object with the specified name.
Since:
v5.0

getScopedValue

public Object getScopedValue(String key)
Returns the object bound with the specified name in this session at the privately scoped level

If the session does not have a privately scoped level then null is returned. an example of a privately scoped level is the javax.portlet.PortletSession.PORTLET_SCOPE.

Parameters:
key - string specifying the name of the object
Returns:
The object with the specified name.
Since:
v5.0

removeValue

public void removeValue(String key)
Removes the object bound with the specified name from this whiteboard. If the whiteboard does not have an object bound with the specified name, this method does nothing.
Parameters:
key - name of the object to remove from this whiteboard.

removeScopedValue

public void removeScopedValue(String key)
Removes the object bound with the specified name from this whiteboard within the narrowest scope.

An example of a privately scoped level is the javax.portlet.PortletSession.PORTLET_SCOPE.

Parameters:
key - name of the object to remove from this whiteboard.
Since:
v5.0

hasValue

public boolean hasValue(String key)
Checks to see if the specified key is found on the whiteboard
Returns:
A boolean indication of the existance of the key on the whiteboard

hasScopedValue

public boolean hasScopedValue(String key)
Checks to see if the specified key is found on the whiteboard within the scoped session.

If the session does not have a privately scoped level then null is returned. an example of a privately scoped level is the javax.portlet.PortletSession.PORTLET_SCOPE.

Returns:
A boolean indication of the existance of the key on the whiteboard
Since:
v5.0

getValueNames

public String[] getValueNames()
Deprecated.  

Returns an array of String objects containing the names of all the objects bound to this whiteboard.
See Also:
EbiWhiteboard.getAttributeNames()

getAttributeNames

public Enumeration getAttributeNames()
Returns an Enumeration of String objects containing the names of all the objects bound to this whiteboard.

getScopedAttributeNames

public Enumeration getScopedAttributeNames()
Returns an Enumeration of String objects containing the names of all the objects bound to this whiteboard at the narrowest session scope.

If the session does not have a privately scoped level null is returned. an example of a privately scoped level is the javax.portlet.PortletSession.PORTLET_SCOPE.

Returns:
An Enumeration of String objects specifying the names of all the objects bound to this whiteboard.
Since:
v5.0

clear

public void clear()
Clears the contents of the whiteboard. Whiteboard erasers are NOT cleared.

addEraser

public EbiWhiteboardEraser addEraser(String eraserName)
Adds the named eraser to the whiteboard.
Parameters:
Name - to be given to the eraser.

getEraser

public EbiWhiteboardEraser getEraser(String eraserName)
Returns an instance of an com.sssw.fw.api.EbiWhiteboardEraser object whose name is specified in the parameter.
Parameters:
The - name of the eraser to be returned.
Returns:
An instance of an com.sssw.fw.api.EbiWhiteboardEraser object.

hasEraser

public boolean hasEraser(String eraserName)
Returns a boolean indication as to the existence of the named eraser on the current whiteboard.
Parameters:
The - name of the eraser to find.
Returns:
A boolean indication of the existence of the named eraser.

removeEraser

public void removeEraser(String eraserName)
Removes the named eraser from the whiteboard.
Parameters:
The - name of the eraser to remove.

removeAllErasers

public void removeAllErasers()
Clears all erasers from the current whiteboard.

setEraserLife

public void setEraserLife(String eraserName,
                          int life)
Sets a timer for the named eraser. The eraser will erase once the timer has expired.
Parameters:
The - name of the eraser.
The - timer value in milliseconds.

setEraserMaxCounter

public void setEraserMaxCounter(String eraserName,
                                int counter)
Set a counter for the named eraser. The eraser will erase once the object tied to the eraser has been accessed by the number of times specified in the counter parameter.
Parameters:
The - name of the eraser.
The - number of access before eraser is activated.

getThreadGroup

public ThreadGroup getThreadGroup()
Returns a ThreadGroup object. If none is found a ThreadGroup object name "ERASERS" will be created and returned.
Returns:
A ThreadGroup object.

setThreadGroup

public void setThreadGroup(ThreadGroup threadOwner)
Adds the passed ThreadGroup to the current whiteboard.
Parameters:
A - ThreadGoup object.

removeAllValues

public void removeAllValues()
Clears the contents of the whiteboard. Both whiteboard contents and whiteboard erasers are cleared.

dump

public void dump(com.sssw.fw.api.Writer writer)
Dumps the contents of the whiteboard to the specified writer.
Parameters:
A - writer object

log

public void log()
Dumps the contents of the whiteboard

toString

public String toString()
Returns a String representation of the whiteboard
Overrides:
toString in class Object
Returns:
A String representation of the whiteboard.

Novell exteNd
Director 5.2 API