|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcmsplugin.explorer.ExplorerConfiguration
public class ExplorerConfiguration
Class holding configuration options of the Explorer.
Field Summary | |
---|---|
static 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 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 String |
REVISION
|
Constructor Summary | |
---|---|
ExplorerConfiguration()
Default constructor which builds a new ExplorerConfiguration with the default options. |
Method Summary | |
---|---|
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. |
String |
getCatMode()
Retrieves the category refinement mode to use in this this configuration |
String[] |
getContentTypes()
Retrieves the content types to use for refinement. |
List |
getFieldsList()
Retrieves list of fields that should be displayed in explorer view. |
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. |
Set |
getOpenedCategorySet()
Retrieves the categories to open in the TreeCat |
Set |
getQueryHandlerSet()
Retrieves the Set of QueryHandler to use as starting queries for the Explorer using this ExplorerConfiguration. |
Set |
getRefineCategorySet()
Retrieves the categories selected by user for refinenement |
Workspace |
getRefineWorkspace()
Retrieves the Workspace on which the refinement is being performed |
Set |
getRootCategorySet()
Retrieves the root categories to use in the Explorer refinement options |
String |
getSort()
Retrieve the sort order used for the Explorer. |
String |
getSrc()
Retrieves the data source used in this configuration |
QueryHandler |
getUserQueryHandler()
Retrieves the QueryHandler dedicated to receive all the final user refinement options. |
String |
getViewMode()
Retrieves the view mode specified in this configuration |
boolean |
hasValidResultCache()
Checks the current status of the result cache |
boolean |
isNavigationVisible()
Check the categories panel should be displayed by default or not. |
boolean |
isRefiningOnDocument()
Checks if FileDocument is the only type selected in types' refine options. |
boolean |
isReverse()
Retrieves the current sort order (ascending or descending, depending on the comparator). |
boolean |
isSearchOptionsVisible()
Check the search options panel should be displayed by default or not. |
boolean |
isSidebarVisible()
Check the sidebar should be displayed by default or not. |
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 publication |
void |
setAllowSearchInFiles(boolean allowSearchInFiles)
Allows user to change the searchInFiles value to perform text search on files |
void |
setAllowViewModeChange(boolean allowViewModeChange)
Allows user to change the viewMode value. |
void |
setCatMode(String catMode)
Changes the category user refinement mode to use in this this configuration |
void |
setCheckPstatus(boolean checkPstatus)
Change the current checkpstatus option for all queryhandler to display visible or invisible publications. |
void |
setCheckPstatus(boolean checkPstatus,
boolean checkAuthorization)
Change the current checkpstatus option for all queryhandler to display visible or invisible publications. |
void |
setContentTypes(String[] contentTypes)
Change the user content type refinement to use |
void |
setFieldsList(List fieldsList)
Sets the list of fields that should be displayed in explorer view. |
void |
setOpenedCategories(Collection categories)
Sets the categories to be opened in the TreeCat. |
void |
setPstatus(String[] pstatus)
Sets the pstatus to use for refinement in the Explorer |
void |
setQueryHandlerSet(Set queryHandlerSet)
Defines the Set of QueryHandler to be used as starting queries for the Explorer using this ExplorerConfiguration. |
void |
setRefineCategories(Collection categories)
Sets the categories to be use for refinement |
void |
setRefineWorkspace(String wsId)
Sets the workspace to be used by explorer for refinement |
void |
setReverse(boolean reverse)
Set the sort order (ascending or descending) to use. |
void |
setRootCategorySet(Set rootCategorySet)
Defines the root categories to be used in the explorer |
void |
setSearchInFiles(boolean searchInFiles)
Change the current searchInFiles option for all queryhandler to perform text search in files too. |
void |
setSearchInFiles(boolean searchInFiles,
boolean checkAuthorization)
Change the current searchInFiles option for all queryhandler to perform text search in files too. |
void |
setShowNavigation(boolean showNavigation)
Sets the default visibility of the categories panel. |
void |
setShowSearchOptions(boolean showSearchOptions)
Sets the default visibility of the search options panel. |
void |
setShowSidebar(boolean showSidebar)
Sets the default visibility of the sidebar. |
void |
setSort(String sort)
Sets the sort order to use for the Explorer. |
void |
setSrc(String src)
Changes the data source of this configuration |
void |
setText(String text)
Sets the text to search |
void |
setTypes(String[] types)
Sets the user type refinement to be use in the Explorer |
void |
setViewMode(String viewMode)
Changes the view mode of this configuration. |
void |
toggleCategory(String catId)
Add or remove the specified category from the current user refinement. |
String |
toString()
|
void |
validateResultCache()
Validate the cache status of the explorer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String EXPLORER_BASE_QUERY
public static final String EXPLORER_USER_QUERY
Constructor Detail |
---|
public ExplorerConfiguration()
Method Detail |
---|
public void putInRequest(javax.servlet.http.HttpServletRequest request)
request
- the request in which to put this ExplorerConfigurationpublic void removeFromRequest(javax.servlet.http.HttpServletRequest request)
request
- the request in which to remove the current ExplorerConfigurationpublic static ExplorerConfiguration getInstance(javax.servlet.http.HttpServletRequest request)
request
- the request from which to retrieve the request attribute
public void validateResultCache()
public boolean hasValidResultCache()
public void setQueryHandlerSet(Set queryHandlerSet)
getUserQueryHandler()
).
queryHandlerSet
- a Set of QueryHandler
, if null or empty, a
set with a new QueryHandler using default value is defined.public Set getQueryHandlerSet()
QueryHandler
, never return nullpublic void setRootCategorySet(Set rootCategorySet)
rootCategorySet
- a Set of Category, if null the channelpublic Set getRootCategorySet()
public void setAllowCheckPstatusChange(boolean allowCheckPstatusChange)
allowCheckPstatusChange
- true to allow user to change the default option, false otherwisepublic boolean canChangeCheckPstatus()
public void setAllowSearchInFiles(boolean allowSearchInFiles)
allowSearchInFiles
- true to allow user to change the default option, false otherwisepublic boolean canChangeSearchInFiles()
public void setAllowViewModeChange(boolean allowViewModeChange)
allowViewModeChange
- true to allow view mode change, false otherwise.public boolean canChangeViewMode()
public boolean isSidebarVisible()
public void setShowSidebar(boolean showSidebar)
showSidebar
- true to display sidebar, false otherwise.public boolean isNavigationVisible()
public void setShowNavigation(boolean showNavigation)
showNavigation
- true to display categories panel, false otherwise.public boolean isSearchOptionsVisible()
public void setShowSearchOptions(boolean showSearchOptions)
showSearchOptions
- true to search options panel, false otherwise.public List getFieldsList()
{ "id", "title", "mdate" }
ExplorerFields
public void setFieldsList(List fieldsList)
fieldsList
- a List of field name e.g. { "id", "title", "mdate" }
ExplorerFields
public QueryHandler getUserQueryHandler()
Do not change option of this queryhandler, use method of this class.
public void setViewMode(String viewMode)
viewMode
- a string from the ExplorerUtils.getAvailableViewModes()
,
if an invalid mode or null, the default value
(as returned by ExplorerUtils.getDefaultViewMode()
will be used.public String getViewMode()
ExplorerUtils.getAvailableViewModes()
.public void setSrc(String src)
src
- a string from ExplorerUtils.getAvailableSrc()
if null or invalid, the default value is usedpublic String getSrc()
ExplorerUtils.getAvailableSrc()
or null when using default valuepublic void setCatMode(String catMode)
catMode
- the mode to use, from "one", "and", "or".public String getCatMode()
public void toggleCategory(String catId)
catId
- the id of the Category to togglepublic void setRefineCategories(Collection categories)
categories
- a Collection of Categorypublic Set getRefineCategorySet()
public void setOpenedCategories(Collection categories)
categories
- a Collection of Categorypublic Set getOpenedCategorySet()
public void setPstatus(String[] pstatus)
pstatus
- an array of String, each string being a pstatus, eg. {"-10", "20"}public void setCheckPstatus(boolean checkPstatus)
canChangeCheckPstatus()
checkPstatus
- true to display only publication in a visible state, false to display all publicationspublic void setCheckPstatus(boolean checkPstatus, boolean checkAuthorization)
canChangeCheckPstatus()
checkPstatus
- true to display only publication in a visible state,
false to display all publicationscheckAuthorization
- whether to check for value of
canChangeCheckPstatus()
before performing any change.
true to check for authorization, false to bypass current authorization settings.public void setText(String text)
text
- whatever text to searchpublic void setSearchInFiles(boolean searchInFiles)
canChangeSearchInFiles()
searchInFiles
- true to perform text search in files, false otherwisepublic void setSearchInFiles(boolean searchInFiles, boolean checkAuthorization)
canChangeSearchInFiles()
searchInFiles
- true to perform text search in files, false otherwisecheckAuthorization
- whether to check for value of
canChangeSearchInFiles()
before performing any change.
true to check for authorization, false to bypass current authorization settingspublic void setTypes(String[] types)
types
- an array of String, each string being a classname, eg. {"Content", "generated.Article"}public boolean isRefiningOnDocument()
public void setContentTypes(String[] contentTypes)
contentTypes
- an array of String, each string being a content type regexp from
the allowed values ExplorerUtils.getAvailableContentTypes()
, eg. {"text/*", "application/msword"}public String[] getContentTypes()
public void setRefineWorkspace(String wsId)
wsId
- a Workspace ID or null to reset workspace refinementpublic Workspace getRefineWorkspace()
public String getSort()
public void setSort(String sort)
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)public boolean isReverse()
public void setReverse(boolean reverse)
reverse
- true to use the reverse order of the comparator currently in use,
false if the comparator will be used as is.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |