com.jalios.jcms.handler
Class PubBrowserHandler

java.lang.Object
  extended by com.jalios.jcms.context.JcmsContext
      extended by com.jalios.jcms.context.JcmsJspContext
          extended by com.jalios.jcms.handler.JcmsFormHandler
              extended by com.jalios.jcms.handler.PubBrowserHandler
All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class PubBrowserHandler
extends JcmsFormHandler


Field Summary
protected  String ability
           
protected  Category category
           
protected  Class currentClass
           
protected  boolean detailMode
           
protected  String[] documentKinds
           
protected  Group[] groups
           
protected  boolean isAllMode
           
protected  boolean isContentMode
           
protected  boolean isDeleteMode
           
protected  boolean isFormMode
           
protected  boolean isMineMode
           
protected  boolean isPortletMode
           
protected  boolean isUGCMode
           
protected  Member member
           
static String MINE_GROUPS
           
static String MINE_PORTAL
           
protected  String mode
           
static String MODE_ALL
           
static String MODE_DELETE
           
static String MODE_MINE
           
protected  String oldType
           
protected  String opCaddy
           
protected  boolean pagerAll
           
protected  int pageSize
           
protected  TreeSet portals
           
protected  int pstatus
           
static String PUBBROWSER_QUERY
          QueryHandler attribute used to indicate that we are processing a pub browser query.
protected  int pubCount
           
protected  QueryResultSet qrs
           
protected  QueryHandler queryHandler
           
protected  Set resultSet
           
static String REVISION
           
protected  boolean showAllTypesFilter
           
protected  boolean showCaddy
           
protected  boolean showCategories
           
protected  boolean showReadRightsPub
           
protected  boolean sortReverse
           
protected  String sortType
           
protected  int start
           
protected  List<Class<?>> subTypeList
           
protected  Class superClass
           
protected  String text
           
protected  boolean workspaceFilter
           
 
Fields inherited from class com.jalios.jcms.handler.JcmsFormHandler
contextMap, editFieldSet, noRedirect, noSendRedirect, popupEdition, redirect, redirectOnClosePopup, workspaceForced
 
Fields inherited from class com.jalios.jcms.context.JcmsJspContext
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, jsboSet, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADER
 
Fields inherited from class com.jalios.jcms.context.JcmsContext
browser, caddy, channel, inFO, initDone, initWorkspace, isAdmin, isAjaxRequest, isDBMember, isDebug, isLogged, loggedMember, request, response, userCountry, userLang, userLocale, workspace
 
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_DEEP_COPY, OP_DEEP_DELETE, OP_DELETE, OP_MERGE, OP_UPDATE, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
Constructor Summary
PubBrowserHandler()
           
 
Method Summary
 boolean canPublish()
          Return true if LoggedMember can publish current type
 String getAbility()
          Retrieves the current the portal element's ability defined for this handler.
 Category getCategory()
          Return the refine category
 Class getCurrentClass()
          Return the refine class
 String[] getDocumentKinds()
          Retrieve the kind of document defined for this PubBrowser
 Group[] getGroups()
          Return all the groups
 Member getMember()
          Return the refine member
 Class getOldTypeClass()
          Return the old type
 String getOpCaddy()
           
 TreeSet getPortals()
           
 TreeSet getPortalSet()
           
 int getPstatus()
           
 String getPubBrowserDescription()
          Returns the description of the pubBrowser class
 String getPubBrowserTitle(Class clazz)
          Returns the title of the pubBrowser
 int getPubCount()
           
 QueryHandler getQueryHandler()
           
 String getQueryStatusMessage(String userLang)
           
 Set getResultSet()
          Return the result of publication
 Group getSelectedGroup()
          Return the selected group
 List<Class<?>> getSubTypeList()
           
 Class getSuperClass()
          Return the refine super class
 String getText()
           
 boolean isAllMode()
          Return true if pubBrowser show All Publication
 boolean isContentMode()
          Return true if pubBrowser show Content
 boolean isDeleteMode()
          Return true if pubBrowser show Deleted Publication
 boolean isDetailMode()
          Return if the table is in detailed mode
 boolean isFormMode()
          Return true if pubBrowser show Form
 boolean isHybrid()
           
 boolean isMineMode()
          Return true if pubBrowser show My Publication
 boolean isPortletMode()
          Return true if pubBrowser show Portlet
 boolean isUGCMode()
          Return true if pubBrowser show UGC
 boolean isWorkspaceFilter()
           
 boolean processAction()
          Method to be implemented to check/validate action to be performed and process them.
protected  void queryData()
          Execute the query to prepare resultSet
 boolean selectGroup(Group g)
          Return true if the current group should be selected
 boolean selectPortal(Portal p)
          Return true if the current portal should be selected
 void setAbility(String ability)
          Sets the portal element's ability to match when PortalElement are found.
 void setCid(String cid)
           
 void setClassname(String type)
           
 void setDetail(boolean detail)
           
 void setDocumentKinds(String[] kinds)
          Set the kind of document to match for this PubBrowser
 void setGid(String gid)
           
 void setMid(String mid)
           
 void setMode(String mode)
           
 void setOldType(String string)
           
 void setOpCaddy(String string)
           
 void setPagerAll(boolean pagerAll)
           
 void setPageSize(int pageSize)
           
 void setPortalId(String portalId)
           
 void setPstatus(int i)
           
 void setReverse(boolean reverse)
           
 void setShowCategories(boolean b)
          Set the value of showCategories to b except if this parameter is forced as request parameter
 void setShowReadRightPubs(boolean v)
           
 void setSort(String sort)
           
 void setStart(int start)
           
 void setSuper(String superType)
           
 void setText(String string)
           
 void setWorkspaceFilter(boolean workspaceFilter)
           
 boolean showAllTypesFilter()
           
 boolean showCaddy()
           
 boolean showCategories()
          Return true if pubBrowser must show Category tree
 boolean showGroupFilter()
           
 boolean showMemberFilter()
           
 boolean showPortalFilter()
           
 boolean showPstatusFilter()
           
 boolean showQueryStatusMessage()
           
 boolean showTextFilter()
           
 
Methods inherited from class com.jalios.jcms.handler.JcmsFormHandler
afterValidation, checkMissingField, getControllerContext, getEditFieldSet, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenFieldML, getMainLangValue, getMainLangValueArray, getMLMap, getMLMapArray, getRedirect, getRedirectOnClosePopup, getWorkspace, init, isFieldEdition, isFieldMissing, isPartialFieldEdition, isPopupEdition, isWorkspaceForced, processStatus, sendRedirect, sendRedirect, setEditField, setNoRedirect, setNoSendRedirect, setPopupEdition, setRedirect, setRedirectOnClosePopup, setWorkspace, setWs, updateUploadedField, updateUploadedFields, validate
 
Methods inherited from class com.jalios.jcms.context.JcmsJspContext
addBodyAttributes, addCSSHeader, addCSSHeader, addCSSHeader, addCSSHeader, addCustomHeader, addHttpEquivHeader, addHttpNameHeader, addJavaScript, addJavaScript, addJavaScript, addJavaScriptCode, addStyleHeader, addStyleHeader, checkAccess, checkAccess, checkCSRF, debugDisplayContext, forceEditIcon, forceUpdate, getAjaxRequestAttribute, getAjaxRequestId, getAllHeadersDiffMap, getAllHeadersMap, getBackOfficeCSSHeader, getBackOfficeJavaScriptSet, getBodyAttributes, getContentForm, getCSSHeaders, getCtxCategories, getCurrentCategory, getCustomHeaders, getDocType, getFinalCSSMap, getFinalJavaScriptSet, getFormElementCount, getFrontOfficeCSSHeader, getFrontOfficeJavaScriptSet, getHttpEquivHeaders, getHttpNameHeaders, getJavaScriptCodeSet, getJavaScriptSet, getJSONBridge, getPackVersion, getPageContext, getPageTitle, getPageZone, getPortal, getPortalCategory, getPortlet, getPublication, getStyleHeaders, getTemplateUsage, internalSetupEmptyHeader, isEditIcon, isPrintView, registerDisplayContext, removeAjaxRequestAttribute, setAjaxRequestAttribute, setAjaxRequestId, setAllHeadersDiffMap, setDocType, setEditIcon, setFormElementCount, setPageContext, setPageTitle, setPageZone, setShowEditIcon, setTemplateUsage, showEditIcon, workaroundBrowserBaseHrefBug
 
Methods inherited from class com.jalios.jcms.context.JcmsContext
addCookie, addMsg, addMsg, addMsgSession, addMsgSession, applySelector, forceWorkspaceUpdate, getBaseUrl, getBrowser, getCaddy, getContextPath, getErrorMsg, getErrorMsgList, getErrorMsgSession, getErrorMsgSessionList, getInfoMsg, getInfoMsgList, getInfoMsgSession, getInfoMsgSessionList, getLoggedMember, getMsgList, getMsgSessionList, getRequest, getResponse, getSession, getUploadedFile, getUploadedFileList, getUrlWithCommonUpdatedParams, getUserCountry, getUserLang, getUserLocale, getWarningMsg, getWarningMsgList, getWarningMsgSession, getWarningMsgSessionList, glp, isAdmin, isAjaxRequest, isDBMember, isDebug, isInFrontOffice, isLogged, isWebdavAccess, removeMessage, removeMessage, retrieveUploadedFile, select, sendForbidden, sendForbidden, sendRedirect, sendRedirect, sendRedirect, setErrorMsg, setErrorMsg, setErrorMsgSession, setErrorMsgSession, setInfoMsg, setInfoMsg, setInfoMsgSession, setInfoMsgSession, setLoggedMember, setRequest, setResponse, setWarningMsg, setWarningMsg, setWarningMsgSession, setWarningMsgSession, validateRegexp, validateSchedule
 
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

PUBBROWSER_QUERY

public static final String PUBBROWSER_QUERY
QueryHandler attribute used to indicate that we are processing a pub browser query.


MINE_PORTAL

public static final String MINE_PORTAL
See Also:
Constant Field Values

MINE_GROUPS

public static final String MINE_GROUPS
See Also:
Constant Field Values

MODE_MINE

public static final String MODE_MINE
See Also:
Constant Field Values

MODE_ALL

public static final String MODE_ALL
See Also:
Constant Field Values

MODE_DELETE

public static final String MODE_DELETE
See Also:
Constant Field Values

queryHandler

protected QueryHandler queryHandler

superClass

protected Class superClass

currentClass

protected Class currentClass

member

protected Member member

category

protected Category category

groups

protected Group[] groups

mode

protected String mode

showCategories

protected boolean showCategories

showAllTypesFilter

protected boolean showAllTypesFilter

showReadRightsPub

protected boolean showReadRightsPub

showCaddy

protected boolean showCaddy

detailMode

protected boolean detailMode

qrs

protected QueryResultSet qrs

resultSet

protected Set resultSet

portals

protected TreeSet portals

pstatus

protected int pstatus

oldType

protected String oldType

text

protected String text

opCaddy

protected String opCaddy

workspaceFilter

protected boolean workspaceFilter

ability

protected String ability

documentKinds

protected String[] documentKinds

start

protected int start

pageSize

protected int pageSize

pagerAll

protected boolean pagerAll

pubCount

protected int pubCount

sortType

protected String sortType

sortReverse

protected boolean sortReverse

isContentMode

protected boolean isContentMode

isPortletMode

protected boolean isPortletMode

isFormMode

protected boolean isFormMode

isUGCMode

protected boolean isUGCMode

isDeleteMode

protected boolean isDeleteMode

isAllMode

protected boolean isAllMode

isMineMode

protected boolean isMineMode

subTypeList

protected List<Class<?>> subTypeList
Constructor Detail

PubBrowserHandler

public PubBrowserHandler()
Method Detail

processAction

public boolean processAction()
                      throws IOException
Description copied from class: JcmsFormHandler
Method to be implemented to check/validate action to be performed and process them.

Default implementation is to return false. No need to call super method.

This method may NOT be invoked at all if security validation are not met.
You must ensure your handler and JSP can work properly without any code invoked in this method.

Overrides:
processAction in class JcmsFormHandler
Returns:
false if no redirection is needed, true otherwise
Throws:
IOException

queryData

protected void queryData()
                  throws LogException
Execute the query to prepare resultSet

Throws:
LogException

getOldTypeClass

public Class getOldTypeClass()
Return the old type


getSuperClass

public Class getSuperClass()
Return the refine super class

Since:
jcms-4.0

getCurrentClass

public Class getCurrentClass()
Return the refine class

Since:
jcms-4.0

getMember

public Member getMember()
Return the refine member

Since:
jcms-4.0

getCategory

public Category getCategory()
Return the refine category

Since:
jcms-4.0

getGroups

public Group[] getGroups()
Return all the groups

Since:
jcms-4.0

canPublish

public boolean canPublish()
Return true if LoggedMember can publish current type

Since:
jcms-4.0

getPortals

public TreeSet getPortals()

getPortalSet

public TreeSet getPortalSet()

showCategories

public boolean showCategories()
Return true if pubBrowser must show Category tree

Since:
jcms-4.0

showAllTypesFilter

public boolean showAllTypesFilter()
Returns:
true if the pubBrowser must show the "All types" filter option
Since:
jcms-6.0.0

showCaddy

public boolean showCaddy()
Returns:
true if the caddy icons must be shown.
Since:
jcms-6.0.0

isDetailMode

public boolean isDetailMode()
Return if the table is in detailed mode

Since:
jcms-4.0

selectGroup

public boolean selectGroup(Group g)
Return true if the current group should be selected

Since:
jcms-4.0

getSelectedGroup

public Group getSelectedGroup()
Return the selected group

Returns:
a Group

selectPortal

public boolean selectPortal(Portal p)
Return true if the current portal should be selected

Since:
jcms-4.0

isPortletMode

public boolean isPortletMode()
Return true if pubBrowser show Portlet

Since:
jcms-4.0

isFormMode

public boolean isFormMode()
Return true if pubBrowser show Form

Since:
jcms-4.0

isContentMode

public boolean isContentMode()
Return true if pubBrowser show Content

Since:
jcms-4.0

isUGCMode

public boolean isUGCMode()
Return true if pubBrowser show UGC

Since:
jcms-6.0.0

isDeleteMode

public boolean isDeleteMode()
Return true if pubBrowser show Deleted Publication

Since:
jcms-4.0

isAllMode

public boolean isAllMode()
Return true if pubBrowser show All Publication

Since:
jcms-4.0

isMineMode

public boolean isMineMode()
Return true if pubBrowser show My Publication

Since:
jcms-4.0

showPstatusFilter

public boolean showPstatusFilter()

showGroupFilter

public boolean showGroupFilter()

showMemberFilter

public boolean showMemberFilter()

showPortalFilter

public boolean showPortalFilter()

showTextFilter

public boolean showTextFilter()

getResultSet

public Set getResultSet()
Return the result of publication

Since:
jcms-4.0

getPubCount

public int getPubCount()

getPubBrowserTitle

public String getPubBrowserTitle(Class clazz)
Returns the title of the pubBrowser

Parameters:
clazz -
Returns:
title
Since:
jcms-4.0

getPubBrowserDescription

public String getPubBrowserDescription()
Returns the description of the pubBrowser class

Returns:
description
Since:
jcms-5.6.0

getSubTypeList

public List<Class<?>> getSubTypeList()

setSuper

public void setSuper(String superType)

setClassname

public void setClassname(String type)

setMode

public void setMode(String mode)

setMid

public void setMid(String mid)

setDetail

public void setDetail(boolean detail)

setCid

public void setCid(String cid)

setPortalId

public void setPortalId(String portalId)

setGid

public void setGid(String gid)

setShowCategories

public void setShowCategories(boolean b)
Set the value of showCategories to b except if this parameter is forced as request parameter


getPstatus

public int getPstatus()

setPstatus

public void setPstatus(int i)

setOldType

public void setOldType(String string)

getText

public String getText()

setText

public void setText(String string)

setOpCaddy

public void setOpCaddy(String string)

getOpCaddy

public String getOpCaddy()

isWorkspaceFilter

public boolean isWorkspaceFilter()

setWorkspaceFilter

public void setWorkspaceFilter(boolean workspaceFilter)

setAbility

public void setAbility(String ability)
Sets the portal element's ability to match when PortalElement are found.

Parameters:
ability - an ability choosen from the PortalElement.getAllAbilities()

getAbility

public String getAbility()
Retrieves the current the portal element's ability defined for this handler.

Returns:
the ability defined for this query.

setDocumentKinds

public void setDocumentKinds(String[] kinds)
Set the kind of document to match for this PubBrowser

Parameters:
kinds - an array of document kind (e.g "pdf", "image", "spreadsheet", ...)
Since:
jcms-6.1

getDocumentKinds

public String[] getDocumentKinds()
Retrieve the kind of document defined for this PubBrowser

Returns:
a set of content type, never return null
Since:
jcms-6.1

getQueryHandler

public QueryHandler getQueryHandler()
Returns:
the query handler that was used to find result of pubBrowser, or null if no handler was used.

setStart

public void setStart(int start)

setPageSize

public void setPageSize(int pageSize)

setPagerAll

public void setPagerAll(boolean pagerAll)

setSort

public void setSort(String sort)

setReverse

public void setReverse(boolean reverse)

setShowReadRightPubs

public void setShowReadRightPubs(boolean v)

isHybrid

public boolean isHybrid()

showQueryStatusMessage

public boolean showQueryStatusMessage()

getQueryStatusMessage

public String getQueryStatusMessage(String userLang)


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