Package org.ff4j.web.taglib
Class AbstractFeatureTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.ff4j.web.taglib.AbstractFeatureTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,Serializable
- Direct Known Subclasses:
FeatureTagDisable,FeatureTagEnable
public abstract class AbstractFeatureTag
extends jakarta.servlet.jsp.tagext.TagSupport
Parent class for FF4J TagLib library.
- Author:
- Cedrick LUNVEN
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringError message constant.protected static final StringError message constant.Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddisplayError(String message) Display an error message in tag.intprotected booleanprotected abstract booleanevalWithExecutionContext(FF4j ff4j, jakarta.servlet.jsp.PageContext pageContext, FlippingExecutionContext executionContext) Getter accessor for attribute 'featureid'.Getter accessor for attribute 'ff4jAttributeName'.intgetScope()Getter accessor for attributescope.getVar()Getter accessor for attributevar.booleanGetter accessor for attribute 'shareHttpSession'.voidrelease()voidsetFeatureid(String featureid) Setter accessor for attribute 'featureid'.voidsetScope(int scope) Setter accessor forscope.voidsetShareHttpSession(boolean shareHttpSession) Setter accessor for attribute 'shareHttpSession'.voidSetter accessor forvar.Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
ERROR_MSG_START
Error message constant.- See Also:
-
ERROR_MSG_END
Error message constant.- See Also:
-
-
Constructor Details
-
AbstractFeatureTag
public AbstractFeatureTag()
-
-
Method Details
-
displayError
Display an error message in tag.- Parameters:
message- target message- Throws:
IOException- error
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspException- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException
-
eval
-
evalWithExecutionContext
protected abstract boolean evalWithExecutionContext(FF4j ff4j, jakarta.servlet.jsp.PageContext pageContext, FlippingExecutionContext executionContext) -
getFeatureid
Getter accessor for attribute 'featureid'.- Returns:
- current value of 'featureid'
-
setFeatureid
Setter accessor for attribute 'featureid'.- Parameters:
featureid- new value for 'featureid '
-
getFf4jAttributeName
Getter accessor for attribute 'ff4jAttributeName'.- Returns:
- current value of 'ff4jAttributeName'
-
getVar
Getter accessor for attributevar.- Returns:
- current value of
var
-
setVar
Setter accessor forvar.- Parameters:
var- new value forvar
-
getScope
public int getScope()Getter accessor for attributescope.- Returns:
- current value of
scope
-
setScope
public void setScope(int scope) Setter accessor forscope.- Parameters:
scope- new value forscope
-
release
public void release()- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.TagSupport
-