com.wewebu.ow.server.field
Interface OwSearchTemplate

All Superinterfaces:
OwFieldProvider
All Known Implementing Classes:
OwStandardSearchTemplate

public interface OwSearchTemplate
extends OwFieldProvider

Object Wrapper for XML Search Templates.
Parses Search Objects to create search forms and holds formating information for the search results.

To be implemented by the DMS Adaptor.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Field Summary
static int VERSION_SELECT_ALL
          type of versions to search for all versions
static int VERSION_SELECT_CHECKED_OUT
          type of versions to search for the checked out version
static int VERSION_SELECT_CURRENT
          type of versions to search for the current or latest version
static int VERSION_SELECT_DEFAULT
          type of versions to search for
static int VERSION_SELECT_IN_PROCESS
          type of versions to search for the in process versions
static int VERSION_SELECT_MAJORS
          type of versions to search for all major versions
static int VERSION_SELECT_MINORS
          type of versions to search for all minor versions
static int VERSION_SELECT_RELEASED
          type of versions to search for the released version
 
Fields inherited from interface com.wewebu.ow.server.field.OwFieldProvider
TYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL
 
Method Summary
 boolean canDeleteSearch()
          check if saved searches can be deleted
 boolean canSaveSearch()
          check if searches can be saved
 boolean canUpdateSearch()
          check if saved searches can be updated
 void deleteSavedSearch(String name_p)
          delete the saved search
 Collection getColumnInfoList()
          get the list of the column info tuple, which describe the result view
 int getDefaultMaxSize()
          get the default value for the maximum size of results or 0 if not defined
 String getDisplayName(Locale locale_p)
          get the template name, MUST be available before calling init
 String getHtmlLayout()
          get the optional HTML layout associated with this template
 String getIcon()
          get a optional icon to be displayed with the search template, MUST be available before calling init
 String getJspLayoutPage()
          get the optional JSP layout page associated with this template
 String getName()
          get the template name, MUST be available before calling init
 OwPriorityRule getPriorityRule()
          get a priority rule for priority
 String getSavedSearch()
          get the name of the current set search, or null if no saved search is set
 Collection getSavedSearches()
          get a collection of saved searches names
 OwSearchNode getSearch(boolean fRefresh_p)
          get the search tree created out of the template
 OwSort getSort(int iMinSortCriteria_p)
          get the sort to use for the result list
 int getVersionSelection()
          get the version selection type
 boolean hasHtmlLayout()
          check if the optional HTML layout is available
 boolean hasJspLayoutPage()
          check if the optional JSP layout page is available
 void init(OwFieldDefinitionProvider fieldDefinitionProvider_p)
          init the search template so that the specified fields can be resolved
 boolean isInitalized()
          check if search template is already initialized
 void saveSearch(String name_p)
          save the current search
 void setSavedSearch(String name_p)
          init the search template with a saved search
 
Methods inherited from interface com.wewebu.ow.server.field.OwFieldProvider
getField, getFieldProviderName, getFieldProviderSource, getFieldProviderType, getFields, getSafeFieldValue, setField
 

Field Detail

VERSION_SELECT_DEFAULT

static final int VERSION_SELECT_DEFAULT
type of versions to search for

See Also:
Constant Field Values

VERSION_SELECT_RELEASED

static final int VERSION_SELECT_RELEASED
type of versions to search for the released version

See Also:
Constant Field Values

VERSION_SELECT_ALL

static final int VERSION_SELECT_ALL
type of versions to search for all versions

See Also:
Constant Field Values

VERSION_SELECT_CURRENT

static final int VERSION_SELECT_CURRENT
type of versions to search for the current or latest version

See Also:
Constant Field Values

VERSION_SELECT_MAJORS

static final int VERSION_SELECT_MAJORS
type of versions to search for all major versions

See Also:
Constant Field Values

VERSION_SELECT_MINORS

static final int VERSION_SELECT_MINORS
type of versions to search for all minor versions

See Also:
Constant Field Values

VERSION_SELECT_IN_PROCESS

static final int VERSION_SELECT_IN_PROCESS
type of versions to search for the in process versions

See Also:
Constant Field Values

VERSION_SELECT_CHECKED_OUT

static final int VERSION_SELECT_CHECKED_OUT
type of versions to search for the checked out version

See Also:
Constant Field Values
Method Detail

init

void init(OwFieldDefinitionProvider fieldDefinitionProvider_p)
          throws Exception
init the search template so that the specified fields can be resolved

Parameters:
fieldDefinitionProvider_p - OwFieldDefinitionProvider to resolve fields
Throws:
Exception

getColumnInfoList

Collection getColumnInfoList()
                             throws Exception
get the list of the column info tuple, which describe the result view

Returns:
Collection of OwFieldColumnInfo items
Throws:
Exception

getSearch

OwSearchNode getSearch(boolean fRefresh_p)
                       throws Exception
get the search tree created out of the template

Parameters:
fRefresh_p - true = reload search from template, false = get cached search
Returns:
OwSearchNode the search tree created out of the template
Throws:
Exception

getHtmlLayout

String getHtmlLayout()
get the optional HTML layout associated with this template

Returns:
String containing a HTML fragment with place holders for the search parameters of the form {##}, or null if not available

hasHtmlLayout

boolean hasHtmlLayout()
check if the optional HTML layout is available

Returns:
true if a HTML layout is available via getHtmlLayout

getJspLayoutPage

String getJspLayoutPage()
get the optional JSP layout page associated with this template

Returns:
String containing a JSP page name, or null if it is not available

hasJspLayoutPage

boolean hasJspLayoutPage()
check if the optional JSP layout page is available

Returns:
true if a JSP layout page is available via getJspLayoutPage

getIcon

String getIcon()
get a optional icon to be displayed with the search template, MUST be available before calling init

Returns:
String icon path relative to //, or null if no icon is defined

getName

String getName()
get the template name, MUST be available before calling init

Returns:
name of the template

getDisplayName

String getDisplayName(Locale locale_p)
get the template name, MUST be available before calling init

Parameters:
locale_p - Locale to use
Returns:
displayname of the template

getVersionSelection

int getVersionSelection()
get the version selection type

Returns:
int types of versions to search for as defined with VERSION_SELECT_...

getSort

OwSort getSort(int iMinSortCriteria_p)
get the sort to use for the result list

Parameters:
iMinSortCriteria_p - int min number of sort criteria that the returned sort should support
Returns:
OwSort the number of max sort criteria can be higher than iMaxSortCriteria_p but not less

getPriorityRule

OwPriorityRule getPriorityRule()
get a priority rule for priority

Returns:
OwPriorityRule or null if undefined

isInitalized

boolean isInitalized()
check if search template is already initialized

Returns:
boolean true = template is initialized already, false = init was not called yet.

getDefaultMaxSize

int getDefaultMaxSize()
get the default value for the maximum size of results or 0 if not defined

Returns:
int

canSaveSearch

boolean canSaveSearch()
check if searches can be saved


canDeleteSearch

boolean canDeleteSearch()
check if saved searches can be deleted


canUpdateSearch

boolean canUpdateSearch()
check if saved searches can be updated


deleteSavedSearch

void deleteSavedSearch(String name_p)
                       throws Exception
delete the saved search

Parameters:
name_p -
Throws:
Exception

getSavedSearches

Collection getSavedSearches()
                            throws Exception
get a collection of saved searches names

Returns:
Collection of String names, or null if nothing is available
Throws:
Exception

setSavedSearch

void setSavedSearch(String name_p)
                    throws Exception
init the search template with a saved search

Parameters:
name_p -
Throws:
Exception

getSavedSearch

String getSavedSearch()
                      throws Exception
get the name of the current set search, or null if no saved search is set

Throws:
Exception

saveSearch

void saveSearch(String name_p)
                throws Exception
save the current search

Parameters:
name_p -
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.