Class CaddyPopinHandler

  • All Implemented Interfaces:
    JcmsConstants, JaliosConstants

    public class CaddyPopinHandler
    extends JcmsJspContext
    This handler is used to add or remove content to the caddy.
    Since:
    jcms-5.1
    Version:
    $Revision: 134434 $
    Author:
    Olivier Jaquemet
    • Field Detail

      • ACTION_REMOVE_STR

        public static final java.lang.String ACTION_REMOVE_STR
        See Also:
        Constant Field Values
      • ACTION_REPLACE_STR

        public static final java.lang.String ACTION_REPLACE_STR
        See Also:
        Constant Field Values
      • ACTION_ADD_CATEGORYS_CHILDREN_STR

        public static final java.lang.String ACTION_ADD_CATEGORYS_CHILDREN_STR
        See Also:
        Constant Field Values
      • ACTION_CLEAR_STR

        public static final java.lang.String ACTION_CLEAR_STR
        See Also:
        Constant Field Values
      • ALL_ACTIONS

        public static final java.lang.String[] ALL_ACTIONS
      • ACTION_ADD_CATEGORYS_CHILDREN

        public static final int ACTION_ADD_CATEGORYS_CHILDREN
        See Also:
        Constant Field Values
      • action

        protected int action
      • dataClass

        protected java.lang.Class<? extends Data> dataClass
      • dataSet

        protected java.util.HashSet<Data> dataSet
      • dbMemberIdSet

        protected java.util.HashSet<java.lang.String> dbMemberIdSet
      • queryString

        protected java.lang.String queryString
      • groupQueryString

        protected java.lang.String groupQueryString
      • memberQueryString

        protected java.lang.String memberQueryString
      • dbMemberQueryString

        protected java.lang.String dbMemberQueryString
      • workspaceQueryString

        protected java.lang.String workspaceQueryString
      • allMemberQueryString

        protected java.lang.String allMemberQueryString
      • checkPstatus

        protected boolean checkPstatus
      • showAllMedia

        protected boolean showAllMedia
      • caddyUpdated

        protected boolean caddyUpdated
    • Constructor Detail

      • CaddyPopinHandler

        public CaddyPopinHandler()
    • Method Detail

      • validate

        public boolean validate()
                         throws java.io.IOException
        Effectively trigger the action of this handler.
        Returns:
        true if a redirect was done, false otherwise
        Throws:
        java.io.IOException - on error
      • retrieveResultFromQuery

        protected void retrieveResultFromQuery()
        Use the query string to retrieve more results in the dataSet.
      • retrieveResultFromGroupQuery

        protected void retrieveResultFromGroupQuery()
        Use the group query string to retrieve more results in the dataSet.
      • retrieveResultFromMemberQuery

        protected void retrieveResultFromMemberQuery()
        Use the member query string to retrieve more results in the dataSet.
      • retrieveResultFromDBMemberQuery

        protected void retrieveResultFromDBMemberQuery()
        Use the member query string to retrieve more results in the dataSet.
      • retrieveResultFromAllMemberQuery

        protected void retrieveResultFromAllMemberQuery()
        Use the all member query string to retrieve more results in the dataSet.
        Since:
        JCMS-6475
      • retrieveResultFromWorkspaceQuery

        protected void retrieveResultFromWorkspaceQuery()
        Use the workspace query string to retrieve more results in the dataSet.
      • add

        protected void add()
        Add all data to the caddy.
      • remove

        protected void remove()
        Remove all data from the caddy.
      • replace

        protected void replace()
        Replace all data from the caddy.
      • clear

        protected void clear()
        Clear the caddy.
      • addCategorysChildren

        protected void addCategorysChildren()
        For all categories in the dataSet, add their descendant.
      • getDataClass

        public java.lang.Class<? extends Data> getDataClass()
      • getDataType

        public java.lang.String getDataType()
      • setCadAction

        public void setCadAction​(java.lang.String str)
        Define the type of action to do.
        Parameters:
        str - the action to perform, as a string
      • setCadDataType

        public void setCadDataType​(java.lang.String str)
        Define the type of data we want to display.
        Parameters:
        str - the data type to display, "Category", "Workspace", etc...
      • setCadId

        public void setCadId​(java.lang.String id)
        Set id of Data to add or remove to caddy.
        Parameters:
        id - an id of Data to add/remove from the caddy
      • setCadIds

        public void setCadIds​(java.lang.String[] ids)
        Set ids of Data to add or remove to caddy.
        Parameters:
        ids - an array of Data's id to add/remove from the caddy
      • setCadQueryString

        public void setCadQueryString​(java.lang.String queryString)
        Set the query string to query Data to add or remove to caddy.
        Parameters:
        queryString - a querystring as generated from QueryHandler
      • setCadGroupQueryString

        public void setCadGroupQueryString​(java.lang.String groupQueryString)
        Set the group query string to query Data to add or remove to caddy.
        Parameters:
        groupQueryString - a querystring as generated from GroupQueryHandler
        Since:
        jcms-5.7.4
      • setCadMemberQueryString

        public void setCadMemberQueryString​(java.lang.String memberQueryString)
        Set the member query string to query Data to add or remove to caddy.
        Parameters:
        memberQueryString - a querystring as generated from MemberQueryHandler
        Since:
        jcms-5.7.4
      • setCadDbMemberQueryString

        public void setCadDbMemberQueryString​(java.lang.String dbMemberQueryString)
        Set the DBMember query string to query Data to add or remove to caddy.
        Parameters:
        dbMemberQueryString - a querystring as generated from DBMemberQueryHandler
        Since:
        jcms-6.1
      • setCadAllMemberQueryString

        public void setCadAllMemberQueryString​(java.lang.String allMemberQueryString)
        Set the Member & DBMember query string to query Data to add or remove to caddy.
        Parameters:
        allMemberQueryString - a querystring as generated from AllMemberQueryHandler
        Since:
        jcms-9.0.5 - JCMS-6475
      • setCadWorkspaceQueryString

        public void setCadWorkspaceQueryString​(java.lang.String workspaceQueryString)
        Set the workspace query string to query Data to add or remove to caddy.
        Parameters:
        workspaceQueryString - a querystring as generated from WorkspaceQueryHandler
        Since:
        jcms-6.0
      • setCadCheckPstatus

        public void setCadCheckPstatus​(java.lang.String check)
        Set whether to check for pstatus when using query string (default is true)
        Parameters:
        check - true to check pstatus during query, false otherwise.
      • setCadShowAllMedia

        public void setCadShowAllMedia​(java.lang.String showAll)
        Set whether uncategorized media should be included in Publication retrieved by queryString. (default is false)
        Parameters:
        showAll - true to include all media, false to skip uncategorized media.
      • isCaddyUpdated

        public boolean isCaddyUpdated()
        Check if the caddy was updated from the invocation to this handler. Use this method AFTER the invocation to validate method.
        Returns:
        true if caddy was modified, false if was not changed.
      • getCaddyTotalCount

        public int getCaddyTotalCount()
        Returns:
        the total count of items in the caddy (Including publications, categories, workspaces, groups, members and dbmembers)