com.jalios.jcmsplugin.explorer
Class Explorer

java.lang.Object
  extended by com.jalios.jcms.context.AbstractJcmsAjaxContext
      extended by com.jalios.jcmsplugin.explorer.Explorer
All Implemented Interfaces:
Serializable

public class Explorer
extends AbstractJcmsAjaxContext

See Also:
Serialized Form

Field Summary
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.context.AbstractJcmsAjaxContext
baseUrl, caddy, channel, contextPath, ctxCategories, currentCategory, isAdmin, isIE, isInFrontOffice, isLogged, isWindows, loggedMember, parameterMap, portal, portalCategory, pub, resourcePath, url, userLang, userLocale, workspace, zone
 
Constructor Summary
protected Explorer(JcmsJspContext ctxt)
          Create a new Explorer with a default configuration, and register it in session for later uses through AJAX.
protected Explorer(JcmsJspContext ctxt, ExplorerConfiguration config)
          Create a new Explorer and register it in session for later uses through AJAX.
 
Method Summary
 ExplorerConfiguration getConfiguration()
          Retrieve the ExplorerConfiguration used by this Explorer.
 Set getContentTypeSet()
          Retrieve the content types that can be used for refinement
static Explorer getFromRequest(javax.servlet.http.HttpServletRequest request)
          Retrieve the current Explorer instance stored in request attribute.
 String getId()
          Retrieves the unique id of this explorer for the current session.
 String getLinkURL()
          Retrieves an URL to the current state of this explorer.
 Publication getPreviewedPub()
          Retrieves the publication being previewed in this explorer.
 String getPreviewLinkCss(Publication pub)
          Retrieve the css classes that must be used in a link in order to provide a ajax link to update preview.
 QueryResultSet getResultSet()
          Computes and retrieve the set of data to be displayed by this Explorer.
 Set getStateSet()
          Retrieves the workflow states that can be used for refinement
 Set getTypeSet()
          Retrieves the types that can be used for refinement
 String getViewModeCss()
          Return the Style Sheet file to use with the current explorer view mode.
 String getViewModeJs()
          Return the JavaScript file to use with the current explorer view mode.
 String getViewModeJsp()
          Retrieves the jsp path corresponding to the current view mode of this Explorer
 Set getWorkspaceSet()
          Retrieves the workspaces that can be used for refinement
 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(Publication previewedPub)
          Set the publication being previewed in this explorer.
 
Methods inherited from class com.jalios.jcms.context.AbstractJcmsAjaxContext
getBaseUrl, getCaddy, getContextPath, getCtxCategories, getCurrentCategory, getLoggedMember, getParameterMap, getPortal, getPortalCategory, getPublication, getResourcePath, getUrl, getUserLang, getUserLocale, getWorkspace, getZone, glp, isAdmin, isInFrontOffice, isLogged, setBaseUrl, setContextPath, setCtxCategories, setCurrentCategory, setJcmsContext, setLoggedMember, setParameterMap, setPortal, setPortalCategory, setPublication, setResourcePath, setUrl, setUserLang, setUserLocale, setWorkspace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

Explorer

protected Explorer(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(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

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 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 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 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 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 Set getWorkspaceSet()
Retrieves the workspaces that can be used for refinement

Returns:
a Set of Workspace

getTypeSet

public Set getTypeSet()
Retrieves the types that can be used for refinement

Returns:
a Set of Class

getStateSet

public Set getStateSet()
Retrieves the workflow states that can be used for refinement

Returns:
a Set of WFState

getContentTypeSet

public Set getContentTypeSet()
Retrieve the content types that can be used for refinement

Returns:
a Set of String. E.g. {"application/pdf", "image/" };

getResultSet

public 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 String getLinkURL()
Retrieves an URL to the current state of this explorer.

Returns:
an absolute URL containg all parameter leading to current state of this explorer

getPreviewedPub

public 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(Publication previewedPub)
Set the publication being previewed in this explorer.

Parameters:
previewedPub - a Publication to preview or null to leave empty.

getPreviewLinkCss

public String getPreviewLinkCss(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


Copyright © 2001-2007 Jalios SA. All Rights Reserved.