| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.repository.servlet.SearchFormHandler
public class SearchFormHandler
This form handler can be used to search repositories with any combination of several search types: Keyword, Text, Hierarchical, Advanced. Each of these types are enabled with a boolean parameter. The handler examines each boolean and if true, appends that search's subquery to the full query string.
General Properties
Set one or more of the following properties to "true" to enable a search type:
doKeywordSearch
 doTextSearch
 doHierarchicalSearch
 doAdvancedSearch
 Multiple repositories and item-types can be simultaneously searched. If multiple item-types are searched, each must exist in all repositories. Search results of the same item from multiple repositories are combined. Set the following properties to define the search source(s):
repositories
 itemTypes
 To control the size of the results, use:
maxRowCount
 To disallow an empty search from being run, use:
allowEmptySearch
 Queries may also be refined and then rerun. When this option is enabled, subsequent searches effectively search the results of the previous query.
allowRefine
 previouslySubmitted
 Keyword Search Properties
 Keyword searching takes a set of property names and a search string(s). Each
 property will be searched for these strings. You may also search *ALL* string
 properties (excluding enumerated and non-queriable properties) of an item by
 simply leaving the property keywordSearchPropertyNames empty.
 
keywordSearchPropertyNames
 keywords
 keywordInput property
 keywordInput
 keywords, this
 property allows logical operators (AND, OR, NOT, &, |, !) and supports
 parenthesis '(' and ')' to group logic. Quote keyword values with single or
 double quotes if they include spaces. Quote types may not be mixed. Logical
 operators are optional; 'OR' will be used by default
 toUpperCaseKeywords
 toLowerCaseKeywords
 Text Search Properties
Text searching takes a list of text property names and an input search string to do text pattern matching. Values entered will be used to build the sub-query for text searching.
textSearchPropertyNames
 searchStringFormat
 textInput
 simulateTextSearchQueries=true), the SQL LIKE
 operator will be used to determine whether the target value is a substring of
 any of the text properties being searched.
 allowWildcards
 minScore
 Hierarchical Search Properties
 Hierarchical searches look in a subset of items, starting from a given item,
 including also that items's child items, and also those children's children,
 i.e. all descendants of the original item. The given item is indicated by the
 repository ID in the ancestorId property.
 
ancestorPropertyName
 ancestorId
 Advanced Search Properties
 Advanced searching takes a list of properties and values or ranges of values
 for those properties and looks for an exact match. Additionally, the Advanced
 Search can be used to provide all possible search values for properties
 specified in AdvancedSearchPropertyNames. For example,
 enumerated types will be defined in the repository with a set number of
 values. Advanced searching can retrieve these values to be displayed in a
 select box.
 
advancedSearchPropertyNames
 advancedSearchPropertyValues
 advancedSearchPropertyRanges
 propertyValuesByType
 advancedSearchPropertyNames whose type is either enumerated,
 RepositoryItem or a collection of RepositoryItems. The key is the name of the
 property and the value is a Collection of the possible values. If the
 property type a collection of RepositoryItems, the value will be a collection
 of RepositoryItem. Alternatively, if the property type is RepositoryItem a
 property of each item is returned as described below.
 displayName
 propertyValuesByType will be values of the property
 "displayName" when the property is a RepositoryItem. Use this
 property to override the default name of "displayName"
 Form Actions
In addition to the standard "cancel" action of all form handlers:
searchclearQueryallowRefine. It will force the previous query to be cleared so
 that the user may begin refining their query anew.Retrieving Results
Once the query has been performed, the results are available both as a single collection and by item-type:
searchResultssearchResultsByItemTypeA set of properties and actions are provided to allow a JHTML developer to create controls which navigate between pages of results. Note that Page Navigation requires that no more than one item type be searched. Use the the following properties to create "Next", "Previous" or "Go to Page #" buttons.
enableCountQuery
 maxResultsPerPage
 maxResultsPerPage that fit the
 search criteria, the next set of results can be displayed when the user hits
 a "Next" button. Default value is -1 which indicates no maximum.currentResultPageNum
 resultSetSize
 resultPageCount
 startIndex
 endIndex
 startCount
 endCount
 Redirection
Properties are available for setting a URL for conditional redirection. If a URL parameter is not set, the redirection will not take place.
successURL
 errorURL
 clearQueryURL
 clearQuery action is called
 If the items being searched have a site membership property, the returned
 items can be filtered to only include specific sites. The default behavior is
 to filter on the current site. Either a list of sites can be specified or a
 siteScope that specifies all, any,
 none, or a shareable id.
 
siteIds
 siteScope
 current or null to filter on current site,
 any to filter items that have at least one site,
 all to not filter by sitenone to filter on
 items that don't have site membership, or any shareable id to filter on the
 sites that share a ShareableType
 isIncludeInactiveSites
 isIncludeDisabledSites
 
| Field Summary | |
|---|---|
| static java.lang.String | ALL_SITES_SCOPEAll Sites Search Scope | 
| static java.lang.String | ANY_SITE_SCOPEAny Site Search Scope | 
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | CURRENT_SITE_SCOPECurrent Site Search Scope | 
| static java.lang.String | EMPTY_SEARCH_INPUT_DISALLOWdroplet exception code: empty search is disallowed | 
| static java.lang.String | EMPTY_SEARCH_VALUES_DISALLOWdroplet exception code: cant combine these properties | 
| static java.lang.String | GENERATE_VALUES_BY_TYPE_FAILEDdroplet exception code: failed to generate possible values for a property | 
| static java.lang.String | INVALID_ITEM_TYPEdroplet exception code: item specified doesn't exist in repository | 
| static java.lang.String | INVALID_KEYWORD_SEARCH_STRINGdroplet exception code: syntax problem in keyword search string | 
| static java.lang.String | INVALID_PROP_COMBINATIONdroplet exception code: cant combine these properties | 
| static java.lang.String | INVALID_SEARCH_PROPERTY_NAMESdroplet exception code: searched property names don't exist in item | 
| protected  int | mEndIndex | 
| protected  boolean | mPreviouslySubmitted | 
| protected  java.util.HashMap | mPreviousQuery | 
| protected  java.util.ArrayList | mSearchResults | 
| protected  java.util.HashMap | mSearchResultsByItemType | 
| protected  int | mStartIndex | 
| static java.lang.String | MULTIPLE_ITEM_TYPES_DISALLOWdroplet exception code: cant search multiple item types with navigation | 
| static java.lang.String | NO_PROPERTY_NAMES_FOR_ITEMdroplet exception code: no property names specified for searched item | 
| static java.lang.String | NONE_SITE_SCOPENone Site Search Scope | 
| static java.lang.String | QUERY_FAILUREdroplet exception code: query failed during execution | 
| static java.lang.String | UNMATCHED_QUOTESlogical operator search string parse failed because quotes didn't match | 
| Fields inherited from class atg.droplet.GenericFormHandler | 
|---|
| PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
| SERVICE_INFO_KEY | 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
|---|
| DEFAULT_LOG_TRACE_STATUS | 
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging | 
|---|
| DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS | 
| Constructor Summary | |
|---|---|
| SearchFormHandler() | |
| Method Summary | |
|---|---|
| protected  boolean | areSearchValuesEmpty() | 
|  void | beforeGet(DynamoHttpServletRequest request,
          DynamoHttpServletResponse response)Called when a form is rendered that references this bean. | 
|  boolean | beforeSet(DynamoHttpServletRequest request,
          DynamoHttpServletResponse response)Called before any setX methods on this form are set when a form that modifies properties of this form handler is submitted. | 
| protected  java.lang.String[] | filterSiteList(java.lang.String[] pSites)Filters the site array used in generateSiteFilter(). | 
| protected  Query | generateAdvancedSearchQuery(Repository pRepository,
                            java.lang.String pItemType,
                            QueryBuilder pQueryBuilder)Return a query which represents an advanced search based on selected property values. | 
| protected  Query | generateHierarchicalSearchQuery(java.lang.String pItemType,
                                QueryBuilder pQueryBuilder)Build a query which represents a hierarchical search, that is, a constraint to look only in a designated item, its child items, and so on, in effect, to all descendants of the designated item. | 
| protected  Query | generateKeywordSearchQuery(Repository pRepository,
                           java.lang.String pItemType,
                           QueryBuilder pQueryBuilder)Return a query which represents a keyword search. | 
| protected  java.util.Collection | generateResultSet(java.lang.String pItemType)For the supplied item type return a collection of ==sub-result set that will combined into the total result set. | 
| protected  Query | generateSearchQuery(Repository pRepository,
                    java.lang.String pItemType,
                    QueryBuilder pQueryBuilder)Return the query that should be executed on the Repository View. | 
| protected  java.util.Collection | generateSearchValues(java.lang.String pItemType,
                     java.lang.String pPropertyName)Used by the advanced searching feature. | 
| protected  atg.repository.ContextFilteringRules | generateSiteFilter()Generates the ContextFilteringRules to filter the query based on the sites. | 
| protected  Query | generateTextSearchQuery(java.lang.String pItemType,
                        QueryBuilder pQueryBuilder,
                        java.lang.String pInput)Return a query which represents a text search query. | 
|  java.lang.String[] | getAdvancedSearchPropertyNames()Returns property AdvancedSearchPropertyNames | 
|  java.util.HashMap | getAdvancedSearchPropertyRanges()Returns property AdvancedSearchPropertyRanges | 
|  java.util.HashMap | getAdvancedSearchPropertyValues()Returns property AdvancedSearchPropertyValues | 
|  boolean | getAllowEmptySearch()Returns property AllowEmptySearch | 
|  boolean | getAllowRefine()Returns property AllowRefine | 
|  boolean | getAllowWildcards()Returns property AllowWildcards | 
|  java.lang.String | getAncestorId()Returns property AncestorId | 
|  java.lang.String | getAncestorPropertyName()Returns property ancestorPropertyName | 
|  java.lang.String | getClearQueryURL()Returns property ClearQueryURL | 
| protected  atg.repository.ContextFilteringRule[] | getContextFilteringRulesForSites(java.lang.String[] pSites)Gets a array of ContextFilteringRules for an array of site ids. | 
|  int | getCurrentResultPageNum()Returns property CurrentResultPageNum | 
|  java.lang.String | getDisplayName()Returns property displayName | 
|  int | getEndCount()Returns the property EndCount. | 
|  int | getEndIndex()Returns the property EndIndex. | 
|  java.lang.String | getErrorURL()Returns property ErrorURL | 
|  java.lang.String[] | getItemTypes()Returns property ItemTypes | 
|  java.lang.String | getKeywordInput()Returns property KeywordInput | 
|  java.lang.String[] | getKeywords()Returns property Keywords | 
|  java.lang.String[] | getKeywordSearchPropertyNames()Returns property KeywordSearchPropertyNames which is the set of property names for text search | 
|  int | getMaxResultsPerPage()Returns property maxResultsPerPage | 
|  int | getMaxRowCount()Returns property maxRowCount | 
| protected  java.lang.String | getMessage(java.lang.String key,
           java.lang.Object[] args) | 
|  java.lang.Integer | getMinScore()Returns property MinScore | 
|  java.util.HashMap | getPropertyValuesByType()Returns property PropertyValuesByType. | 
|  Repository[] | getRepositories()Returns property Repositories | 
|  int | getResultPageCount()Returns the number of results pages which is calculated as the resultSetSize / maxResultsPerPage + 1 if any remainder exists. | 
|  int | getResultSetSize()Returns property ResultSetSize | 
|  java.util.Collection | getSearchResults()Returns property SearchResults | 
|  java.util.HashMap | getSearchResultsByItemType()Returns property SearchResultsByItemType | 
|  java.lang.String | getSearchStringFormat()Returns property SearchStringFormat | 
|  SiteGroupManager | getSiteGroupManager()Gets the SiteGroupManager | 
|  java.lang.String[] | getSiteIds()Gets an array of site IDs to filter the search by. | 
|  SiteManager | getSiteManager()Gets the SiteManager | 
|  java.lang.String | getSiteScope()Gets the Search's Site Scope. | 
|  int | getStartCount()Returns the property startCount. | 
|  int | getStartIndex()Returns the property startIndex. | 
|  java.lang.String | getSuccessURL()Returns property SuccessURL | 
|  java.lang.String | getTextInput()Returns property TextInput | 
|  java.lang.String[] | getTextSearchPropertyNames()Returns property TextSearchPropertyNames which is the set of property names for text search | 
|  boolean | handleClearQuery(DynamoHttpServletRequest pRequest,
                 DynamoHttpServletResponse pResponse)Called if user requests stored query be cleared. | 
|  boolean | handleCurrentResultPageNum(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)Called when user is iterating through pages of results. | 
|  boolean | handleSearch(DynamoHttpServletRequest pRequest,
             DynamoHttpServletResponse pResponse)For each each item type in that repository, call generateSearchResultSet to generate a subResultSet for that item type based on query parameters. | 
| protected  boolean | isAdvancedSearchPropertyRangesEmpty()test if adv search property ranges null or empty | 
| protected  boolean | isAdvancedSearchPropertyValuesEmpty()test if adv search property values are null or empty | 
|  boolean | isDoAdvancedSearch()Returns property DoAdvancedSearch | 
|  boolean | isDoHierarchicalSearch()Returns property DoHierarchicalSearch | 
|  boolean | isDoKeywordSearch()Returns property DoKeywordSearch | 
|  boolean | isDoTextSearch()Returns property DoTextSearch | 
|  boolean | isEnableCountQuery()Returns property enableCountQuery | 
|  boolean | isIncludeDisabledSites()Returns the mIncludeDisabledSites property. | 
|  boolean | isIncludeInactiveSites()Whether or not the site filter should include inactive sites. | 
| protected  boolean | isPrepared()Returns property Prepared | 
|  boolean | isPreviouslySubmitted()Returns property previouslySubmitted. | 
|  boolean | isToLowerCaseKeywords()Returns property ToLowerCaseKeywords | 
|  boolean | isToUpperCaseKeywords()Returns property ToUpperCaseKeywords | 
|  boolean | isUseIncludesForKeywordQueryOnMultiProperties()Returns property useIncludesForKeywordQueryOnMultiProperties | 
| protected  void | prepare(DynamoHttpServletRequest request,
        DynamoHttpServletResponse response)Prepare search properties. | 
|  void | setAdvancedSearchPropertyNames(java.lang.String[] pAdvancedSearchPropertyNames)Sets property AdvancedSearchPropertyNames | 
|  void | setAdvancedSearchPropertyRanges(java.util.HashMap pRanges)Sets property AdvancedSearchPropertyRanges | 
|  void | setAdvancedSearchPropertyValues(java.util.HashMap pValues)Sets property AdvancedSearchPropertyValues | 
|  void | setAllowEmptySearch(boolean pAllowEmptySearch)Sets property AllowEmptySearch. | 
|  void | setAllowRefine(boolean pAllowRefine)Sets property AllowRefine. | 
|  void | setAllowWildcards(boolean pAllowWildcards)Sets property AllowWildcards. | 
|  void | setAncestorId(java.lang.String pAncestorId)Sets property AncestorId. | 
|  void | setAncestorPropertyName(java.lang.String pAncestorPropertyName)Sets property ancestorPropertyName | 
|  void | setClearQueryURL(java.lang.String pURL)Sets property ClearQueryURL. | 
|  void | setCurrentResultPageNum(int pCurrentResultPageNum)Sets the property currentResultPageNum. | 
|  void | setDisplayName(java.lang.String pDisplayName)Sets property displayName | 
|  void | setDoAdvancedSearch(boolean pDoAdvancedSearch)Sets property DoAdvancedSearch | 
|  void | setDoHierarchicalSearch(boolean pDoHierarchicalSearch)Sets property DoHierarchicalSearch | 
|  void | setDoKeywordSearch(boolean pDoKeywordSearch)Sets property DoKeywordSearch | 
|  void | setDoTextSearch(boolean pDoTextSearch)Sets property DoTextSearch | 
|  void | setEnableCountQuery(boolean pEnableCountQuery)Sets the property enableCountQuery. | 
|  void | setEndIndex(int pIndex)Set the endIndex to a particular value. | 
|  void | setErrorURL(java.lang.String pURL)Sets property ErrorURL. | 
|  void | setIncludeDisabledSites(boolean pIncludeDisabledSites)Sets the mIncludeDisabledSites property. | 
|  void | setIncludeInactiveSites(boolean pIncludeInactiveSites)Sets whether or not the site filter should include inactive sites. | 
|  void | setItemTypes(java.lang.String[] pItemTypes)Sets property ItemTypes | 
|  void | setKeywordInput(java.lang.String pKeywordInput)Sets property KeywordInput | 
|  void | setKeywords(java.lang.String[] pKeywords)Sets property Keywords | 
|  void | setKeywordSearchPropertyNames(java.lang.String[] pKeywordSearchPropertyNames)Sets property KeywordSearchPropertyNames | 
|  void | setMaxResultsPerPage(int pMaxResultsPerPage)Sets the property maxResultsPerPage. | 
|  void | setMaxRowCount(int pMaxRowCount)Sets the property maxRowCount. | 
|  void | setMinScore(java.lang.Integer pMinScore)Sets property MinScore. | 
| protected  void | setPrepared(boolean pPrepared)Sets property Prepared. | 
|  void | setPropertyValuesByType()Sets property PropertyValuesByType. | 
|  void | setRepositories(Repository[] pRepositories)Sets property: repositories | 
|  void | setResultSetSize(int pResultSetSize) | 
|  void | setSearchStringFormat(java.lang.String pSearchStringFormat)Sets property SearchStringFormat used by Text search. | 
|  void | setSiteGroupManager(SiteGroupManager pSiteGroupManager)Sets the SiteGroupManager | 
|  void | setSiteIds(java.lang.String[] pSiteIds)Sets the array of site IDs to filter the search by. | 
|  void | setSiteManager(SiteManager pSiteManager) | 
|  void | setSiteScope(java.lang.String pSiteScope)Sets the Search's Site Scope. | 
|  void | setStartIndex(int pIndex)Set the startIndex to a particular value. | 
|  void | setSuccessURL(java.lang.String pURL)Sets property SuccessURL. | 
|  void | setTextInput(java.lang.String pTextInput)Sets property TextInput used for Text searches. | 
|  void | setTextSearchPropertyNames(java.lang.String[] pTextSearchPropertyNames)Sets property TextSearchPropertyNames | 
|  void | setToLowerCaseKeywords(boolean pToLowerCaseKeywords)Sets property ToLowerCaseKeywords | 
|  void | setToUpperCaseKeywords(boolean pToUpperCaseKeywords)Sets property ToUpperCaseKeywords | 
|  void | setUseIncludesForKeywordQueryOnMultiProperties(boolean pUseIncludesForKeywordQueryOnMultiProperties)Whether or not to perform an INCLUDES ANY query v/s a LIKE query for keyword search on multi properties | 
| protected  void | splitPropertyNames(java.lang.String[] pTypes,
                   java.lang.String[] pSource,
                   java.util.HashMap pDest,
                   java.lang.String pSearchType)Split property names into type and name from type.name | 
| protected  java.lang.String[] | transformKeywords(java.lang.String[] pKeywords)With the supplied keywords perform any modifications that are required to allow it to be used within a keyword query. | 
| Methods inherited from class atg.droplet.EmptyFormHandler | 
|---|
| afterGet | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String CLASS_VERSION
protected java.util.HashMap mPreviousQuery
public static final java.lang.String INVALID_SEARCH_PROPERTY_NAMES
public static final java.lang.String GENERATE_VALUES_BY_TYPE_FAILED
public static final java.lang.String NO_PROPERTY_NAMES_FOR_ITEM
public static final java.lang.String INVALID_ITEM_TYPE
public static final java.lang.String QUERY_FAILURE
public static final java.lang.String INVALID_KEYWORD_SEARCH_STRING
public static final java.lang.String MULTIPLE_ITEM_TYPES_DISALLOW
public static final java.lang.String INVALID_PROP_COMBINATION
public static final java.lang.String EMPTY_SEARCH_VALUES_DISALLOW
public static final java.lang.String UNMATCHED_QUOTES
public static final java.lang.String EMPTY_SEARCH_INPUT_DISALLOW
public static final java.lang.String CURRENT_SITE_SCOPE
public static final java.lang.String ALL_SITES_SCOPE
public static final java.lang.String ANY_SITE_SCOPE
public static final java.lang.String NONE_SITE_SCOPE
protected boolean mPreviouslySubmitted
protected java.util.ArrayList mSearchResults
protected java.util.HashMap mSearchResultsByItemType
protected int mStartIndex
protected int mEndIndex
| Constructor Detail | 
|---|
public SearchFormHandler()
| Method Detail | 
|---|
protected void setPrepared(boolean pPrepared)
protected boolean isPrepared()
public boolean isPreviouslySubmitted()
public void setAllowEmptySearch(boolean pAllowEmptySearch)
pAllowEmptySearch - a boolean property that determines if passing
  empty search values is legal.public boolean getAllowEmptySearch()
public void setAllowRefine(boolean pAllowRefine)
pAllowRefine - a boolean property that determines if queries can be
  refined.public boolean getAllowRefine()
public void setDoKeywordSearch(boolean pDoKeywordSearch)
pDoKeywordSearch - the property to store the boolean value of whether
  or not to perform a keyword search.public boolean isDoKeywordSearch()
public void setUseIncludesForKeywordQueryOnMultiProperties(boolean pUseIncludesForKeywordQueryOnMultiProperties)
mUseIncludesForKeywordQueryOnMultiProperties - the property to store the boolean value of whether or not to
          perform an INCLUDES ANY query v/s a LIKE query for keyword
          search on multi string properties.public boolean isUseIncludesForKeywordQueryOnMultiProperties()
public void setDoTextSearch(boolean pDoTextSearch)
pDoTextSearch - the property to store the boolean value of whether or
  not to perform a text search.public boolean isDoTextSearch()
public void setDoHierarchicalSearch(boolean pDoHierarchicalSearch)
pDoHierarchicalSearch - the property to store the boolean value of
  whether or not to perform a hierarchical search.public boolean isDoHierarchicalSearch()
public void setDoAdvancedSearch(boolean pDoAdvancedSearch)
pDoAdvancedSearch - the property to store the boolean value of
  whether or not to perform a advanced search.public boolean isDoAdvancedSearch()
public void setRepositories(Repository[] pRepositories)
String[] - the property to store the repositories to search.public Repository[] getRepositories()
public void setItemTypes(java.lang.String[] pItemTypes)
pItemTypes - the property to store the item types to search.public java.lang.String[] getItemTypes()
public void setKeywordSearchPropertyNames(java.lang.String[] pKeywordSearchPropertyNames)
pKeywordSearchPropertyNames - The property to store the names of all the
  keyword properties. Expects names to be qualified by item-type (i.e.
  "item-type.property-name".public java.lang.String[] getKeywordSearchPropertyNames()
public void setTextSearchPropertyNames(java.lang.String[] pTextSearchPropertyNames)
pTextSearchPropertyNames - the property to store text search property
  names.public java.lang.String[] getTextSearchPropertyNames()
public void setAdvancedSearchPropertyNames(java.lang.String[] pAdvancedSearchPropertyNames)
pAdvancedSearchPropertyNames - the property to store advanced search
  property names.public java.lang.String[] getAdvancedSearchPropertyNames()
public void setAdvancedSearchPropertyRanges(java.util.HashMap pRanges)
Map - of range values (min & max) for Advanced Search property namespublic SiteGroupManager getSiteGroupManager()
public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
pSiteGroupManager - the siteGroupManager to setpublic SiteManager getSiteManager()
public void setSiteManager(SiteManager pSiteManager)
pSiteManager - the siteManager to setpublic java.lang.String[] getSiteIds()
public void setSiteIds(java.lang.String[] pSiteIds)
pSiteIds - the site IDs to setpublic java.lang.String getSiteScope()
public void setSiteScope(java.lang.String pSiteScope)
pSiteScope - the siteScope to setpublic boolean isIncludeInactiveSites()
public void setIncludeInactiveSites(boolean pIncludeInactiveSites)
pIncludeInactiveSites - the includeInactiveSites to setpublic boolean isIncludeDisabledSites()
public void setIncludeDisabledSites(boolean pIncludeDisabledSites)
pIncludeDisabledSites - whether or not to include disabled sites in
          the matching processpublic java.util.HashMap getAdvancedSearchPropertyRanges()
protected boolean isAdvancedSearchPropertyRangesEmpty()
public java.util.HashMap getPropertyValuesByType()
advancedSearchPropertyNames whose type is either enumerated
 or RepositoryItem. The key is the name of the property and the value is a
 Collection of the possible values.
public void setPropertyValuesByType()
public java.util.HashMap getAdvancedSearchPropertyValues()
public void setAdvancedSearchPropertyValues(java.util.HashMap pValues)
pAdvancedSearchPropertyValues - the property to store selected
  property values for advanced searching. The key is the item type and the
  value is another map of property name to search values.protected boolean isAdvancedSearchPropertyValuesEmpty()
public java.lang.String getDisplayName()
public void setDisplayName(java.lang.String pDisplayName)
pDisplayName - the property name to use when an advanced search
  queries a property that is another RepositoryItem.public void setKeywords(java.lang.String[] pKeywords)
pKeywords - the property to store keywords to search for in keyword
  property names.  if not set, the property "keywordInput" will be usedpublic java.lang.String[] getKeywords()
public void setKeywordInput(java.lang.String pKeywordInput)
pKeywordInput - the property to store the input search string. Keyword
  search will use this if keyword property is not set.public java.lang.String getKeywordInput()
public void setAncestorPropertyName(java.lang.String pAncestorPropertyName)
pAncestorPropertyName - the property to store the value of ancestor
  property name.public java.lang.String getAncestorPropertyName()
public void setAncestorId(java.lang.String pAncestorId)
pAncestorId - the property to store the repositoryId of the ancestor
  to search in for Hierarchical searches.public java.lang.String getAncestorId()
public void setTextInput(java.lang.String pTextInput)
pTextInput - the property to store the input search string.public java.lang.String getTextInput()
public void setSearchStringFormat(java.lang.String pSearchStringFormat)
pSearchStringFormat - the property to store any string formatting
  information parameters for searching.public java.lang.String getSearchStringFormat()
public void setAllowWildcards(boolean pAllowWildcards)
pAllowWildcards - a boolean property that determines if Text searching
  should allow the character '*' to be used as a wildcardpublic boolean getAllowWildcards()
public void setMinScore(java.lang.Integer pMinScore)
pMinScore - the property to store the minimum scoring used for text
  searching.public java.lang.Integer getMinScore()
public java.util.Collection getSearchResults()
public java.util.HashMap getSearchResultsByItemType()
public void setMaxRowCount(int pMaxRowCount)
pMaxRowCount - the maximum # of rows to getpublic int getMaxRowCount()
public void setEnableCountQuery(boolean pEnableCountQuery)
pEnableCountQuery - the property to enable the jhtml programmer to
  provide next and prev buttons to iterate over a result set.public boolean isEnableCountQuery()
public void setMaxResultsPerPage(int pMaxResultsPerPage)
pMaxResultsPerPage - the property to store the maximum number of
  results to be displayed per page.public int getMaxResultsPerPage()
public void setCurrentResultPageNum(int pCurrentResultPageNum)
pCurrentResultPageNum - the property to tell which page of the result
  set is currently being viewed.public int getCurrentResultPageNum()
public void setResultSetSize(int pResultSetSize)
pResultSetSize - the property that represents the number of items that
  match the query.public int getResultSetSize()
public int getResultPageCount()
public int getStartIndex()
public void setStartIndex(int pIndex)
public int getEndIndex()
public void setEndIndex(int pIndex)
public int getStartCount()
public int getEndCount()
public void setToUpperCaseKeywords(boolean pToUpperCaseKeywords)
pToUpperCaseKeywords - the property to store the boolean value of
  whether or not to convert input string to upper case.public boolean isToUpperCaseKeywords()
public void setToLowerCaseKeywords(boolean pToLowerCaseKeywords)
pToLowerCaseKeywords - the property to store the boolean value of
  whether or not to convert input string to lower case.public boolean isToLowerCaseKeywords()
public void setSuccessURL(java.lang.String pURL)
pURL - a String property that is the URL to redirect to.public java.lang.String getSuccessURL()
public void setErrorURL(java.lang.String pURL)
pURL - a String property that is the URL to redirect to.public java.lang.String getErrorURL()
public void setClearQueryURL(java.lang.String pURL)
pURL - a String property that is the URL to redirect to.public java.lang.String getClearQueryURL()
public boolean handleSearch(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
pRequest - the servlet's requestpResponse - the servlet's response
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
public boolean handleCurrentResultPageNum(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
pRequest - the servlet's requestpResponse - the servlet's response
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
public boolean handleClearQuery(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
pRequest - the servlet's requestpResponse - the servlet's response
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
public void beforeGet(DynamoHttpServletRequest request,
                      DynamoHttpServletResponse response)
beforeGet in interface DropletFormHandlerbeforeGet in class EmptyFormHandler
public boolean beforeSet(DynamoHttpServletRequest request,
                         DynamoHttpServletResponse response)
                  throws DropletFormException
beforeSet in interface DropletFormHandlerbeforeSet in class GenericFormHandlerDropletFormExceptionprotected boolean areSearchValuesEmpty()
protected Query generateSearchQuery(Repository pRepository,
                                    java.lang.String pItemType,
                                    QueryBuilder pQueryBuilder)
                             throws RepositoryException,
                                    DropletFormException
pRepository - the repository to search inpItemType - the type of item to search for.pQueryBuilder - the builder that should be used to construct the query
RepositoryException - if an error occured while forming the query
DropletFormException
protected Query generateKeywordSearchQuery(Repository pRepository,
                                           java.lang.String pItemType,
                                           QueryBuilder pQueryBuilder)
                                    throws RepositoryException,
                                           DropletFormException
keywords
 property is set, this method builds a sub-query for each attribute named in
 the KeywordSearchPropertyNames property. Each sub-query is OR'd
 together to form the total query. If the attribute named is of a Collection
 or array type, then an "includes any" query is formed. Single-value
 attributes use a CONTAINS comparison query.
 If keywords is empty, keywordInput is used to
 build an RQL statement instead.
pRepository - the Repository to search inpItemType - the type of item to search for. Typically corresponds to
 an item descriptor namepQueryBuilder - the builder that should be used to construct the query
RepositoryException - if an error occured while forming the query
DropletFormException
protected Query generateTextSearchQuery(java.lang.String pItemType,
                                        QueryBuilder pQueryBuilder,
                                        java.lang.String pInput)
                                 throws RepositoryException
textSearchPropertyNames property. Each sub-query is OR'd
 together to form the total query. The search string format is configured
 with the searchStringFormat property.
pItemType - the type of item to search for.pQueryBuilder - the builder that should be used to construct the querypInput - the search string to use for the full text search
RepositoryException - if an error occured while forming the query
protected Query generateAdvancedSearchQuery(Repository pRepository,
                                            java.lang.String pItemType,
                                            QueryBuilder pQueryBuilder)
                                     throws RepositoryException,
                                            DropletFormException
pRepository - the repository to searchpItemType - the type of item to search for.pQueryBuilder - the builder that should be used to construct the query
RepositoryException - if an error occured while forming the query
DropletFormException
protected Query generateHierarchicalSearchQuery(java.lang.String pItemType,
                                                QueryBuilder pQueryBuilder)
                                         throws RepositoryException
Note: this query assumes that the item type being searched for has a property (as indicated by the value of theancestorPropertyName property) whose value is a collection of all its ancestor groups. If the designated item is contained in this collection, then this query returns true.
pItemType - the type of item to search for. Typically corresponds to
 an item descriptor namepQueryBuilder - the builder that should be used to construct the query
RepositoryException - if an error occured while forming the query
protected java.util.Collection generateSearchValues(java.lang.String pItemType,
                                                    java.lang.String pPropertyName)
pItemType - item of the property to search for possible valuespPropertyName - name of the property to get possible values for
protected atg.repository.ContextFilteringRules generateSiteFilter()
protected java.lang.String[] filterSiteList(java.lang.String[] pSites)
pSites - The array of site ids
protected atg.repository.ContextFilteringRule[] getContextFilteringRulesForSites(java.lang.String[] pSites)
pSites - The array of site ids
protected java.util.Collection generateResultSet(java.lang.String pItemType)
pItemType - the type of item to search for.
protected void splitPropertyNames(java.lang.String[] pTypes,
                                  java.lang.String[] pSource,
                                  java.util.HashMap pDest,
                                  java.lang.String pSearchType)
protected java.lang.String[] transformKeywords(java.lang.String[] pKeywords)
toLowerCaseKeywords and toUpperCaseKeywords
 properties to determine if String.toLowerCase or String.toUpperCase should
 be invoked.
pKeywords - the words to transform for querying
protected void prepare(DynamoHttpServletRequest request,
                       DynamoHttpServletResponse response)
protected java.lang.String getMessage(java.lang.String key,
                                      java.lang.Object[] args)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||