Package com.jalios.jcmsplugin.explorer
Class Explorer
- java.lang.Object
-
- com.jalios.jcms.context.AbstractJcmsAjaxContext
-
- com.jalios.jcmsplugin.explorer.Explorer
-
- All Implemented Interfaces:
java.io.Serializable
public class Explorer extends com.jalios.jcms.context.AbstractJcmsAjaxContext
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Fields inherited from class com.jalios.jcms.context.AbstractJcmsAjaxContext
baseUrl, caddy, channel, contextPath, ctxCategories, currentCategory, debug, isAdmin, isIE, isInFrontOffice, isLogged, isWindows, loggedMember, method, parameterMap, portal, portalCategory, pub, resourcePath, url, userCountry, userLang, userLocale, userZoneId, workspace, zone
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Explorer(com.jalios.jcms.context.JcmsJspContext ctxt)
Create a new Explorer with a default configuration, and register it in session for later uses through AJAX.protected
Explorer(com.jalios.jcms.context.JcmsJspContext ctxt, ExplorerConfiguration config)
Create a new Explorer and register it in session for later uses through AJAX.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExplorerConfiguration
getConfiguration()
Retrieve the ExplorerConfiguration used by this Explorer.static Explorer
getFromAjaxRequest(com.jalios.jcms.context.JcmsJspContext ctxt)
Retrieve the current Explorer instance stored in ajax request attribute.static Explorer
getFromRequest(javax.servlet.http.HttpServletRequest request)
Retrieve the current Explorer instance stored in request attribute.java.lang.String
getId()
Retrieves the unique id of this explorer for the current session.java.lang.String
getLinkURL()
Retrieves an URL to the current state of this explorer.java.lang.String
getLinkURL(boolean escapeAmpersand)
Retrieves an URL to the current state of this explorer.com.jalios.jcms.Publication
getPreviewedPub()
Retrieves the publication being previewed in this explorer.java.lang.String
getPreviewLinkCss(com.jalios.jcms.Publication pub)
Retrieve the css classes that must be used in a link in order to provide a ajax link to update preview.com.jalios.jcms.QueryResultSet
getResultSet()
Computes and retrieve the set of data to be displayed by this Explorer.java.util.Set<com.jalios.jcms.WFState>
getStateSet()
Retrieves the workflow states that can be used for refinementjava.util.Set<java.lang.Class<?>>
getTypeSet()
Retrieves the types that can be used for refinementjava.lang.String
getViewModeCss()
Return the Style Sheet file to use with the current explorer view mode.java.lang.String
getViewModeJs()
Return the JavaScript file to use with the current explorer view mode.java.lang.String
getViewModeJsp()
Retrieves the jsp path corresponding to the current view mode of this Explorerjava.util.Set<com.jalios.jcms.workspace.Workspace>
getWorkspaceSet()
Retrieves the workspaces that can be used for refinementvoid
putInAjaxRequest(com.jalios.jcms.context.JcmsJspContext ctxt)
Put this Explorer as an ajax request attribute (overwriting any prior Explorer attribute).void
putInRequest(javax.servlet.http.HttpServletRequest request)
Put this Explorer as a request attribute (overwriting any prior Explorer attribute).void
removeFromRequest(javax.servlet.http.HttpServletRequest request)
Remove the current Explorer instance request attribute.void
setPreviewedPub(com.jalios.jcms.Publication previewedPub)
Set the publication being previewed in this explorer.-
Methods inherited from class com.jalios.jcms.context.AbstractJcmsAjaxContext
checkAccess, checkAccess, debug, deflate, getBaseUrl, getCaddy, getContextPath, getCtxCategories, getCurrentCategory, getLoggedMember, getMethod, getParameterMap, getPortal, getPortalCategory, getPublication, getResourcePath, getUrl, getUserCountry, getUserLang, getUserLocale, getUserZoneId, getWorkspace, getZone, glp, inflate, isAdmin, isInFrontOffice, isLogged, readObject, setBaseUrl, setContextPath, setCtxCategories, setCurrentCategory, setJcmsContext, setLoggedMember, setMethod, setParameterMap, setPortal, setPortalCategory, setPublication, setResourcePath, setUrl, setUserCountry, setUserLang, setUserLocale, setUserZoneId, setWorkspace, writeObject
-
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Explorer
protected Explorer(com.jalios.jcms.context.JcmsJspContext ctxt)
Create a new Explorer with a default configuration, and register it in session for later uses through AJAX.- Parameters:
ctxt
- the JcmsJspContext available in the first "standard" request prior to calling AJAX methods.
-
Explorer
protected Explorer(com.jalios.jcms.context.JcmsJspContext ctxt, ExplorerConfiguration config)
Create a new Explorer and register it in session for later uses through AJAX.- Parameters:
ctxt
- the JcmsJspContext available in the first "standard" request prior to calling AJAX methods.config
- the ExplorerConfiguration instance to use for this Explorer, if null an attempt to retrieve the configuration from the request attribute is made otherwise a new default configuration is used.
-
-
Method Detail
-
putInAjaxRequest
public void putInAjaxRequest(com.jalios.jcms.context.JcmsJspContext ctxt)
Put this Explorer as an ajax request attribute (overwriting any prior Explorer attribute).- Parameters:
ctxt
- the JcmsJspContext available in the first "standard" request prior to calling AJAX methods.
-
getFromAjaxRequest
public static Explorer getFromAjaxRequest(com.jalios.jcms.context.JcmsJspContext ctxt)
Retrieve the current Explorer instance stored in ajax request attribute.- Parameters:
ctxt
- the current JcmsJspContext.- Returns:
- an existing Explorer instance or null if no Explorer could be found
-
putInRequest
public void putInRequest(javax.servlet.http.HttpServletRequest request)
Put this Explorer as a request attribute (overwriting any prior Explorer attribute).- Parameters:
request
- the request in which to put this Explorer
-
removeFromRequest
public void removeFromRequest(javax.servlet.http.HttpServletRequest request)
Remove the current Explorer instance request attribute.- Parameters:
request
- the request in which to remove the current Explorer
-
getFromRequest
public static Explorer getFromRequest(javax.servlet.http.HttpServletRequest request)
Retrieve the current Explorer instance stored in request attribute.- Parameters:
request
- the request from which to retrieve the request attribute- Returns:
- an existing Explorer instance or null if no Explorer could be found
-
getId
public java.lang.String getId()
Retrieves the unique id of this explorer for the current session. Id always follow the following norm :"explorer{counter}"
where {counter} id a number from 0 to 7.- Returns:
- the unique ID of this explorer
-
getConfiguration
public ExplorerConfiguration getConfiguration()
Retrieve the ExplorerConfiguration used by this Explorer.- Returns:
- an ExplorerConfiguration (never return null)
-
getViewModeJsp
public java.lang.String getViewModeJsp()
Retrieves the jsp path corresponding to the current view mode of this Explorer- Returns:
- a relative path of a jsp
"/custom/list.jsp"
, *WITH begining slash*.
-
getViewModeCss
public java.lang.String getViewModeCss()
Return the Style Sheet file to use with the current explorer view mode.- Returns:
- a relative path of a css
"custom/list.css"
, *without begining slash*.
-
getViewModeJs
public java.lang.String getViewModeJs()
Return the JavaScript file to use with the current explorer view mode.- Returns:
- a relative path of a js
"custom/list.js"
, *without begining slash*.
-
getWorkspaceSet
public java.util.Set<com.jalios.jcms.workspace.Workspace> getWorkspaceSet()
Retrieves the workspaces that can be used for refinement- Returns:
- a Set of
Workspace
-
getTypeSet
public java.util.Set<java.lang.Class<?>> getTypeSet()
Retrieves the types that can be used for refinement- Returns:
- a Set of
Class
-
getStateSet
public java.util.Set<com.jalios.jcms.WFState> getStateSet()
Retrieves the workflow states that can be used for refinement- Returns:
- a Set of
WFState
-
getResultSet
public com.jalios.jcms.QueryResultSet getResultSet()
Computes and retrieve the set of data to be displayed by this Explorer.- Returns:
- a new QueryResultSet instance for each call
-
getLinkURL
public java.lang.String getLinkURL()
Retrieves an URL to the current state of this explorer.Ampersand are html escaped in return URL (since EXPLORER-142)
- Returns:
- an absolute URL containg all parameter leading to current state of this explorer
-
getLinkURL
public java.lang.String getLinkURL(boolean escapeAmpersand)
Retrieves an URL to the current state of this explorer.- Parameters:
escapeAmpersand
- will use & if true, & if false- Returns:
- an absolute URL containg all parameter leading to current state of this explorer
-
getPreviewedPub
public com.jalios.jcms.Publication getPreviewedPub()
Retrieves the publication being previewed in this explorer.- Returns:
- a Publication or null when the publication selected is not part of the current result set, or if no publication is being previewed.
-
setPreviewedPub
public void setPreviewedPub(com.jalios.jcms.Publication previewedPub)
Set the publication being previewed in this explorer.- Parameters:
previewedPub
- a Publication to preview or null to leave empty.
-
getPreviewLinkCss
public java.lang.String getPreviewLinkCss(com.jalios.jcms.Publication pub)
Retrieve the css classes that must be used in a link in order to provide a ajax link to update preview.- Parameters:
pub
- the Publication for which the link will be generated- Returns:
- a String containing one or more css class, return empty string if specified publication was null. E.g : ID_c_42 exa-preview ex-preview-highlight
-
-