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 String
ALL_DATA_TYPE
static int
SEARCH_ADVANCED
static int
SEARCH_EXPERT
static int
SEARCH_SIMPLE
static int
SEARCH_XML
static int
SHOWRESULTS_ALL
static int
SHOWRESULTS_ONLY_PDC
static String
SORT_ORDER_ASC
static String
SORT_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 void
buildComponentListWhereToSearch(String space, String component)
This method allows the user to search over optional space and/or componentvoid
buildCustomComponentListWhereToSearch(String space, List<String> components)
This method allows the user to search over optional space and/or componentsvoid
clearFilteredSR()
void
clearSearchParameters(boolean clearPages)
boolean
getActiveThesaurus()
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.int
getCurrentResultsDisplay()
Value
getCurrentValue()
String
getDataType()
String
getDisplayParamChoices()
Map<String,Facet>
getFieldFacets()
List<GlobalSilverResult>
getFilteredSR()
List<GlobalSilverResult>
getGlobalSR()
List<Interests>
getICenters()
int
getIndexOfFirstItemToDisplay()
int
getIndexOfFirstResultToDisplay()
Jargon
getJargon()
int
getNbItemsPerPage()
************************************************************************************************************** PDC search methods (via DomainsBar) ****************************************************************************************************************int
getNbResToDisplay()
QueryParameters
getQueryParameters()
ResultGroupFilter
getResultGroupFilter()
Build the list of result group filter from current global search resultString
getResultPage()
String
getResultPageId()
SearchContext
getSearchContext()
String
getSearchPage()
String
getSearchPageId()
int
getSearchType()
List<SearchTypeConfigurationVO>
getSearchTypeConfig()
Retrieve configuration from properties fileString
getSecondaryAxis()
ResultFilterVO
getSelectedFacetEntries()
List<GlobalSilverResult>
getSelectedSilverContents()
List<GlobalSilverResult>
getSortedResultsToDisplay(boolean reallySortResults)
String
getSortImplemtor()
Gets the keyword to retreive the implementation class name to realize sorting or filteringString
getSortOrder()
int
getSortValue()
List<String>
getSpellingWords()
gets suggestions or spelling words if a search doesn't return satisfying results.int
getTotalResults()
PagesContext
getXMLContext()
DataRecord
getXmlData()
String
getXmlFormSortValue()
Gets the XML form field used to realize sortingPublicationTemplateImpl
getXmlTemplate()
void
initializeJargon()
String
initUserPanel()
UserPanel methods / ****************************************************************************************************************void
initXMLSearch(HttpRequest request)
boolean
isDataTypeDefined()
boolean
isEnableExternalSearch()
boolean
isPertinenceVisible()
boolean
isPlatformUsesPDC()
boolean
isRefreshEnabled()
boolean
isXmlSearchVisible()
Interests
loadICenter(String icId)
void
removeAllCriterias()
int
saveICenter(Interests ic)
Interest Center methods / ****************************************************************************************************************void
search()
void
search(String taxonomyPosition)
void
setCurrentResultsDisplay(int currentResultsDisplay)
void
setCurrentResultsDisplay(String param)
void
setDataType(String dataType)
void
setFilteredSR(List<GlobalSilverResult> filteredSR)
void
setIndexOfFirstItemToDisplay(String index)
void
setIndexOfFirstResultToDisplay(int index)
void
setNbResToDisplay(int nbResToDisplay)
void
setResultPage(String resultPage)
void
setResultPageId(String resultPageId)
void
setSearchPage(String searchPage)
void
setSearchPageId(String searchPageId)
void
setSearchType(int i)
void
setSecondaryAxis(String secondAxis)
void
setSelectedFacetEntries(ResultFilterVO selectedFacetEntries)
void
setSelectedSilverContents(List<GlobalSilverResult> silverContents)
void
setSortImplemtor(String sortImplementor)
void
setSortOrder(String sortOrder)
void
setSortValue(int sortValue)
void
setXmlData(DataRecord xmlData)
void
setXmlFormSortValue(String xmlFormSortValue)
Sets the XML form field used to realize sortingPublicationTemplateImpl
setXmlTemplate(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()
-
-