Package com.microstrategy.web.app.addons
Class SearchSupportedTypesAddon
- java.lang.Object
-
- com.microstrategy.web.app.addons.AbstractAppAddOn
-
- com.microstrategy.web.app.addons.SearchSupportedTypesAddon
-
- All Implemented Interfaces:
AppAddOns
public class SearchSupportedTypesAddon extends AbstractAppAddOn
This add-on will change the search definition of the WebSearchObject of a SearchBean before the search is executed by a search event to ensure that only the list of supported-types are included as part of the search-results.
This add-on will only work if the TypeRestriction property has been set with a comma separated list of integers representing the supported types. If this property is not set or is empty, it will not modify the search.- Since:
- MicroStrategy Web 9.0.0
-
-
Constructor Summary
Constructors Constructor Description SearchSupportedTypesAddon()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
filterUnsupportedTypes(SearchBean sb)
java.lang.String
getAddOnDescription()
This method describes the tasks performed by the AddOn.protected SearchBean
getSearchBean(PageComponent mstrPage)
protected boolean
isSearchEvent(PageComponent page)
protected boolean
isTypeSupported(int type)
void
preCollectData(PageComponent mstrPage)
This is the main method of the add on which executes the add on.void
setTypeRestriction(java.lang.String values)
This method receives a comma separated list of the types that are supported by the application.-
Methods inherited from class com.microstrategy.web.app.addons.AbstractAppAddOn
getRequestKeys, isCollectDataRequired, isIFrameRequest, postCollectData
-
-
-
-
Method Detail
-
preCollectData
public void preCollectData(PageComponent mstrPage)
Description copied from interface:AppAddOns
This is the main method of the add on which executes the add on. This has to be a static method.- Specified by:
preCollectData
in interfaceAppAddOns
- Overrides:
preCollectData
in classAbstractAppAddOn
- Parameters:
mstrPage
- is the PageComponent.
-
getSearchBean
protected SearchBean getSearchBean(PageComponent mstrPage)
-
filterUnsupportedTypes
protected void filterUnsupportedTypes(SearchBean sb) throws java.lang.ClassCastException, java.lang.UnsupportedOperationException
- Throws:
java.lang.ClassCastException
java.lang.UnsupportedOperationException
-
isTypeSupported
protected boolean isTypeSupported(int type)
-
isSearchEvent
protected boolean isSearchEvent(PageComponent page)
-
setTypeRestriction
public void setTypeRestriction(java.lang.String values)
This method receives a comma separated list of the types that are supported by the application. The SearchBean will be modified to include in its results only objects of this type.
-
getAddOnDescription
public java.lang.String getAddOnDescription()
Description copied from interface:AppAddOns
This method describes the tasks performed by the AddOn.- Returns:
- The tasks which the Add On performs. This needs to be as descriptive as possible.
-
-