Package org.silverpeas.web.pdc.control
Class PdcSearchSessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.web.pdc.control.PdcSearchSessionController
-
- All Implemented Interfaces:
Serializable,ComponentSessionController,SessionCloseable
public class PdcSearchSessionController extends AbstractComponentSessionController
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringALL_DATA_TYPEstatic intSEARCH_ADVANCEDstatic intSEARCH_EXPERTstatic intSEARCH_SIMPLEstatic intSEARCH_XMLstatic intSHOWRESULTS_ALLstatic intSHOWRESULTS_ONLY_PDCstatic StringSORT_ORDER_ASCstatic StringSORT_ORDER_DESC-
Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
context
-
-
Constructor Summary
Constructors Constructor Description PdcSearchSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext, String multilangBundle, String iconBundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildComponentListWhereToSearch(String space, String component)This method allows the user to search over optional space and/or componentvoidbuildCustomComponentListWhereToSearch(String space, List<String> components)This method allows the user to search over optional space and/or componentsvoidclearFilteredSR()voidclearSearchParameters(boolean clearPages)booleangetActiveThesaurus()List<SilverpeasComponentInstance>getAllowedComponents(String space)Returns the list of allowed components for the current user in the given space/domain.List<SpaceInstLight>getAllowedSpaces()Returns the list of allowed spaces/domains for the current user.intgetCurrentResultsDisplay()ValuegetCurrentValue()StringgetDataType()StringgetDisplayParamChoices()Map<String,Facet>getFieldFacets()List<GlobalSilverResult>getFilteredSR()List<GlobalSilverResult>getGlobalSR()List<Interests>getICenters()intgetIndexOfFirstItemToDisplay()intgetIndexOfFirstResultToDisplay()JargongetJargon()intgetNbItemsPerPage()************************************************************************************************************** PDC search methods (via DomainsBar) ****************************************************************************************************************intgetNbResToDisplay()QueryParametersgetQueryParameters()ResultGroupFiltergetResultGroupFilter()Build the list of result group filter from current global search resultStringgetResultPage()StringgetResultPageId()SearchContextgetSearchContext()StringgetSearchPage()StringgetSearchPageId()intgetSearchType()List<SearchTypeConfigurationVO>getSearchTypeConfig()Retrieve configuration from properties fileStringgetSecondaryAxis()ResultFilterVOgetSelectedFacetEntries()List<GlobalSilverResult>getSelectedSilverContents()List<GlobalSilverResult>getSortedResultsToDisplay(boolean reallySortResults)StringgetSortImplemtor()Gets the keyword to retreive the implementation class name to realize sorting or filteringStringgetSortOrder()intgetSortValue()List<String>getSpellingWords()gets suggestions or spelling words if a search doesn't return satisfying results.intgetTotalResults()PagesContextgetXMLContext()DataRecordgetXmlData()StringgetXmlFormSortValue()Gets the XML form field used to realize sortingPublicationTemplateImplgetXmlTemplate()voidinitializeJargon()StringinitUserPanel()UserPanel methods / ****************************************************************************************************************voidinitXMLSearch(HttpRequest request)booleanisDataTypeDefined()booleanisEnableExternalSearch()booleanisPertinenceVisible()booleanisPlatformUsesPDC()booleanisRefreshEnabled()booleanisXmlSearchVisible()InterestsloadICenter(String icId)voidremoveAllCriterias()intsaveICenter(Interests ic)Interest Center methods / ****************************************************************************************************************voidsearch()voidsearch(String taxonomyPosition)voidsetCurrentResultsDisplay(int currentResultsDisplay)voidsetCurrentResultsDisplay(String param)voidsetDataType(String dataType)voidsetFilteredSR(List<GlobalSilverResult> filteredSR)voidsetIndexOfFirstItemToDisplay(String index)voidsetIndexOfFirstResultToDisplay(int index)voidsetNbResToDisplay(int nbResToDisplay)voidsetResultPage(String resultPage)voidsetResultPageId(String resultPageId)voidsetSearchPage(String searchPage)voidsetSearchPageId(String searchPageId)voidsetSearchType(int i)voidsetSecondaryAxis(String secondAxis)voidsetSelectedFacetEntries(ResultFilterVO selectedFacetEntries)voidsetSelectedSilverContents(List<GlobalSilverResult> silverContents)voidsetSortImplemtor(String sortImplementor)voidsetSortOrder(String sortOrder)voidsetSortValue(int sortValue)voidsetXmlData(DataRecord xmlData)voidsetXmlFormSortValue(String xmlFormSortValue)Sets the XML form field used to realize sortingPublicationTemplateImplsetXmlTemplate(String fileName)-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance
-
-
-
-
Field Detail
-
SORT_ORDER_ASC
public static final String SORT_ORDER_ASC
- See Also:
- Constant Field Values
-
SORT_ORDER_DESC
public static final String SORT_ORDER_DESC
- See Also:
- Constant Field Values
-
SEARCH_SIMPLE
public static final int SEARCH_SIMPLE
- See Also:
- Constant Field Values
-
SEARCH_ADVANCED
public static final int SEARCH_ADVANCED
- See Also:
- Constant Field Values
-
SEARCH_EXPERT
public static final int SEARCH_EXPERT
- See Also:
- Constant Field Values
-
SEARCH_XML
public static final int SEARCH_XML
- See Also:
- Constant Field Values
-
SHOWRESULTS_ALL
public static final int SHOWRESULTS_ALL
- See Also:
- Constant Field Values
-
SHOWRESULTS_ONLY_PDC
public static final int SHOWRESULTS_ONLY_PDC
- See Also:
- Constant Field Values
-
ALL_DATA_TYPE
public static final String ALL_DATA_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PdcSearchSessionController
public PdcSearchSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext, String multilangBundle, String iconBundle)
-
-
Method Detail
-
getSearchContext
public SearchContext getSearchContext()
-
getNbItemsPerPage
public int getNbItemsPerPage()
************************************************************************************************************** PDC search methods (via DomainsBar) ****************************************************************************************************************
-
getIndexOfFirstItemToDisplay
public int getIndexOfFirstItemToDisplay()
-
setIndexOfFirstItemToDisplay
public void setIndexOfFirstItemToDisplay(String index)
-
getIndexOfFirstResultToDisplay
public int getIndexOfFirstResultToDisplay()
-
setIndexOfFirstResultToDisplay
public void setIndexOfFirstResultToDisplay(int index)
-
getDisplayParamChoices
public String getDisplayParamChoices()
-
getNbResToDisplay
public int getNbResToDisplay()
-
setNbResToDisplay
public void setNbResToDisplay(int nbResToDisplay)
-
getSortOrder
public String getSortOrder()
-
setSortOrder
public void setSortOrder(String sortOrder)
-
getSortValue
public int getSortValue()
-
setSortValue
public void setSortValue(int sortValue)
-
getQueryParameters
public QueryParameters getQueryParameters()
-
getResultGroupFilter
public ResultGroupFilter getResultGroupFilter()
Build the list of result group filter from current global search result- Returns:
- new ResultGroupFilter object which contains all data to filter result
-
getSortedResultsToDisplay
public List<GlobalSilverResult> getSortedResultsToDisplay(boolean reallySortResults)
-
getTotalResults
public int getTotalResults()
-
getCurrentValue
public Value getCurrentValue()
-
setSecondaryAxis
public void setSecondaryAxis(String secondAxis)
-
getSecondaryAxis
public String getSecondaryAxis()
-
removeAllCriterias
public void removeAllCriterias()
-
getSelectedSilverContents
public List<GlobalSilverResult> getSelectedSilverContents()
-
setSelectedSilverContents
public void setSelectedSilverContents(List<GlobalSilverResult> silverContents)
-
getActiveThesaurus
public boolean getActiveThesaurus()
-
initializeJargon
public void initializeJargon() throws PdcException- Throws:
PdcException
-
getJargon
public Jargon getJargon()
-
saveICenter
public int saveICenter(Interests ic)
Interest Center methods / ****************************************************************************************************************
-
initUserPanel
public String initUserPanel()
UserPanel methods / ****************************************************************************************************************
-
buildComponentListWhereToSearch
public void buildComponentListWhereToSearch(String space, String component)
This method allows the user to search over optional space and/or component- Parameters:
space- an optional space identifier.component- an optional component identifier.
-
buildCustomComponentListWhereToSearch
public void buildCustomComponentListWhereToSearch(String space, List<String> components)
This method allows the user to search over optional space and/or components- Parameters:
space- an optional space identifier.components- an optional component list of identifier.
-
getAllowedSpaces
public List<SpaceInstLight> getAllowedSpaces()
Returns the list of allowed spaces/domains for the current user.
-
getAllowedComponents
public List<SilverpeasComponentInstance> getAllowedComponents(String space)
Returns the list of allowed components for the current user in the given space/domain.
-
getSearchType
public int getSearchType()
- Returns:
- type of search (Simple, Advanced or Expert)
-
setSearchType
public void setSearchType(int i)
- Parameters:
i- - type of the current search
-
isRefreshEnabled
public boolean isRefreshEnabled()
-
isXmlSearchVisible
public boolean isXmlSearchVisible()
-
isPertinenceVisible
public boolean isPertinenceVisible()
-
getXmlTemplate
public PublicationTemplateImpl getXmlTemplate()
-
setXmlTemplate
public PublicationTemplateImpl setXmlTemplate(String fileName)
-
getXmlData
public DataRecord getXmlData()
-
setXmlData
public void setXmlData(DataRecord xmlData)
-
getSearchPage
public String getSearchPage()
-
setSearchPage
public void setSearchPage(String searchPage)
-
getSearchPageId
public String getSearchPageId()
-
setSearchPageId
public void setSearchPageId(String searchPageId)
-
getResultPage
public String getResultPage()
-
setResultPage
public void setResultPage(String resultPage)
-
getResultPageId
public String getResultPageId()
-
setResultPageId
public void setResultPageId(String resultPageId)
-
getSpellingWords
public List<String> getSpellingWords()
gets suggestions or spelling words if a search doesn't return satisfying results. A minimal score trigger the suggestions search (0.5 by default)- Returns:
- a list that contains suggestions.
-
getGlobalSR
public List<GlobalSilverResult> getGlobalSR()
- Returns:
- the list of current global silver result
-
getFilteredSR
public List<GlobalSilverResult> getFilteredSR()
-
setFilteredSR
public void setFilteredSR(List<GlobalSilverResult> filteredSR)
-
clearFilteredSR
public void clearFilteredSR()
-
getCurrentResultsDisplay
public int getCurrentResultsDisplay()
-
setCurrentResultsDisplay
public void setCurrentResultsDisplay(int currentResultsDisplay)
-
setCurrentResultsDisplay
public void setCurrentResultsDisplay(String param)
-
getXmlFormSortValue
public String getXmlFormSortValue()
Gets the XML form field used to realize sorting- Returns:
- the xmlFormSortValue
-
setXmlFormSortValue
public void setXmlFormSortValue(String xmlFormSortValue)
Sets the XML form field used to realize sorting- Parameters:
xmlFormSortValue- the xmlFormSortValue to set
-
getSortImplemtor
public String getSortImplemtor()
Gets the keyword to retreive the implementation class name to realize sorting or filtering- Returns:
- the sortImplemtor
-
setSortImplemtor
public void setSortImplemtor(String sortImplementor)
- Parameters:
sortImplementor- the sortImplementor to set
-
isEnableExternalSearch
public boolean isEnableExternalSearch()
- Returns:
- the isEnableExternalSearch attribute
-
getSearchTypeConfig
public List<SearchTypeConfigurationVO> getSearchTypeConfig()
Retrieve configuration from properties file- Returns:
- a list of search type configuration value object
-
getDataType
public String getDataType()
- Returns:
- the dataType search
-
setDataType
public void setDataType(String dataType)
- Parameters:
dataType- the dataType search to set
-
isDataTypeDefined
public boolean isDataTypeDefined()
-
getSelectedFacetEntries
public ResultFilterVO getSelectedFacetEntries()
-
setSelectedFacetEntries
public void setSelectedFacetEntries(ResultFilterVO selectedFacetEntries)
-
isPlatformUsesPDC
public boolean isPlatformUsesPDC()
-
clearSearchParameters
public void clearSearchParameters(boolean clearPages)
-
search
public void search() throws SearchEngineException- Throws:
SearchEngineException
-
search
public void search(String taxonomyPosition) throws SearchEngineException
- Throws:
SearchEngineException
-
initXMLSearch
public void initXMLSearch(HttpRequest request) throws PublicationTemplateException, FormException
-
getXMLContext
public PagesContext getXMLContext()
-
-