ContentBox Core API 1.5.7

contentbox.model.search
Class DBSearch

WEB-INF.cftags.component
        extended by contentbox.model.search.DBSearch
All Implemented Interfaces:
ISearchAdapter

public class DBSearch
extends WEB-INF.cftags.component

******************************************************************************* ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.gocontentbox.org | www.luismajano.com | www.ortussolutions.com ******************************************************************************* Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ******************************************************************************* Our DB Search Adapter


Constructor Summary
init()
 
Method Summary
 any GETCB()
 any GETCONTENTSERVICE()
 any GETWIREBOX()
 void SETCB(any cb)
 void SETCONTENTSERVICE(any contentService)
 void SETWIREBOX(any wirebox)
private any highlightSearchTerm(any term, any content)
          Utility function to help you highlight search terms in content
 ISearchAdapter refresh()
          If chosen to be implemented, it should refresh search indexes and collections
 any renderSearch(string searchTerm, [numeric max='0'], [numeric offset='0'])
          Render the search results according to the adapter and returns HTML
 any renderSearchWithResults(SearchResults searchResults)
          Render the search results according the passed in search results object
 SearchResults search(string searchTerm, [numeric max='0'], [numeric offset='0'])
          Search content and return an standardized ContentBox Results object
private any stripHTML([any stringTarget])
          utility to strip HTML
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init()

Method Detail

GETCB

public any GETCB()


GETCONTENTSERVICE

public any GETCONTENTSERVICE()


GETWIREBOX

public any GETWIREBOX()


SETCB

public void SETCB(any cb)

Parameters:
cb

SETCONTENTSERVICE

public void SETCONTENTSERVICE(any contentService)

Parameters:
contentService

SETWIREBOX

public void SETWIREBOX(any wirebox)

Parameters:
wirebox

highlightSearchTerm

private any highlightSearchTerm(any term, any content)
Utility function to help you highlight search terms in content

Parameters:
term - The search term
content - The content searched

refresh

public ISearchAdapter refresh()
If chosen to be implemented, it should refresh search indexes and collections

Specified by:
refresh in interface ISearchAdapter

renderSearch

public any renderSearch(string searchTerm, [numeric max='0'], [numeric offset='0'])
Render the search results according to the adapter and returns HTML

Specified by:
renderSearch in interface ISearchAdapter
Parameters:
searchTerm
max
offset

renderSearchWithResults

public any renderSearchWithResults(SearchResults searchResults)
Render the search results according the passed in search results object

Specified by:
renderSearchWithResults in interface ISearchAdapter
Parameters:
searchResults - The search results object

search

public SearchResults search(string searchTerm, [numeric max='0'], [numeric offset='0'])
Search content and return an standardized ContentBox Results object.

Specified by:
search in interface ISearchAdapter
Parameters:
searchTerm - The search term to search on
max - The max results to return if paging
offset - The offset to use in the search results if paging

stripHTML

private any stripHTML([any stringTarget])
utility to strip HTML

Parameters:
stringTarget

ContentBox Core API 1.5.7