pt.moredata.taglibs.protectcontent
Class ProtectedContentTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bypt.moredata.connection.taglibs.EnforceLoginTag
          extended bypt.moredata.taglibs.protectcontent.ProtectedContentTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class ProtectedContentTag
extends EnforceLoginTag
implements javax.servlet.jsp.tagext.TryCatchFinally

ProtectedContentTag.java Implementação de uma tag que permite proteger o conteudo de uma pagina em jsp. O conteudo protegido só será visivel a um conjunto restrito de utilizadores. A definição de quais os utilizadores com permissão para aceder ao conteudo protegido pode ser feito atraves de uma tag que extenda a tag AbstractPolicyTag. Company MoreData

Version:
$Revision: 1.6 $
Author:
pcarmo
See Also:
Serialized Form

Field Summary
 
Fields inherited from class pt.moredata.connection.taglibs.EnforceLoginTag
_dataSource, _jstlDataSource
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
ProtectedContentTag()
           
 
Method Summary
 int doEndTag()
          Processa o fim da tag.
 void doFinally()
          Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.
 int doStartTag()
          Implemetacao da tag.
 java.lang.String getEnforceLogin()
          Getter for property enforceLogin.
 void incAuthorizedPolicys()
          Incrementa o numero de roles a que o utilizador pertence e que dao acesso ao conteudo da Tag.
 void incNoAuthorizedPolicys()
          Incrementa o numero de roles a que o utilizador pertence e que impedem o acesso ao conteudo da Tag.
 void setEnforceLogin(boolean enforceLogin)
          Setter for property enforceLogin.
 void setEnforceLogin(java.lang.String enforceLogin)
          Setter for property enforceLogin.
 boolean showContent()
          Indica se o conteudo da pagina deve ou nao ser mostrado.
 
Methods inherited from class pt.moredata.connection.taglibs.EnforceLoginTag
doCatch, setConnectionId, setDataSourceId, setErrorPage, setJstlDataSourceId, setLoginPage
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.TryCatchFinally
doCatch
 

Constructor Detail

ProtectedContentTag

public ProtectedContentTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Implemetacao da tag.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class EnforceLoginTag
Returns:
a accao que deve ser tomada pelo servidor de .jsp apos ler a tag.
Throws:
javax.servlet.jsp.JspTagException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Description copied from class: EnforceLoginTag
Processa o fim da tag.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class EnforceLoginTag
Returns:
a accao que deve ser tomada pelo servidor de .jsp apos ler a tag.
Throws:
javax.servlet.jsp.JspTagException

doFinally

public void doFinally()
Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag. This method is invoked even if an exception has occurred in the BODY of the tag, or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody(). This method is not invoked if the Throwable occurs during one of the setter methods. This method should not throw an Exception. This method is intended to maintain per-invocation data integrity and resource management actions.

Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally
Overrides:
doFinally in class EnforceLoginTag

incAuthorizedPolicys

public void incAuthorizedPolicys()
Incrementa o numero de roles a que o utilizador pertence e que dao acesso ao conteudo da Tag.


incNoAuthorizedPolicys

public void incNoAuthorizedPolicys()
Incrementa o numero de roles a que o utilizador pertence e que impedem o acesso ao conteudo da Tag.


showContent

public boolean showContent()
Indica se o conteudo da pagina deve ou nao ser mostrado.


setEnforceLogin

public void setEnforceLogin(boolean enforceLogin)
Setter for property enforceLogin.

Parameters:
enforceLogin - New value of property enforceLogin.

setEnforceLogin

public void setEnforceLogin(java.lang.String enforceLogin)
Setter for property enforceLogin.

Parameters:
enforceLogin - New value of property enforceLogin.

getEnforceLogin

public java.lang.String getEnforceLogin()
Getter for property enforceLogin.

Returns:
Value of property enforceLogin.