|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcmsplugin.explorer.ExplorerUtils
public class ExplorerUtils
| Field Summary | |
|---|---|
static String |
ALLOW_DIRECT_ACCESS_PROP
Property used to check if direct access to the explorer (using /plugins/ExplorerPlugin/jsp/explorer.jsp)
is authorized or not. |
protected static boolean |
allowDirectAccess
|
protected static boolean |
allowDirectAccessRead
|
static Channel |
channel
|
static String |
CONTENT_TYPES_PROP
Property used to retrieve list of content type to be proposed for refinement |
protected static String[] |
contentTypes
|
static String |
DEFAULT_VIEW_MODE_PROP
Property used to retrieve default view mode. |
static String |
SESSIONCACHE_PROP
Property used to check if session cache are enabled or not. |
protected static boolean |
sessionCacheEnabled
|
protected static boolean |
sessionCacheEnabledRead
|
static String |
VIEW_MODES_PROP
Property prefix used to find view modes. |
protected static Map |
viewModesMap
|
| Constructor Summary | |
|---|---|
ExplorerUtils()
|
|
| Method Summary | |
|---|---|
static String[] |
getAvailableContentTypes()
Retrieves the content types to be proposed for refinement. |
static String[] |
getAvailableSrc()
Retrieves the available data source in the explorer. |
static Set |
getAvailableViewModes()
Return the view mode available for the explorer. |
static String |
getDefaultViewMode()
Return the default view mode to use if no view mode has been specified. |
static String |
getViewModeCss(String viewMode)
Return the StyleSheet to use with the specified view mode. |
static String |
getViewModeJs(String viewMode)
Return the JavaScript to use with the specified view mode. |
static String |
getViewModeJsp(String viewMode)
Return the JSP used to present the specified view mode. |
static String |
getViewModeLabel(String lang,
String viewMode)
Return the label to use for the specified view mode, in the specified language. |
static boolean |
isDirectAccessAuthorized()
Checks if direct access to the explorer (using /plugins/ExplorerPlugin/jsp/explorer.jsp)
is authorized or not. |
static boolean |
isSessionCacheEnabled()
Checks if session cache should be used. |
static boolean |
isValidCatMode(String catMode)
Checks if the specified category refinement mode is a valid one. |
static boolean |
isValidContentType(String cntType)
Checks if the specified content type is allowed as a refinement. |
static boolean |
isValidSrc(String src)
Checks if the specified data source is a valid one (list in getAvailableSrc()) |
static boolean |
isValidViewMode(String viewMode)
Checks if the specified view mode is a valid one (listed in getAvailableViewModes()) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Channel channel
public static final String VIEW_MODES_PROP
public static final String DEFAULT_VIEW_MODE_PROP
public static final String CONTENT_TYPES_PROP
public static final String SESSIONCACHE_PROP
public static final String ALLOW_DIRECT_ACCESS_PROP
/plugins/ExplorerPlugin/jsp/explorer.jsp)
is authorized or not.
protected static boolean sessionCacheEnabled
protected static boolean sessionCacheEnabledRead
protected static boolean allowDirectAccess
protected static boolean allowDirectAccessRead
protected static Map viewModesMap
protected static String[] contentTypes
| Constructor Detail |
|---|
public ExplorerUtils()
| Method Detail |
|---|
public static boolean isSessionCacheEnabled()
public static boolean isDirectAccessAuthorized()
/plugins/ExplorerPlugin/jsp/explorer.jsp)
is authorized or not.
public static Set getAvailableViewModes()
As of current implementation, view modes are find from all properties starting
with "jcmsplugins.explorer.view-mode.".
{"list", "icon"}, never return null.public static String getDefaultViewMode()
public static String getViewModeLabel(String lang,
String viewMode)
lang - the language in which to retrieve the labelviewMode - a view mode value as returned by getAvailableViewModes(), e.g: "list".
public static String getViewModeJsp(String viewMode)
viewMode - a view mode value as returned by getAvailableViewModes(), e.g: "list".
"/custom/list.jsp" WITH begining slash
or an empty String if jjsp path could not be found.public static String getViewModeCss(String viewMode)
viewMode - a view mode value as returned by getAvailableViewModes(), e.g: "list".
"custom/list.css" *without begining slash*
or an empty String if css path could not be found.public static String getViewModeJs(String viewMode)
viewMode - a view mode value as returned by getAvailableViewModes(), e.g: "list".
"custom/list.js" *without begining slash*
or an empty String if css path could not be found.public static boolean isValidViewMode(String viewMode)
getAvailableViewModes())
viewMode - the view mode to check
public static String[] getAvailableSrc()
public static boolean isValidSrc(String src)
getAvailableSrc())
src - the data source to check
public static boolean isValidCatMode(String catMode)
"one", "and", "or".
catMode - the mode to check
public static String[] getAvailableContentTypes()
["application/pdf", "image/"], never return null.public static boolean isValidContentType(String cntType)
cntType - the content type to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||