org.apache.beehive.netui.pageflow.requeststate
Class NameService

Object
  extended by NameService

public class NameService
extends Object


Method Summary
 void debugSetNameIntValue(int val)
          This is a debug method that will set the next integer value.
 INameable get(String name)
           
static NameService instance(HttpSession session)
          This will return the session specific instance of a NameService.
 void nameObject(String namePrefix, INameable object)
          This method will create a unique name for an INameable object.
 void put(INameable object)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static NameService instance(HttpSession session)
This will return the session specific instance of a NameService. There will only be a single NameService per session.

Parameters:
session - the HttpSession that contains the NameService
Returns:
the NameService associated with the session.

nameObject

public void nameObject(String namePrefix,
                       INameable object)
This method will create a unique name for an INameable object. The name will be unque within the session. This will throw an IllegalStateException if INameable.setObjectName has previously been called on object.

Parameters:
namePrefix - The prefix of the generated name.
object - the INameable object.
Throws:
IllegalStateException - if this method is called more than once for an object

debugSetNameIntValue

public void debugSetNameIntValue(int val)
This is a debug method that will set the next integer value. This is used so tests can force the name.

Parameters:
val -

put

public void put(INameable object)
Parameters:
object -

get

public INameable get(String name)
Parameters:
name -
Returns:
INameable