com.ideo.sweetdevria.taglib.context
Class ContextManager

java.lang.Object
  extended by com.ideo.sweetdevria.taglib.context.ContextManager
All Implemented Interfaces:
java.io.Serializable

public class ContextManager
extends java.lang.Object
implements java.io.Serializable

Manage the contexts all along the page evaluation

Author:
Julien Maupoux
See Also:
Serialized Form

Field Summary
static java.lang.String REQUEST_CONTEXT_MANAGER
           
 
Constructor Summary
protected ContextManager()
           
 
Method Summary
 java.lang.String getContext()
          Return the current running context, or null if none have been pushed
 void popContext()
          Remove the last context added
 void popContext(java.lang.String id)
          Pop a context from the stack
 void pushContext(java.lang.String id)
          Push a new context into the stack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_CONTEXT_MANAGER

public static final java.lang.String REQUEST_CONTEXT_MANAGER
See Also:
Constant Field Values
Constructor Detail

ContextManager

protected ContextManager()
Method Detail

pushContext

public void pushContext(java.lang.String id)
Push a new context into the stack

Parameters:
id - the id of the context to push

popContext

public void popContext(java.lang.String id)
Pop a context from the stack

Parameters:
id - the id of the context to pop, as a validation. If the id sent is different of the one at the top of the stack, an exception is thrown
Throws:
java.lang.IllegalArgumentException - if the id sent is different of the one at the top of the stack

popContext

public void popContext()
Remove the last context added


getContext

public java.lang.String getContext()
Return the current running context, or null if none have been pushed

Returns:
the current running context, at the top of the stack, or null if none have been added


Copyright © 2010 Ideo Technologies. All Rights Reserved.