Package com.jalios.jcmsplugin.explorer
Class ExplorerConfiguration
- java.lang.Object
-
- com.jalios.jcmsplugin.explorer.ExplorerConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public class ExplorerConfiguration extends java.lang.Object implements java.io.Serializable
Class holding configuration options of the Explorer.- Version:
- $Revision$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXPLORER_BASE_QUERY
QueryHandler attribute used to indicated that the QueryHandler which contains this attribute is a 'serverside' QueryHandler used for an Explorer.static java.lang.String
EXPLORER_USER_QUERY
QueryHandler attribute used to indicated that the QueryHandler which contains this attribute is being used for user refinement in an Explorer.static java.lang.String
REVISION
-
Constructor Summary
Constructors Constructor Description ExplorerConfiguration()
Default constructor which builds a new ExplorerConfiguration with the default options.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canChangeCheckPstatus()
Checks if the user is allowed to change the checkPstatus option for the Explorer.boolean
canChangeSearchInFiles()
Checks if the user is allowed to change the searchInFiles option for the Explorer.boolean
canChangeViewMode()
Checks if the user is allowed to change the view mode of the Explorer.java.util.Set<java.lang.String>
getAvailableViewModes()
Retrieves the available view modes in this configurationjava.lang.String
getCatMode()
Retrieves the category refinement mode to use in this this configurationboolean
getContextCategory()
Retrieve the current category display behavior.java.lang.String[]
getDocumentKinds()
Retrieves the content types to use for refinement.java.util.List<java.lang.String>
getFieldsList()
Retrieves list of fields that should be displayed in explorer view.java.lang.String
getFieldsState()
Check the fields panel should be be displayed, collapsed, or hidden.static ExplorerConfiguration
getInstance(javax.servlet.http.HttpServletRequest request)
Retrieve the current ExplorerConfiguration stored in request attribute or create a default new one if it could not be found.java.lang.String
getNavigationState()
Check the categories panel should be displayed, collapsed, or hidden.java.util.Set<com.jalios.jcms.Category>
getOpenedCategorySet()
Retrieves the categories to open in the TreeCatboolean
getPagerAll()
Retrieve whether all item are being displayed or notint
getPagerAllLimit()
Retrieve the maximum number of items above which the pager all link won't be displayed in the explorer.int
getPageSize()
Retrieve the page size to be used in the explorer.int[]
getPageSizes()
Retrieve the page sizes to be proposed in the explorer.java.util.Set<com.jalios.jcms.handler.QueryHandler>
getQueryHandlerSet()
Retrieves the Set of QueryHandler to use as starting queries for the Explorer using this ExplorerConfiguration.java.util.Set<com.jalios.jcms.Category>
getRefineCategorySet()
Retrieves the categories selected by user for refinenementcom.jalios.jcms.workspace.Workspace
getRefineWorkspace()
Retrieves the Workspace on which the refinement is being performedjava.util.Set<com.jalios.jcms.Category>
getRootCategorySet()
Retrieves the root categories to use in the Explorer refinement optionsjava.lang.String
getSearchOptionsState()
Check the search options panel should be displayed, collapsed, or hidden.boolean
getShowInCurrentPortal()
Retrieve the current portal display behavior.java.lang.String
getSort()
Retrieve the sort order used for the Explorer.java.lang.String
getSrc()
Retrieves the data source used in this configurationint
getStart()
Retrieve the start item index to be used in the explorer.java.util.Set<com.jalios.jcms.Category>
getTreeCatOpenedCategorySet()
Retrieves the categories that have been opened, but omiting any children of categories closed during this session.com.jalios.jcms.handler.QueryHandler
getUserQueryHandler()
Retrieves the QueryHandler dedicated to receive all the final user refinement options.java.lang.String
getViewMode()
Retrieves the view mode specified in this configurationboolean
isNavigationAdvVisible()
Check if the advanced navigation options should be displayed.boolean
isRefiningOnDocument()
Checks if FileDocument/DBFileDocument are the only type selected in types' refine options.boolean
isReverse()
Retrieves the current sort order (ascending or descending, depending on the comparator).boolean
isSearchBoxVisible()
Check if the search box should be displayed.boolean
isSearchInDB()
Check if the search should be performed in JcmsDB content or in JStore content only.boolean
isSidebarVisible()
Check the sidebar should be displayed by default or not.boolean
isUploadZoneForced()
Check the forced visibility of the upload zoneboolean
isUploadZoneVisible()
Check if the upload zone should be displayed.void
putInRequest(javax.servlet.http.HttpServletRequest request)
Put this ExplorerConfiguration as a request attribute (overwriting any prior ExplorerConfiguration attribute).void
removeFromRequest(javax.servlet.http.HttpServletRequest request)
Remove the current ExplorerConfiguration instance request attribute.void
setAllowCheckPstatusChange(boolean allowCheckPstatusChange)
Allows user to change the checkPstatus value to display invisible publicationvoid
setAllowSearchInFiles(boolean allowSearchInFiles)
Allows user to change the searchInFiles value to perform text search on filesvoid
setAllowViewModeChange(boolean allowViewModeChange)
Allows user to change the viewMode value.void
setAvailableViewModes(java.lang.String[] viewModes)
Set the view modes available in this configuration.void
setCatMode(java.lang.String catMode)
Changes the category user refinement mode to use in this this configurationvoid
setCheckPstatus(boolean checkPstatus)
Change the current checkpstatus option for all queryhandler to display visible or invisible publications.
The value will be changed only if allowed bycanChangeCheckPstatus()
void
setCheckPstatus(boolean checkPstatus, boolean checkAuthorization)
Change the current checkpstatus option for all queryhandler to display visible or invisible publications.
If the authorization check is asked, the value will be changed only if allowed bycanChangeCheckPstatus()
void
setContextCategory(boolean contextCategory)
Set the current category display behavior.void
setDocumentKinds(java.lang.String[] documentKinds)
Change the user document kind refinement to usevoid
setFieldsList(java.util.List<java.lang.String> fieldsList)
Sets the list of fields that should be displayed in explorer view.void
setFieldsState(java.lang.String fieldsState)
Sets the default visibility of the fields panel.void
setForceUploadZone(boolean forceUploadZone)
Sets the forced visibility of the upload zone.void
setNavigationState(java.lang.String navigationState)
Sets the visibility of the categories panel.void
setOpenedCategories(java.util.Collection<com.jalios.jcms.Category> categories)
Sets the categories to be opened in the TreeCat.void
setPagerAll(boolean pagerAll)
Set whether all item should be displayed or notvoid
setPagerAllLimit(int pagerAllLimit)
Set the maximum number of items above which the pager all link won't be displayed in the explorer.void
setPageSize(int pageSize)
Set the page size to be used in the explorer.void
setPageSizes(int[] pageSizes)
Set the page sizes to be proposed in the explorer.void
setPstatus(java.lang.String[] pstatus)
Sets the pstatus to use for refinement in the Explorervoid
setQueryHandlerSet(java.util.Set<com.jalios.jcms.handler.QueryHandler> queryHandlerSet)
Defines the Set of QueryHandler to be used as starting queries for the Explorer using this ExplorerConfiguration.
Those queries are defined on the server side and cannot be changed by the user whatsoever.void
setRefineCategories(java.util.Collection<com.jalios.jcms.Category> categories)
Sets the categories to be use for refinementvoid
setRefineWorkspace(java.lang.String wsId)
Sets the workspace to be used by explorer for refinementvoid
setReverse(boolean reverse)
Set the sort order (ascending or descending) to use.void
setRootCategorySet(java.util.Set<com.jalios.jcms.Category> rootCategorySet)
Defines the root categories to be used in the explorervoid
setSearchInDB(boolean searchInDB)
Set if the search should be performed in JcmsDB content or in JStore content only.void
setSearchInFiles(boolean searchInFiles)
Change the current searchInFiles option for all queryhandler to perform text search in files too.
The value will be changed only if allowed bycanChangeSearchInFiles()
void
setSearchInFiles(boolean searchInFiles, boolean checkAuthorization)
Change the current searchInFiles option for all queryhandler to perform text search in files too.
If the authorization check is asked, the value will be changed only if allowed bycanChangeSearchInFiles()
void
setSearchOptionsState(java.lang.String searchOptionsState)
Sets the default visibility of the search options panel.void
setShowInCurrentPortal(boolean showInCurrentPortal)
Set the current portal display behavior.void
setShowNavigationAdv(boolean showNavigationAdv)
Sets the visibility of advanced navigation options.void
setShowSearchBox(boolean showSearchBox)
Sets the visibility of search box.void
setShowSidebar(boolean showSidebar)
Sets the default visibility of the sidebar.void
setShowUploadZone(boolean showUploadZone)
Sets the visibility of upload zone.void
setSort(java.lang.String sort)
Sets the sort order to use for the Explorer.void
setSrc(java.lang.String src)
Changes the data source of this configurationvoid
setStart(int start)
Set the page size to be used in the explorer.void
setText(java.lang.String text)
Sets the text to searchvoid
setTypes(java.lang.String[] types)
Sets the user type refinement to be use in the Explorervoid
setViewMode(java.lang.String viewMode)
Changes the view mode of this configuration.void
toggleCategory(java.lang.String catId)
Add or remove the specified category from the current user refinement.void
toggleOpenedCategory(java.lang.String catId)
Add or remove the specified category from the current opened Category.java.lang.String
toString()
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
EXPLORER_BASE_QUERY
public static final java.lang.String EXPLORER_BASE_QUERY
QueryHandler attribute used to indicated that the QueryHandler which contains this attribute is a 'serverside' QueryHandler used for an Explorer. 'serverside' queryhandlers are the queryhandler which cannot be modified by the end user, thus defining a scope of publication being manipulated.
-
EXPLORER_USER_QUERY
public static final java.lang.String EXPLORER_USER_QUERY
QueryHandler attribute used to indicated that the QueryHandler which contains this attribute is being used for user refinement in an Explorer.
-
-
Method Detail
-
putInRequest
public void putInRequest(javax.servlet.http.HttpServletRequest request)
Put this ExplorerConfiguration as a request attribute (overwriting any prior ExplorerConfiguration attribute).- Parameters:
request
- the request in which to put this ExplorerConfiguration
-
removeFromRequest
public void removeFromRequest(javax.servlet.http.HttpServletRequest request)
Remove the current ExplorerConfiguration instance request attribute.- Parameters:
request
- the request in which to remove the current ExplorerConfiguration
-
getInstance
public static ExplorerConfiguration getInstance(javax.servlet.http.HttpServletRequest request)
Retrieve the current ExplorerConfiguration stored in request attribute or create a default new one if it could not be found.- Parameters:
request
- the request from which to retrieve the request attribute- Returns:
- an ExplorerConfiguration instance (never return null)
-
setSearchInDB
public void setSearchInDB(boolean searchInDB)
Set if the search should be performed in JcmsDB content or in JStore content only.Modifying this option to true will reduce the refinement features available to the Explorer.
- Parameters:
searchInDB
- true if the search should be performed on JcmsDB content too, false for JStore content only.- Since:
- explorer-2.1.0
-
isSearchInDB
public boolean isSearchInDB()
Check if the search should be performed in JcmsDB content or in JStore content only.- Returns:
- true if the search should be performed on JcmsDB content too.
- Since:
- explorer-2.1.0
-
setQueryHandlerSet
public void setQueryHandlerSet(java.util.Set<com.jalios.jcms.handler.QueryHandler> queryHandlerSet)
Defines the Set of QueryHandler to be used as starting queries for the Explorer using this ExplorerConfiguration.
Those queries are defined on the server side and cannot be changed by the user whatsoever. There is a dedicated user query handler for the refinment option decided by the user (getUserQueryHandler()
).- Parameters:
queryHandlerSet
- a Set ofQueryHandler
, if null or empty, a set with a new QueryHandler using default value is defined.
-
getQueryHandlerSet
public java.util.Set<com.jalios.jcms.handler.QueryHandler> getQueryHandlerSet()
Retrieves the Set of QueryHandler to use as starting queries for the Explorer using this ExplorerConfiguration.- Returns:
- a Set of
QueryHandler
, never return null
-
setRootCategorySet
public void setRootCategorySet(java.util.Set<com.jalios.jcms.Category> rootCategorySet)
Defines the root categories to be used in the explorer- Parameters:
rootCategorySet
- a Set of Category, if null the channel
-
getRootCategorySet
public java.util.Set<com.jalios.jcms.Category> getRootCategorySet()
Retrieves the root categories to use in the Explorer refinement options- Returns:
- a Set of Category, never return null.
-
setAllowCheckPstatusChange
public void setAllowCheckPstatusChange(boolean allowCheckPstatusChange)
Allows user to change the checkPstatus value to display invisible publication- Parameters:
allowCheckPstatusChange
- true to allow user to change the default option, false otherwise
-
canChangeCheckPstatus
public boolean canChangeCheckPstatus()
Checks if the user is allowed to change the checkPstatus option for the Explorer.- Returns:
- true if the user can change it, false otherwise.
-
setAllowSearchInFiles
public void setAllowSearchInFiles(boolean allowSearchInFiles)
Allows user to change the searchInFiles value to perform text search on files- Parameters:
allowSearchInFiles
- true to allow user to change the default option, false otherwise
-
canChangeSearchInFiles
public boolean canChangeSearchInFiles()
Checks if the user is allowed to change the searchInFiles option for the Explorer.- Returns:
- true if the user can change it, false otherwise.
-
setAllowViewModeChange
public void setAllowViewModeChange(boolean allowViewModeChange)
Allows user to change the viewMode value.- Parameters:
allowViewModeChange
- true to allow view mode change, false otherwise.
-
canChangeViewMode
public boolean canChangeViewMode()
Checks if the user is allowed to change the view mode of the Explorer.- Returns:
- true if the user can change view mode, false otherwise
-
getShowInCurrentPortal
public boolean getShowInCurrentPortal()
Retrieve the current portal display behavior.If true, the publication will be displayed in current portal. Default is false.
- Returns:
- a boolean indicating the portal display behavior
- Since:
- explorer-2.1.1
-
setShowInCurrentPortal
public void setShowInCurrentPortal(boolean showInCurrentPortal)
Set the current portal display behavior.If true, the publication will be displayed in current portal. Default is false.
- Parameters:
showInCurrentPortal
- a boolean indicating the portal display behavior- Since:
- explorer-2.1.1
-
getContextCategory
public boolean getContextCategory()
Retrieve the current category display behavior.If true, the publication will be displayed with the current category as contextual category.
- Returns:
- a boolean indicating the current category display behavior
- Since:
- explorer-2.1.1
-
setContextCategory
public void setContextCategory(boolean contextCategory)
Set the current category display behavior.If true, the publication will be displayed with the current category as contextual category.
- Parameters:
contextCategory
- a boolean indicating the current category display behavior- Since:
- explorer-2.1.1
-
isSidebarVisible
public boolean isSidebarVisible()
Check the sidebar should be displayed by default or not.- Returns:
- true to display the sidebar, false otherwise
-
setShowSidebar
public void setShowSidebar(boolean showSidebar)
Sets the default visibility of the sidebar.- Parameters:
showSidebar
- true to display sidebar, false otherwise.
-
getNavigationState
public java.lang.String getNavigationState()
Check the categories panel should be displayed, collapsed, or hidden.- Returns:
- "show", "collapse" or "hide"
-
setNavigationState
public void setNavigationState(java.lang.String navigationState)
Sets the visibility of the categories panel.- Parameters:
navigationState
- "show", "collapse" or "hide"
-
getSearchOptionsState
public java.lang.String getSearchOptionsState()
Check the search options panel should be displayed, collapsed, or hidden.- Returns:
- "show", "collapse" or "hide"
-
setSearchOptionsState
public void setSearchOptionsState(java.lang.String searchOptionsState)
Sets the default visibility of the search options panel.- Parameters:
searchOptionsState
- "show", "collapse" or "hide"
-
getFieldsState
public java.lang.String getFieldsState()
Check the fields panel should be be displayed, collapsed, or hidden.- Returns:
- "show", "collapse" or "hide"
-
setFieldsState
public void setFieldsState(java.lang.String fieldsState)
Sets the default visibility of the fields panel.- Parameters:
fieldsState
- "show", "collapse" or "hide"
-
isSearchBoxVisible
public boolean isSearchBoxVisible()
Check if the search box should be displayed.- Returns:
- true to display the search box, false otherwise
- Since:
- explorer-2.0.1
-
setShowSearchBox
public void setShowSearchBox(boolean showSearchBox)
Sets the visibility of search box.- Parameters:
showSearchBox
- true to display search box, false otherwise.- Since:
- explorer-2.0.1
-
isNavigationAdvVisible
public boolean isNavigationAdvVisible()
Check if the advanced navigation options should be displayed.- Returns:
- true to display the advanced navigation options, false otherwise
- Since:
- explorer-2.0.1
-
setShowNavigationAdv
public void setShowNavigationAdv(boolean showNavigationAdv)
Sets the visibility of advanced navigation options.- Parameters:
showNavigationAdv
- true to display advanced navigation options, false otherwise.- Since:
- explorer-2.0.1
-
isUploadZoneVisible
public boolean isUploadZoneVisible()
Check if the upload zone should be displayed.- Returns:
- true to display upload zone (when refining on documents), false otherwise.
- Since:
- explorer-3.0.0 (DEVJCMS-977+DEVJCMS-1262)
-
setShowUploadZone
public void setShowUploadZone(boolean showUploadZone)
Sets the visibility of upload zone.- Parameters:
showUploadZone
- true to display upload zone (when refining on documents), false otherwise.- Since:
- explorer-3.0.0 (DEVJCMS-977+DEVJCMS-1262)
-
isUploadZoneForced
public boolean isUploadZoneForced()
Check the forced visibility of the upload zone- Returns:
- true if upload zone should be displayed even there is not only document being displayed, false to keep default behavior
- Since:
- EXPLORER-185
-
setForceUploadZone
public void setForceUploadZone(boolean forceUploadZone)
Sets the forced visibility of the upload zone.- Parameters:
forceUploadZone
- true if upload zone should be displayed even there is not only document being displayed, false to keep default behavior- Since:
- EXPLORER-185
-
getFieldsList
public java.util.List<java.lang.String> getFieldsList()
Retrieves list of fields that should be displayed in explorer view.- Returns:
- a List of field name e.g.
{ "id", "title", "mdate" }
- See Also:
ExplorerFields
-
setFieldsList
public void setFieldsList(java.util.List<java.lang.String> fieldsList)
Sets the list of fields that should be displayed in explorer view.- Parameters:
fieldsList
- a List of field name e.g.{ "id", "title", "mdate" }
- See Also:
ExplorerFields
-
getUserQueryHandler
public com.jalios.jcms.handler.QueryHandler getUserQueryHandler()
Retrieves the QueryHandler dedicated to receive all the final user refinement options.Do not change option of this queryhandler, use method of this class.
- Returns:
- a QueryHandler instance, never return null.
-
setAvailableViewModes
public void setAvailableViewModes(java.lang.String[] viewModes)
Set the view modes available in this configuration.- Parameters:
viewModes
- an array of string from theExplorerUtils.getAvailableViewModes()
, if an invalid mode or null is specified in array it is skipped, if empty the default value (as returned byExplorerUtils.getAvailableViewModes()
will be used.- Since:
- explorer-2.0.1
-
getAvailableViewModes
public java.util.Set<java.lang.String> getAvailableViewModes()
Retrieves the available view modes in this configuration- Returns:
- an array of strings as available in
ExplorerUtils.getAvailableViewModes()
. - Since:
- explorer-2.0.1
-
setViewMode
public void setViewMode(java.lang.String viewMode)
Changes the view mode of this configuration.- Parameters:
viewMode
- a string from theExplorerUtils.getAvailableViewModes()
, if an invalid mode or null, the default value (as returned byExplorerUtils.getDefaultViewMode()
will be used (or first available one if the default view mode is not part of the availables view mode of this config).
-
getViewMode
public java.lang.String getViewMode()
Retrieves the view mode specified in this configuration- Returns:
- a string from the
ExplorerUtils.getAvailableViewModes()
.
-
setSrc
public void setSrc(java.lang.String src)
Changes the data source of this configuration- Parameters:
src
- a string fromExplorerUtils.getAvailableSrc()
if null or invalid, the default value is used
-
getSrc
public java.lang.String getSrc()
Retrieves the data source used in this configuration- Returns:
- a string from
ExplorerUtils.getAvailableSrc()
or null when using default value
-
setCatMode
public void setCatMode(java.lang.String catMode)
Changes the category user refinement mode to use in this this configuration- Parameters:
catMode
- the mode to use, from "one", "and", "or".
-
getCatMode
public java.lang.String getCatMode()
Retrieves the category refinement mode to use in this this configuration- Returns:
- a string from "one", "and", "or" (never returns something else)
-
toggleCategory
public void toggleCategory(java.lang.String catId)
Add or remove the specified category from the current user refinement. Use the current category refinement mode.- Parameters:
catId
- the id of the Category to toggle
-
setRefineCategories
public void setRefineCategories(java.util.Collection<com.jalios.jcms.Category> categories)
Sets the categories to be use for refinement- Parameters:
categories
- a Collection of Category
-
getRefineCategorySet
public java.util.Set<com.jalios.jcms.Category> getRefineCategorySet()
Retrieves the categories selected by user for refinenement- Returns:
- a set of Category
-
setOpenedCategories
public void setOpenedCategories(java.util.Collection<com.jalios.jcms.Category> categories)
Sets the categories to be opened in the TreeCat.- Parameters:
categories
- a Collection of Category
-
getOpenedCategorySet
public java.util.Set<com.jalios.jcms.Category> getOpenedCategorySet()
Retrieves the categories to open in the TreeCat- Returns:
- a set of Category
-
getTreeCatOpenedCategorySet
public java.util.Set<com.jalios.jcms.Category> getTreeCatOpenedCategorySet()
Retrieves the categories that have been opened, but omiting any children of categories closed during this session.This method should only be used by the navigation treecat as it purpose is only for UI.
- Returns:
- a new set of Category
-
toggleOpenedCategory
public void toggleOpenedCategory(java.lang.String catId)
Add or remove the specified category from the current opened Category.- Parameters:
catId
- the id of the Category to toggle
-
setPstatus
public void setPstatus(java.lang.String[] pstatus)
Sets the pstatus to use for refinement in the Explorer- Parameters:
pstatus
- an array of String, each string being a pstatus, eg. {"-10", "20"}
-
setCheckPstatus
public void setCheckPstatus(boolean checkPstatus)
Change the current checkpstatus option for all queryhandler to display visible or invisible publications.
The value will be changed only if allowed bycanChangeCheckPstatus()
- Parameters:
checkPstatus
- true to display only publication in a visible state, false to display all publications
-
setCheckPstatus
public void setCheckPstatus(boolean checkPstatus, boolean checkAuthorization)
Change the current checkpstatus option for all queryhandler to display visible or invisible publications.
If the authorization check is asked, the value will be changed only if allowed bycanChangeCheckPstatus()
- Parameters:
checkPstatus
- true to display only publication in a visible state, false to display all publicationscheckAuthorization
- whether to check for value ofcanChangeCheckPstatus()
before performing any change. true to check for authorization, false to bypass current authorization settings.
-
setText
public void setText(java.lang.String text)
Sets the text to search- Parameters:
text
- whatever text to search
-
setSearchInFiles
public void setSearchInFiles(boolean searchInFiles)
Change the current searchInFiles option for all queryhandler to perform text search in files too.
The value will be changed only if allowed bycanChangeSearchInFiles()
- Parameters:
searchInFiles
- true to perform text search in files, false otherwise
-
setSearchInFiles
public void setSearchInFiles(boolean searchInFiles, boolean checkAuthorization)
Change the current searchInFiles option for all queryhandler to perform text search in files too.
If the authorization check is asked, the value will be changed only if allowed bycanChangeSearchInFiles()
- Parameters:
searchInFiles
- true to perform text search in files, false otherwisecheckAuthorization
- whether to check for value ofcanChangeSearchInFiles()
before performing any change. true to check for authorization, false to bypass current authorization settings
-
setTypes
public void setTypes(java.lang.String[] types)
Sets the user type refinement to be use in the Explorer- Parameters:
types
- an array of String, each string being a classname, eg. {"Content", "generated.Article"}
-
isRefiningOnDocument
public boolean isRefiningOnDocument()
Checks if FileDocument/DBFileDocument are the only type selected in types' refine options.- Returns:
- true if FileDocument/DBFileDocument only are being displayed, false if any other type is being displayed too
-
setDocumentKinds
public void setDocumentKinds(java.lang.String[] documentKinds)
Change the user document kind refinement to use- Parameters:
documentKinds
- an array of String, each string being a document kind as defined in JCMS- Since:
- explorer-2.1
-
getDocumentKinds
public java.lang.String[] getDocumentKinds()
Retrieves the content types to use for refinement.- Returns:
- an array of String, each string being a content type regexp eg. {"text/*", "application/msword"}
- Since:
- explorer-2.1
-
setRefineWorkspace
public void setRefineWorkspace(java.lang.String wsId)
Sets the workspace to be used by explorer for refinement- Parameters:
wsId
- a Workspace ID or null to reset workspace refinement
-
getRefineWorkspace
public com.jalios.jcms.workspace.Workspace getRefineWorkspace()
Retrieves the Workspace on which the refinement is being performed- Returns:
- the Workspace used for refinement, if any or null if using all user's workspace
-
getSort
public java.lang.String getSort()
Retrieve the sort order used for the Explorer.- Returns:
- a String indicating the comparator that will be retrieved using com.jalios.jcms.Publication#getComparator(String, boolean, com.jalios.jcms.QueryResultSet)
-
setSort
public void setSort(java.lang.String sort)
Sets the sort order to use for the Explorer.- Parameters:
sort
- a String indicating the comparator to used, must be a valid parameter of com.jalios.jcms.Publication#getComparator(String, boolean, com.jalios.jcms.QueryResultSet)
-
isReverse
public boolean isReverse()
Retrieves the current sort order (ascending or descending, depending on the comparator).- Returns:
- true if the reverse order of the comparator is used false if the comparator is used as is.
-
setReverse
public void setReverse(boolean reverse)
Set the sort order (ascending or descending) to use.- Parameters:
reverse
- true to use the reverse order of the comparator currently in use, false if the comparator will be used as is.
-
getPageSize
public int getPageSize()
Retrieve the page size to be used in the explorer.- Returns:
- a number of item to be displayed
- Since:
- explorer-2.0.1
-
setPageSize
public void setPageSize(int pageSize)
Set the page size to be used in the explorer.- Parameters:
pageSize
- a number of item to be displayed- Since:
- explorer-2.0.1
-
getPageSizes
public int[] getPageSizes()
Retrieve the page sizes to be proposed in the explorer.- Returns:
- an array of number of item to be displayed
- Since:
- explorer-2.0.1
-
setPageSizes
public void setPageSizes(int[] pageSizes)
Set the page sizes to be proposed in the explorer.- Parameters:
pageSizes
- an array of number of item to be displayed- Since:
- explorer-2.0.1
-
getPagerAllLimit
public int getPagerAllLimit()
Retrieve the maximum number of items above which the pager all link won't be displayed in the explorer.- Returns:
- a number of item
- Since:
- explorer-2.0.1
-
setPagerAllLimit
public void setPagerAllLimit(int pagerAllLimit)
Set the maximum number of items above which the pager all link won't be displayed in the explorer.- Parameters:
pagerAllLimit
- a number of item- Since:
- explorer-2.0.1
-
getStart
public int getStart()
Retrieve the start item index to be used in the explorer.- Returns:
- the first item index to be displayed
- Since:
- explorer-2.1.0
-
setStart
public void setStart(int start)
Set the page size to be used in the explorer.- Parameters:
start
- the first item index to be displayed- Since:
- explorer-2.1.0
-
getPagerAll
public boolean getPagerAll()
Retrieve whether all item are being displayed or not- Returns:
- true if all item should be displayed, false otherwise
- Since:
- explorer-2.1.0
-
setPagerAll
public void setPagerAll(boolean pagerAll)
Set whether all item should be displayed or not- Parameters:
pagerAll
- true if all item should be displayed, false otherwise- Since:
- explorer-2.1.0
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-