com.sun.portal.wireless.taglibs.base
Class ContextTag

java.lang.Object
  extended byBeanTag
      extended bycom.sun.portal.wireless.taglibs.base.ContextTag

public abstract class ContextTag
extends BeanTag

The ContextTag abstract class supports tags that represent a context for a service.

Subclasses must implement the findContext() method.

Cooperating classes either look for the context in the pageContext with the appropriate name, or use the getContext() method if this is a parent tag.

There are no default attributes for this tag.

See Also:
Context, Serialized Form

Constructor Summary
ContextTag()
           
 
Method Summary
protected  void computeConfigName(PageContext pageContext, java.lang.String configNameKey, java.lang.String ssoAdapterKey, java.lang.String configType)
          Computes a configuration name to ensure that a useable configName is chosen.
 int doStartTag()
          Makes the context available.
 java.lang.Object findBean()
          Gets the context as a bean.
abstract  Context findContext()
          Finds the context this tag represents.
 java.lang.Object newBean()
          Gets the context as a bean.
 void release()
          Releases resources held by this object.
 void setConfig(java.lang.String s)
          Sets the "config" tag attribute.
 void setTest(java.lang.String s)
          Sets the "test" tag attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextTag

public ContextTag()
Method Detail

findContext

public abstract Context findContext()
                             throws java.lang.Exception
Finds the context this tag represents. Subclasses must implement this method to return the appropriate context for this session.

Returns:
the context
Throws:
java.lang.Exception

newBean

public java.lang.Object newBean()
                         throws java.lang.Exception
Gets the context as a bean.

Returns:
the context
Throws:
java.lang.Exception

findBean

public java.lang.Object findBean()
                          throws java.lang.Exception
Gets the context as a bean.

Returns:
the context
Throws:
java.lang.Exception

doStartTag

public int doStartTag()
               throws JspException
Makes the context available.

Returns:
EVAL_BODY_INCLUDE
Throws:
JspException - if no context is found

computeConfigName

protected void computeConfigName(PageContext pageContext,
                                 java.lang.String configNameKey,
                                 java.lang.String ssoAdapterKey,
                                 java.lang.String configType)
Computes a configuration name to ensure that a useable configName is chosen.


setConfig

public void setConfig(java.lang.String s)
Sets the "config" tag attribute.

Parameters:
s - the name of the SSOAdapter configuration to which this context should be associated.

setTest

public void setTest(java.lang.String s)
Sets the "test" tag attribute.

Parameters:
s - a string value of true or false, which will control the ContextTag's "test" behavior.

release

public void release()
Releases resources held by this object.