Class PubBrowserHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class PubBrowserHandler extends JcmsFormHandler
  • Field Details

    • 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:
    • MINE_GROUPS

      public static final String MINE_GROUPS
      See Also:
    • MODE_MINE

      public static final String MODE_MINE
      See Also:
    • MODE_ALL

      public static final String MODE_ALL
      See Also:
    • MODE_DELETE

      public static final String MODE_DELETE
      See Also:
    • queryHandler

      protected QueryHandler queryHandler
    • superClass

      protected Class superClass
    • currentClass

      protected Class currentClass
    • member

      protected Member member
    • category

      protected Category category
    • groups

      protected Group[] groups
    • view

      protected PubBrowserHandler.View view
    • 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
    • caddyFilter

      protected boolean caddyFilter
    • 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
    • subTypeList

      protected List<Class<?>> subTypeList
  • Constructor Details

    • PubBrowserHandler

      public PubBrowserHandler()
  • Method Details

    • 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 - IO Exception
    • getViewItems

      public List<AppSidebarSectionMenuItem> getViewItems()
    • isMineView

      public boolean isMineView()
    • isAllView

      public boolean isAllView()
    • isArchivedView

      public boolean isArchivedView()
    • isDeletedView

      public boolean isDeletedView()
    • getOtherDataTypeItems

      public List<AppSidebarSectionMenuItem> getOtherDataTypeItems()
    • queryData

      protected void queryData() throws LogException
      Execute the query to prepare resultSet
      Throws:
      LogException - if an exception occurs
    • getOldTypeClass

      public Class getOldTypeClass()
      Returns:
      the old type
    • getSuperClass

      public Class getSuperClass()
      Returns:
      the refine super class
      Since:
      jcms-4.0
    • getCurrentClass

      public Class getCurrentClass()
      Returns:
      the refine class
      Since:
      jcms-4.0
    • getMember

      public Member getMember()
      Returns:
      the refine member
      Since:
      jcms-4.0
    • getCategory

      public Category getCategory()
      Returns:
      the refine category
      Since:
      jcms-4.0
    • getGroups

      public Group[] getGroups()
      Returns:
      all the groups
      Since:
      jcms-4.0
    • canPublish

      public boolean canPublish()
      Returns:
      true if LoggedMember can publish current type
      Since:
      jcms-4.0
    • getPortals

      public TreeSet getPortals()
    • getPortalSet

      public TreeSet getPortalSet()
    • showCategories

      public boolean showCategories()
      Returns:
      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()
      Returns:
      if the table is in detailed mode
      Since:
      jcms-4.0
    • selectGroup

      public boolean selectGroup(Group g)
      Parameters:
      g - the group
      Returns:
      true if the current group should be selected
      Since:
      jcms-4.0
    • getSelectedGroup

      public Group getSelectedGroup()
      Returns:
      the selected group
    • selectPortal

      public boolean selectPortal(Portal p)
      Parameters:
      p - the portal
      Returns:
      true if the current portal should be selected
      Since:
      jcms-4.0
    • isPortletMode

      public boolean isPortletMode()
      Returns:
      true if pubBrowser show Portlet
      Since:
      jcms-4.0
    • isFormMode

      public boolean isFormMode()
      Returns:
      true if pubBrowser show Form
      Since:
      jcms-4.0
    • isContentMode

      public boolean isContentMode()
      Returns:
      true if pubBrowser show Content
      Since:
      jcms-4.0
    • isUGCMode

      public boolean isUGCMode()
      Returns:
      true if pubBrowser show UGC
      Since:
      jcms-6.0.0
    • isDeleteMode

      public boolean isDeleteMode()
      Deprecated.
      Returns:
      true if pubBrowser show Deleted Publication
      Since:
      jcms-4.0
    • isAllMode

      public boolean isAllMode()
      Deprecated.
      Returns:
      true if pubBrowser show All Publication
      Since:
      jcms-4.0
    • isMineMode

      public boolean isMineMode()
      Deprecated.
      Returns:
      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()
    • showDocumentSize

      public boolean showDocumentSize()
    • getResultSet

      public Set getResultSet()
      Returns:
      the result of publication
      Since:
      jcms-4.0
    • getPubCount

      public int getPubCount()
    • getPubCountTitle

      public String getPubCountTitle()
    • getPubBrowserTitle

      public String getPubBrowserTitle(Class clazz)
      Returns the title of the pubBrowser
      Parameters:
      clazz - the selected class
      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()
    • getSubTypeList

      public List<Class<?>> getSubTypeList(Class clazz)
    • getTypeSettings

      public ControlSettings getTypeSettings()
    • getDocumentKindSettings

      public ControlSettings getDocumentKindSettings()
    • getPstatusSettings

      public ControlSettings getPstatusSettings()
    • setSuper

      public void setSuper(String superType)
    • setClassname

      public void setClassname(String type)
    • setMode

      public void setMode(String mode)
    • setView

      public void setView(String v)
    • 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
      Parameters:
      b - the value
    • 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 filter)
      Deprecated.
      Set whether content of pub browser should be filtered by using content in caddy.
      Parameters:
      filter - true to display only content from caddy, false to use normal behavior
    • getOpCaddy

      public String getOpCaddy()
      Deprecated.
      Retrieve a boolean (as a string) indicating if the pub browser is filtered using content of the caddy
      Returns:
      "true" if caddy is filter, "false"
    • setCaddyFilter

      public void setCaddyFilter(boolean filter)
      Set whether content of pub browser should be filtered by using content in caddy.
      Parameters:
      filter - true to display only content from caddy, false to use normal behavior
      Since:
      jcms-7.1.2 (fix JCMS-3209)
    • isCaddyFilter

      public boolean isCaddyFilter()
      Retrieve a boolean (as a string) indicating if the pub browser is filtered using content of the caddy
      Returns:
      "true" if caddy is filter, "false"
      Since:
      jcms-7.1.2 (fix JCMS-3209)
    • 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
    • setExactType

      public void setExactType(boolean exactType)
    • isExactType

      public boolean isExactType()
    • 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()
    • isPubCountAccurate

      public boolean isPubCountAccurate()
    • showQueryStatusMessage

      public boolean showQueryStatusMessage()
    • getQueryStatusMessage

      public String getQueryStatusMessage(String userLang)
    • isAllWorkspaceFilter

      public boolean isAllWorkspaceFilter()
    • setAllWorkspaceFilter

      public void setAllWorkspaceFilter(boolean allWorkspaceFilter)