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
  • Field Details

    • ACTION_ADD_STR

      public static final String ACTION_ADD_STR
      See Also:
    • ACTION_REMOVE_STR

      public static final String ACTION_REMOVE_STR
      See Also:
    • ACTION_REPLACE_STR

      public static final String ACTION_REPLACE_STR
      See Also:
    • ACTION_ADD_CATEGORYS_CHILDREN_STR

      public static final String ACTION_ADD_CATEGORYS_CHILDREN_STR
      See Also:
    • ACTION_CLEAR_STR

      public static final String ACTION_CLEAR_STR
      See Also:
    • ALL_ACTIONS

      public static final String[] ALL_ACTIONS
    • ACTION_NOACTION

      public static final int ACTION_NOACTION
      See Also:
    • ACTION_ADD

      public static final int ACTION_ADD
      See Also:
    • ACTION_REMOVE

      public static final int ACTION_REMOVE
      See Also:
    • ACTION_REPLACE

      public static final int ACTION_REPLACE
      See Also:
    • ACTION_ADD_CATEGORYS_CHILDREN

      public static final int ACTION_ADD_CATEGORYS_CHILDREN
      See Also:
    • ACTION_CLEAR

      public static final int ACTION_CLEAR
      See Also:
    • action

      protected int action
    • dataClass

      protected Class<? extends Data> dataClass
    • dataSet

      protected HashSet<Data> dataSet
    • dbMemberIdSet

      protected HashSet<String> dbMemberIdSet
    • queryString

      protected String queryString
    • groupQueryString

      protected String groupQueryString
    • memberQueryString

      protected String memberQueryString
    • dbMemberQueryString

      protected String dbMemberQueryString
    • workspaceQueryString

      protected String workspaceQueryString
    • allMemberQueryString

      protected String allMemberQueryString
    • checkPstatus

      protected boolean checkPstatus
    • showAllMedia

      protected boolean showAllMedia
    • caddyUpdated

      protected boolean caddyUpdated
  • Constructor Details

    • CaddyPopinHandler

      public CaddyPopinHandler()
  • Method Details

    • validate

      public boolean validate() throws IOException
      Effectively trigger the action of this handler.
      Returns:
      true if a redirect was done, false otherwise
      Throws:
      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 Class<? extends Data> getDataClass()
    • getDataType

      public String getDataType()
    • setCadAction

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

      public void setCadDataType(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(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(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(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(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(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(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(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(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(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(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)