Class ArchiveQueryHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants
Direct Known Subclasses:
ArchiveBrowserHandler

@Deprecated(since="11.0 / JCMS-8887", forRemoval=true) public class ArchiveQueryHandler extends AbstractQueryHandler<ArchivedPublication>
Deprecated, for removal: This API element is subject to removal in a future version.
Holder class and form handler of all parameters to be used for a query of archive.

Since:
jcms-6.0
Author:
Olivier Jaquemet
  • Field Details

    • originalType

      protected short originalType
      Deprecated, for removal: This API element is subject to removal in a future version.
    • text

      protected String text
      Deprecated, for removal: This API element is subject to removal in a future version.
    • mode

      protected String mode
      Deprecated, for removal: This API element is subject to removal in a future version.
    • sort

      protected String sort
      Deprecated, for removal: This API element is subject to removal in a future version.
    • reverse

      protected boolean reverse
      Deprecated, for removal: This API element is subject to removal in a future version.
    • pageStart

      protected int pageStart
      Deprecated, for removal: This API element is subject to removal in a future version.
    • pageSize

      protected int pageSize
      Deprecated, for removal: This API element is subject to removal in a future version.
    • pagerAll

      protected boolean pagerAll
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • ArchiveQueryHandler

      public ArchiveQueryHandler()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new empty ArchiveQueryHandler with default option.
      Since:
      jcms-6.0
    • ArchiveQueryHandler

      public ArchiveQueryHandler(String queryString)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new ArchiveQueryHandler by parsing the specified query string.

      See ArchiveQueryHandler(String, HttpServletRequest) for a list of the decoded parameters.

      Parameters:
      queryString - a query String consisting of parameters (key=value) to be set in this handler.
      • Parameters must be separated with ampersand (&).
      • Values must be encoded in UTF-8.
      • Query must not starts with question mark (?) e.g : "text=welcome&ws=j_42"
      Since:
      jcms-6.0
    • ArchiveQueryHandler

      public ArchiveQueryHandler(String queryString, javax.servlet.http.HttpServletRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new ArchiveQueryHandler by parsing the specified query string and using informations available from the specified request (logged member, user language, etc).

      The following parameters (and only those listed here) will be automatically decoded from the specified query string. Other parameters should be set using apropriate setters.

      Parameters:
      queryString - a query String consisting of parameters (key=value) to be set in this handler.
      • Parameters must be separated with ampersand (&).
      • Values must be encoded in UTF-8.
      • Query must not starts with question mark (?) e.g : "text=welcome&gid=j_42"
      request - the HttpServletRequest to use to retrieve loggedMember, userLang, userLocale that will be used by this handler, ignored if null.
      Since:
      jcms-6.0
  • Method Details

    • getLogger

      protected org.apache.log4j.Logger getLogger()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getLogger in class AbstractQueryHandler<ArchivedPublication>
    • parseQueryStringParam

      protected void parseQueryStringParam(String key, String[] values)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractQueryHandler
      Method to be implemented by subclass to decode parameter from queryString.
      Specified by:
      parseQueryStringParam in class AbstractQueryHandler<ArchivedPublication>
      Parameters:
      key - the parameter name, never null nor empty.
      values - the parameter values, NEVER NULL NOR EMPTY. You can safely invoke paramValues[0]
    • printParams

      protected String printParams(AbstractQueryHandler.QueryHandlerPrinter printer)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractQueryHandler
      Method to be implemented by subclass to provide params printing in query or hidden input format.
      Typical implementation :
       protected String printParams(QueryHandlerPrinter printer) {
         printer.printParam("foo", getFoo());
         printer.printParam("bar", getBar());
         return printer.toString();
       }
       
      Specified by:
      printParams in class AbstractQueryHandler<ArchivedPublication>
      Parameters:
      printer - a QueryHandlerPrinter to use
      Returns:
      a string containing all parameters of this handler printed using specified QueryHandlerPrinter.
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • getPageResult

      public PageResult<ArchivedPublication> getPageResult()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a new PageResult of archive for the current settings of this handler.
      Returns:
      a new PageResult
    • getText

      public String getText()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the text being search in this query
      Returns:
      a string or null if no text is being searched
      Since:
      jcms-6.0
    • setText

      public void setText(String text)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the text to search in Archive
      Parameters:
      text - any string to look for in Archive
      Since:
      jcms-6.0
    • setMode

      public void setMode(String mode)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getMode

      public String getMode()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getOriginalType

      public String getOriginalType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the type of archive being search.
      Returns:
      "content" or "form"
    • setOriginalType

      public void setOriginalType(String originalTypeStr)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the type of archive being search.
      Parameters:
      originalTypeStr - "content" or "form"
    • setOriginalTypeShort

      public void setOriginalTypeShort(short originalType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the type of archive being search.
      Parameters:
      originalType - -1 for all archive, otherwise use ArchivedPublication.TYPE_CONTENT or ArchivedPublication.TYPE_FORM
    • setWrkspc

      public void setWrkspc(String wsId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the Workspace that archive must belong to in order to be found.
      Parameters:
      wsId - an id of Workspace or null to disable filter on Archive's Workspace
      Since:
      jcms-6.0
    • getRefinedWorkspace

      public Workspace getRefinedWorkspace()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves the Workspace that archives must belong to in order to be found.
      Returns:
      a Workspace or null if there is no filter on workspace
      Since:
      jcms-6.0
    • setSort

      public void setSort(String sort)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setReverse

      public void setReverse(boolean reverse)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setStart

      public void setStart(int start)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setPageSize

      public void setPageSize(int pageSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setPagerAll

      public void setPagerAll(boolean pagerAll)
      Deprecated, for removal: This API element is subject to removal in a future version.