org.mmbase.bridge.jsp.taglib
Class CloudTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended by org.mmbase.bridge.jsp.taglib.CloudTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally, CloudProvider, ParamHandler, TagIdentifier

public class CloudTag
extends ContextReferrerTag
implements CloudProvider, ParamHandler

Creates a cloud object (pulling it from if session necessary). While creating a cloud object one also has to authenticate itself, so this functionality is also in this tag.

Version:
$Id: CloudTag.java 42057 2010-04-27 14:06:24Z michiel $
Author:
Pierre van Rooden, Michiel Meeuwissen, Vincent van der Locht
See Also:
Serialized Form

Field Summary
static String KEY
           
static int SCOPE
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
CloudTag()
           
 
Method Summary
 void addParameter(String key, Object value)
           
protected  void dereference()
           
 int doAfterBody()
           
 int doEndTag()
           
 void doFinally()
           
 int doStartTag()
          Sets the cloud variable considering all requirements.
protected  String getAuthenticate()
           
 Cloud getCloudVar()
           
 CloudContext getDefaultCloudContext()
           
protected  int getMethod()
           
protected  int getMethodOrDefault()
           
protected  String getName()
           
protected  Rank getRank()
          Gives the configured rank as a Rank object
 String getSessionName()
           
 void setAuthenticate(String authenticate)
           
 void setCloudVar(Cloud c)
           
 void setJspvar(String jv)
           
 void setLoginpage(String loginpage)
           
 void setLogon(String l)
           
 void setMethod(String mm)
           
 void setName(String name)
           
 void setPageContext(PageContext pc)
          request and response can be determined once a page..
 void setPassword(String pwd)
          Synonym for setPwd.
 void setPwd(String pwd)
           
 void setRank(String r)
           
 void setSessionname(String s)
           
 void setUri(String uri)
           
 void setUsername(String l)
          Synonym for setLogon.
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
appendMoreParameters, doCatch, fillStandardParameters, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocale, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setListdelimiter, setPageContextOnly, setReferid, setVartype, setWrite, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.jsp.taglib.TagIdentifier
getId
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

KEY

public static final String KEY
See Also:
Constant Field Values

SCOPE

public static final int SCOPE
See Also:
Constant Field Values
Constructor Detail

CloudTag

public CloudTag()
Method Detail

getDefaultCloudContext

public CloudContext getDefaultCloudContext()
                                    throws JspTagException
Returns:
the default cloud context
Throws:
JspTagException

setUri

public void setUri(String uri)
            throws JspTagException
Throws:
JspTagException

setName

public void setName(String name)
             throws JspTagException
Throws:
JspTagException

getName

protected String getName()
                  throws JspTagException
Throws:
JspTagException

setLogon

public void setLogon(String l)
              throws JspTagException
Throws:
JspTagException

setPwd

public void setPwd(String pwd)
            throws JspTagException
Throws:
JspTagException

setUsername

public void setUsername(String l)
                 throws JspTagException
Synonym for setLogon. Don't mix.

Throws:
JspTagException

setPassword

public void setPassword(String pwd)
                 throws JspTagException
Synonym for setPwd. Don't mix.

Throws:
JspTagException

setRank

public void setRank(String r)
             throws JspTagException
Throws:
JspTagException

getRank

protected Rank getRank()
                throws JspTagException
Gives the configured rank as a Rank object

Throws:
JspTagException

addParameter

public void addParameter(String key,
                         Object value)
Specified by:
addParameter in interface ParamHandler

setJspvar

public void setJspvar(String jv)
Overrides:
setJspvar in class ContextReferrerTag

setAuthenticate

public void setAuthenticate(String authenticate)
                     throws JspTagException
Throws:
JspTagException

getAuthenticate

protected String getAuthenticate()
                          throws JspTagException
Throws:
JspTagException

setMethod

public void setMethod(String mm)
               throws JspTagException
Throws:
JspTagException

getMethod

protected int getMethod()
                 throws JspTagException
Throws:
JspTagException

getMethodOrDefault

protected int getMethodOrDefault()
                          throws JspTagException
Returns:
The login-method, or METHOD_LOGINPAGE if loginpage was specified, or the default method of the authentication implemnetation if also that was not specified.
Throws:
JspTagException
Since:
MMBase-1.8

getCloudVar

public Cloud getCloudVar()
Specified by:
getCloudVar in interface CloudProvider
Returns:
the cloud contained in the tag

setCloudVar

public void setCloudVar(Cloud c)

setSessionname

public void setSessionname(String s)
                    throws JspTagException
Throws:
JspTagException

setLoginpage

public void setLoginpage(String loginpage)
                  throws JspTagException
Throws:
JspTagException

getSessionName

public String getSessionName()
                      throws JspTagException
Throws:
JspTagException

setPageContext

public void setPageContext(PageContext pc)
request and response can be determined once a page..

Specified by:
setPageContext in interface Tag
Overrides:
setPageContext in class ContextReferrerTag

doStartTag

public int doStartTag()
               throws JspTagException
Sets the cloud variable considering all requirements. SKIP_BODY if this can not be done.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspTagException

doEndTag

public int doEndTag()
             throws JspTagException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
JspTagException

dereference

protected void dereference()

doFinally

public void doFinally()
Specified by:
doFinally in interface TryCatchFinally
Overrides:
doFinally in class ContextReferrerTag

doAfterBody

public int doAfterBody()
                throws JspTagException
Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class BodyTagSupport
Throws:
JspTagException


MMBase 2.0-SNAPSHOT - null