Class PubBrowserHandler

    • Field Detail

      • PUBBROWSER_QUERY

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

        protected java.lang.Class superClass
      • currentClass

        protected java.lang.Class currentClass
      • member

        protected Member member
      • groups

        protected Group[] groups
      • mode

        protected java.lang.String mode
      • showCategories

        protected boolean showCategories
      • showAllTypesFilter

        protected boolean showAllTypesFilter
      • showReadRightsPub

        protected boolean showReadRightsPub
      • showCaddy

        protected boolean showCaddy
      • detailMode

        protected boolean detailMode
      • resultSet

        protected java.util.Set resultSet
      • portals

        protected java.util.TreeSet portals
      • pstatus

        protected int pstatus
      • oldType

        protected java.lang.String oldType
      • text

        protected java.lang.String text
      • caddyFilter

        protected boolean caddyFilter
      • workspaceFilter

        protected boolean workspaceFilter
      • ability

        protected java.lang.String ability
      • documentKinds

        protected java.lang.String[] documentKinds
      • start

        protected int start
      • pageSize

        protected int pageSize
      • pagerAll

        protected boolean pagerAll
      • pubCount

        protected int pubCount
      • sortType

        protected java.lang.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 java.util.List<java.lang.Class<?>> subTypeList
    • Constructor Detail

      • PubBrowserHandler

        public PubBrowserHandler()
    • Method Detail

      • processAction

        public boolean processAction()
                              throws java.io.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:
        java.io.IOException - IO Exception
      • queryData

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

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

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

        public java.lang.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 java.util.TreeSet getPortals()
      • getPortalSet

        public java.util.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()
        Returns:
        true if pubBrowser show Deleted Publication
        Since:
        jcms-4.0
      • isAllMode

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

        public boolean isMineMode()
        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()
      • getResultSet

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

        public int getPubCount()
      • getPubBrowserTitle

        public java.lang.String getPubBrowserTitle​(java.lang.Class clazz)
        Returns the title of the pubBrowser
        Parameters:
        clazz - the selected class
        Returns:
        title
        Since:
        jcms-4.0
      • getPubBrowserDescription

        public java.lang.String getPubBrowserDescription()
        Returns the description of the pubBrowser class
        Returns:
        description
        Since:
        jcms-5.6.0
      • getSubTypeList

        public java.util.List<java.lang.Class<?>> getSubTypeList()
      • setSuper

        public void setSuper​(java.lang.String superType)
      • setClassname

        public void setClassname​(java.lang.String type)
      • setMode

        public void setMode​(java.lang.String mode)
      • setMid

        public void setMid​(java.lang.String mid)
      • setDetail

        public void setDetail​(boolean detail)
      • setCid

        public void setCid​(java.lang.String cid)
      • setPortalId

        public void setPortalId​(java.lang.String portalId)
      • setGid

        public void setGid​(java.lang.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​(java.lang.String string)
      • getText

        public java.lang.String getText()
      • setText

        public void setText​(java.lang.String string)
      • setOpCaddy

        public void setOpCaddy​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.String getQueryStatusMessage​(java.lang.String userLang)
      • isAllWorkspaceFilter

        public boolean isAllWorkspaceFilter()
      • setAllWorkspaceFilter

        public void setAllWorkspaceFilter​(boolean allWorkspaceFilter)