Package org.opencms.jsp
Class CmsJspTagSearch
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- org.opencms.jsp.CmsJspScopedVarBodyTagSuport
-
- org.opencms.jsp.CmsJspTagSearch
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.jsp.tagext.BodyTag
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
,I_CmsCollectorPublishListProvider
public class CmsJspTagSearch extends CmsJspScopedVarBodyTagSuport implements I_CmsCollectorPublishListProvider
This tag is used to easily create a search form for a Solr search within a JSP.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CONTENTINFO_ROWS
Default number of items which are checked for change for the "This page" publish dialog.protected CmsObject
m_cms
The CmsObject for the current user.protected CmsFlexController
m_controller
The FlexController for the current request.
-
Constructor Summary
Constructors Constructor Description CmsJspTagSearch()
Empty constructor, required for JSP tags.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
int
doStartTag()
java.lang.Object
getConfigFile()
Get the value of the specified configuration file (given via the tag's "configFile" attribute).java.lang.String
getConfigString()
Getter for the "configString".java.lang.String
getFileFormat()
Get the value of the specified format of the configuration file (given via the tag's "fileFormat" attribute).java.util.Set<CmsResource>
getPublishResources(CmsObject cms, I_CmsContentLoadCollectorInfo info)
Gets the publish list for the collector.static java.util.Set<CmsResource>
getPublishResourcesInternal(CmsObject cms, I_CmsContentLoadCollectorInfo info)
protected void
init()
Initializes this formatter tag.void
release()
void
setAddContentInfo(java.lang.Boolean doAddInfo)
Setter for "addContentInfo", indicating if content information should be added.void
setConfigFile(java.lang.Object fileName)
Setter for the configuration file.void
setConfigString(java.lang.String configString)
Setter for the "configString".void
setContentInfoMaxItems(java.lang.Integer maxItems)
Setter for "contentInfoMaxItems".void
setFileFormat(java.lang.String fileFormat)
Setter for the file format.-
Methods inherited from class org.opencms.jsp.CmsJspScopedVarBodyTagSuport
getScope, getScopeAsInt, getScopeAsString, getScopeInt, getVar, isScopeVarSet, setScope, setVar, storeAttribute, storeAttribute
-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Field Detail
-
DEFAULT_CONTENTINFO_ROWS
public static final int DEFAULT_CONTENTINFO_ROWS
Default number of items which are checked for change for the "This page" publish dialog.- See Also:
- Constant Field Values
-
m_controller
protected CmsFlexController m_controller
The FlexController for the current request.
-
-
Constructor Detail
-
CmsJspTagSearch
public CmsJspTagSearch()
Empty constructor, required for JSP tags.
-
-
Method Detail
-
getPublishResourcesInternal
public static java.util.Set<CmsResource> getPublishResourcesInternal(CmsObject cms, I_CmsContentLoadCollectorInfo info) throws CmsException
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
BodyTagSupport.doEndTag()
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException, CmsIllegalArgumentException
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
CmsIllegalArgumentException
- See Also:
Tag.doStartTag()
-
getConfigFile
public java.lang.Object getConfigFile()
Get the value of the specified configuration file (given via the tag's "configFile" attribute).- Returns:
- The config file.
-
getConfigString
public java.lang.String getConfigString()
Getter for the "configString".- Returns:
- The "configString".
-
getFileFormat
public java.lang.String getFileFormat()
Get the value of the specified format of the configuration file (given via the tag's "fileFormat" attribute).- Returns:
- The file format.
-
getPublishResources
public java.util.Set<CmsResource> getPublishResources(CmsObject cms, I_CmsContentLoadCollectorInfo info) throws CmsException
Description copied from interface:I_CmsCollectorPublishListProvider
Gets the publish list for the collector.- Specified by:
getPublishResources
in interfaceI_CmsCollectorPublishListProvider
- Parameters:
cms
- the CMS context to useinfo
- the collector information- Returns:
- the resources to include in the publish list
- Throws:
CmsException
- if soemthing goes wrong- See Also:
I_CmsCollectorPublishListProvider.getPublishResources(org.opencms.file.CmsObject, org.opencms.gwt.shared.I_CmsContentLoadCollectorInfo)
-
release
public void release()
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classCmsJspScopedVarBodyTagSuport
- See Also:
Tag.release()
-
setAddContentInfo
public void setAddContentInfo(java.lang.Boolean doAddInfo)
Setter for "addContentInfo", indicating if content information should be added.- Parameters:
doAddInfo
- The value of the "addContentInfo" attribute of the tag
-
setConfigFile
public void setConfigFile(java.lang.Object fileName)
Setter for the configuration file.- Parameters:
fileName
- Name of the configuration file to use for the search.
-
setConfigString
public void setConfigString(java.lang.String configString)
Setter for the "configString".- Parameters:
configString
- The "configString".
-
setContentInfoMaxItems
public void setContentInfoMaxItems(java.lang.Integer maxItems)
Setter for "contentInfoMaxItems".- Parameters:
maxItems
- number of items to maximally check for alterations.
-
setFileFormat
public void setFileFormat(java.lang.String fileFormat)
Setter for the file format.- Parameters:
fileFormat
- File format the configuration file is in.
-
init
protected void init() throws javax.servlet.jsp.JspException
Initializes this formatter tag.- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
-