Class CMSComponentTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- de.hybris.platform.cms2lib.cmstags.CMSComponentTag
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
public class CMSComponentTag extends javax.servlet.jsp.tagext.TagSupport- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDEFAULT_CONTROLLERprotected static java.lang.StringINIT_LE_JS
-
Constructor Summary
Constructors Constructor Description CMSComponentTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intdoEndTag()intdoStartTag()protected java.util.Collection<SimpleCMSComponentModel>getComponents(org.springframework.web.context.WebApplicationContext appContext, javax.servlet.http.HttpServletRequest request)protected javax.servlet.ServletContextgetServletContext()protected voidinit()protected voidinitLiveEditJS(javax.servlet.http.HttpServletRequest request)protected booleanisAllowed(AbstractCMSComponentModel component, RestrictionData restrictionData, CMSRestrictionService cmsRestrictionService, boolean previewEnabled)Checks whether component should be displayed.protected booleanisLiveEdit()Deprecated.since 1811, not used anymoreprotected booleanisPreviewEnabled()protected RestrictionDatapopulate(javax.servlet.http.HttpServletRequest request, CMSDataFactory cmsDataFactory)Wrapped all information fetched from current HTTP requestvoidrelease()voidsetComponent(AbstractCMSComponentModel component)voidsetEvaluateRestriction(boolean evaluateRestriction)voidsetUid(java.lang.String uid)
-
-
-
Field Detail
-
INIT_LE_JS
protected static final java.lang.String INIT_LE_JS
- See Also:
- Constant Field Values
-
DEFAULT_CONTROLLER
protected static final java.lang.String DEFAULT_CONTROLLER
- See Also:
- Constant Field Values
-
-
Method Detail
-
release
public void release()
- Specified by:
releasein interfacejavax.servlet.jsp.tagext.Tag- Overrides:
releasein classjavax.servlet.jsp.tagext.TagSupport
-
init
protected void init()
-
getServletContext
protected javax.servlet.ServletContext getServletContext()
-
getComponents
protected java.util.Collection<SimpleCMSComponentModel> getComponents(org.springframework.web.context.WebApplicationContext appContext, javax.servlet.http.HttpServletRequest request) throws CMSItemNotFoundException
- Throws:
CMSItemNotFoundException
-
isAllowed
protected boolean isAllowed(AbstractCMSComponentModel component, RestrictionData restrictionData, CMSRestrictionService cmsRestrictionService, boolean previewEnabled)
Checks whether component should be displayed.
Note: Computation takes into account:- Checks whether component is visible
- If component is restricted checks whether we should display it
-
isPreviewEnabled
protected boolean isPreviewEnabled()
-
isLiveEdit
@Deprecated protected boolean isLiveEdit()
Deprecated.since 1811, not used anymore
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjavax.servlet.jsp.tagext.TagSupport- Throws:
javax.servlet.jsp.JspException
-
initLiveEditJS
protected void initLiveEditJS(javax.servlet.http.HttpServletRequest request)
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.TagSupport- Throws:
javax.servlet.jsp.JspException
-
setUid
public void setUid(java.lang.String uid)
-
setComponent
public void setComponent(AbstractCMSComponentModel component)
-
setEvaluateRestriction
public void setEvaluateRestriction(boolean evaluateRestriction)
-
populate
protected RestrictionData populate(javax.servlet.http.HttpServletRequest request, CMSDataFactory cmsDataFactory)
Wrapped all information fetched from current HTTP request- Parameters:
request- current HTTP request- Returns:
- all gather information wrapped to
RestrictionDataobject
-
-