com.wewebu.ow.server.ecm
Class OwStandardSearchTemplate

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwStandardSearchTemplate
All Implemented Interfaces:
OwFieldProvider, OwSearchTemplate

public class OwStandardSearchTemplate
extends Object
implements OwSearchTemplate

Standard implementation of the search template for FileNet P8 Designer Compatible XML templates.

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


Nested Class Summary
 class OwStandardSearchTemplate.OwFieldDefinitionEnumExchangeWrapper
           
 class OwStandardSearchTemplate.OwOnTheFlySearchFieldDescription
          class description for on the fly created search fields
 class OwStandardSearchTemplate.SearchNodeXMLDeserializer
          Utility class for criteria deserialize.
 class OwStandardSearchTemplate.SearchNodeXMLSerializer
          Serialize a search node in a XML structure.
static class OwStandardSearchTemplate.SqlOperatorSingleton
           SQL operators singleton.
 
Field Summary
static String LITERAL_PLACEHOLDER_LEFT_DELIMITER
          left delimiter of placeholder token
static String LITERAL_PLACEHOLDER_RIGHT_DELIMITER
          right delimiter of placeholder token
protected  List m_ColumnInfoList
          the list of the column info tuple, which describe the result view
protected  Node m_ColumnInfoNode
          DOM Node with the column info
protected  OwFieldDefinitionProvider m_fieldDefinitionProvider
          the field definition provider to resolve the fields
protected  OwFieldProvider m_fieldProvider
          field provider from search
protected  boolean m_isWrittableAttributeBagAvailable
          flag indicating if the search can be stored in an attribute bag
protected  int m_iVersionSelection
          types of versions to search for as defined with OwSearchTemplate.VERSION_SELECT_...
protected  OwObject m_object
           
protected  Collection m_resourceNames
          List of resource IDs the fields should be resolved from, or null to use the default resource
protected  OwSearchNode m_Search
          the Search created out of the template
protected static OwStandardSearchTemplate.SqlOperatorSingleton m_SqlOperators
          SQL operators singleton
protected  String m_strHtmlLayout
          optional HTML layout
protected  String m_strJspLayoutPage
          optional JSP layout page
protected  String m_strName
          template name
 
Fields inherited from interface com.wewebu.ow.server.field.OwSearchTemplate
VERSION_SELECT_ALL, VERSION_SELECT_CHECKED_OUT, VERSION_SELECT_CURRENT, VERSION_SELECT_DEFAULT, VERSION_SELECT_IN_PROCESS, VERSION_SELECT_MAJORS, VERSION_SELECT_MINORS, VERSION_SELECT_RELEASED
 
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
 
Constructor Summary
OwStandardSearchTemplate(OwNetworkContext context_p, Node xmlSearchTemplateNode_p, String strName_p, String strResourceName_p)
          Creates a new search template with the given DOM node
OwStandardSearchTemplate(OwNetworkContext context_p, Node xmlSearchTemplateNode_p, String strName_p, String strResourceName_p, boolean useSearchPaths_p)
          Deprecated. 
OwStandardSearchTemplate(OwNetworkContext context_p, OwObject obj_p)
          Creates a new search template with the given object NOTE: The syntax of the XML Template is compatible with FileNet P8 Search designer.
OwStandardSearchTemplate(OwNetworkContext context_p, OwObject obj_p, boolean useSearchPaths_p)
          Deprecated. since 4.0.0.0 use OwStandardSearchTemplate(OwNetworkContext, OwObject) constructor
 
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
protected  int convertOperator(String strOperator_p)
          Operator conversion utility
protected  OwSearchNode createSearchNode(int iOp_p, int iNodeType_p)
          (overridable) factory method
protected  OwSearchNode createSearchNode(OwFieldDefinition fieldDefinition_p, int iOp_p, Object oInitialAndDefaultValue_p, int iAttributes_p, String strUniqueName_p, String strInstruction_p, Collection wildcarddefinitions_p)
          (overridable) factory method
protected  OwSearchNode createSearchNode(OwFieldDefinition fieldDefinition_p, int iOp_p, Object oInitialAndDefaultValue_p, int iAttributes_p, String strUniqueName_p, String strInstruction_p, Collection wildcarddefinitions_p, Object minValue_p, Object maxValue_p, Object defaultValue_p, String sJavaClassName_p)
          (overridable) factory method
protected  OwSearchNode createSearchNode(OwField field_p, int iOp_p, int iAttributes_p, String strUniqueName_p, String strInstruction_p, Collection wildcarddefinitions_p)
          (overridable) factory method
protected  OwSearchNode createSubclassNode(OwFieldDefinition fieldDefinition_p, int iOp_p, Object oInitialAndDefaultValue_p, int iAttributes_p, String strUniqueName_p, String strInstruction_p, Collection wildcarddefinitions_p, Object minValue_p, Object maxValue_p, Object defaultValue_p, String sJavaClassName_p)
          (overridable)
 void deleteSavedSearch(String name_p)
          delete the saved search
protected static Node getAttributeByName(Node node_p, String attributeName_p)
          Returns the attribute from given node, the method handles the requested attributes as "required" and throws exception.
 Collection getColumnInfoList()
          get the cached list of the column info tuple, which describe the result view
protected  OwNetworkContext getContext()
          get a reference to the network context
 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
 OwField getField(String strFieldClassName_p)
          implementation of the OwFieldProvider interface get a field with the given field definition class name
protected  OwFieldDefinition getFieldDefinitionProviderField(String strFieldDefinitionName_p, String strResourceName_p)
          (overridable) method for field definition provider based definition creation
 String getFieldProviderName()
          get a name that identifies the field provider, can be used to create IDs
 Object getFieldProviderSource()
          get the source object that originally provided the fields.
 int getFieldProviderType()
          get the type of field provider as defined with TYPE_...
 Collection getFields()
          get all the properties in the form
 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
protected  Map getOnTheFlyClassDescriptions()
          get the already created on the fly classes
 OwPriorityRule getPriorityRule()
          get a priority rule for priority
protected  OwFieldDefinition getPropertyClassInternal(String strClassName_p, OwXMLUtil node_p)
          resolve the requested search field definition or create a on the fly class description
 Object getSafeFieldValue(String sName_p, Object defaultvalue_p)
          retrieve the value of a Field
 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 cached search tree created out of the template
protected  int getSearchAttributeFromNode(Node node_p, int iDefaultEditAttribute_p)
          compute the criteria attributes from a p8 XML node
 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
static boolean isDocId(String text_p)
          check if given text is a doc ID
 boolean isInitalized()
          check if search template is already initialized
protected  boolean isOperator(String strOperator_p)
           
protected  Object resolveLiteralPlaceholder(String contextname_p, String placeholdername_p)
          (overridable) resolve the given literal placeholder name to a property / criteria value
protected  Object resolveLiteralValue(String contextname_p, OwFieldDefinition propClass_p, Node literal_p)
          resolve the given literal node to a property / criteria value
 void saveSearch(String name_p)
          save the current search
protected  void scanCustomInfo(Node searchTemplateNode_p)
          (overridable) scan search template for additional custom info
protected  void scanResourceNodeEx(OwSearchNode search_p, Node foldersNode_p, Node objectstoresNode_p)
          Scan the folders and ObjectStore node and add resource criteria search nodes to the given search node as defined by AWD 3.0.0.0 search concepts specification.
 void setField(String sName_p, Object value_p)
          modify a Field value, but does not save the value right away
 void setSavedSearch(String name_p)
          init the search template with a saved search
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LITERAL_PLACEHOLDER_LEFT_DELIMITER

public static final String LITERAL_PLACEHOLDER_LEFT_DELIMITER
left delimiter of placeholder token

See Also:
Constant Field Values

LITERAL_PLACEHOLDER_RIGHT_DELIMITER

public static final String LITERAL_PLACEHOLDER_RIGHT_DELIMITER
right delimiter of placeholder token

See Also:
Constant Field Values

m_SqlOperators

protected static final OwStandardSearchTemplate.SqlOperatorSingleton m_SqlOperators
SQL operators singleton


m_ColumnInfoList

protected List m_ColumnInfoList
the list of the column info tuple, which describe the result view


m_ColumnInfoNode

protected Node m_ColumnInfoNode
DOM Node with the column info


m_fieldDefinitionProvider

protected OwFieldDefinitionProvider m_fieldDefinitionProvider
the field definition provider to resolve the fields


m_fieldProvider

protected OwFieldProvider m_fieldProvider
field provider from search


m_isWrittableAttributeBagAvailable

protected boolean m_isWrittableAttributeBagAvailable
flag indicating if the search can be stored in an attribute bag


m_iVersionSelection

protected int m_iVersionSelection
types of versions to search for as defined with OwSearchTemplate.VERSION_SELECT_...


m_object

protected OwObject m_object

m_resourceNames

protected Collection m_resourceNames
List of resource IDs the fields should be resolved from, or null to use the default resource


m_Search

protected OwSearchNode m_Search
the Search created out of the template


m_strHtmlLayout

protected String m_strHtmlLayout
optional HTML layout


m_strJspLayoutPage

protected String m_strJspLayoutPage
optional JSP layout page


m_strName

protected String m_strName
template name

Constructor Detail

OwStandardSearchTemplate

public OwStandardSearchTemplate(OwNetworkContext context_p,
                                Node xmlSearchTemplateNode_p,
                                String strName_p,
                                String strResourceName_p)
                         throws Exception
Creates a new search template with the given DOM node

Parameters:
context_p -
xmlSearchTemplateNode_p - XML Search Template DOM Node to be wrapped
strName_p - Name of the search
strResourceName_p - name of the resource where the search template origins
Throws:
Exception

OwStandardSearchTemplate

@Deprecated
public OwStandardSearchTemplate(OwNetworkContext context_p,
                                           Node xmlSearchTemplateNode_p,
                                           String strName_p,
                                           String strResourceName_p,
                                           boolean useSearchPaths_p)
                         throws Exception
Deprecated. 

Throws:
Exception

OwStandardSearchTemplate

public OwStandardSearchTemplate(OwNetworkContext context_p,
                                OwObject obj_p)
                         throws Exception
Creates a new search template with the given object NOTE: The syntax of the XML Template is compatible with FileNet P8 Search designer. I.e. this function can read FileNet P8 SearchDesigner created templates.

Parameters:
context_p -
obj_p -
Throws:
Exception

OwStandardSearchTemplate

public OwStandardSearchTemplate(OwNetworkContext context_p,
                                OwObject obj_p,
                                boolean useSearchPaths_p)
                         throws Exception
Deprecated. since 4.0.0.0 use OwStandardSearchTemplate(OwNetworkContext, OwObject) constructor

Parameters:
context_p -
obj_p -
useSearchPaths_p - if true the OwSearchPathField criteria will be used for search paths
if false the OwStandardResourceSelectPath criteria will be used for search paths
Throws:
Exception
Method Detail

getAttributeByName

protected static Node getAttributeByName(Node node_p,
                                         String attributeName_p)
                                  throws OwException
Returns the attribute from given node, the method handles the requested attributes as "required" and throws exception.

Parameters:
node_p - org.w3c.dom.Node where to retrieve attribute, (non-null)
attributeName_p - String attribute name to retrieve (non-null)
Returns:
org.w3c.dom.Node representing the attribute
Throws:
OwException - if node_p or attributeName_p is null, or attribute not exist
Since:
2.5.2.0

isDocId

public static boolean isDocId(String text_p)
check if given text is a doc ID

Parameters:
text_p -
Returns:
boolean

canDeleteSearch

public boolean canDeleteSearch()
check if saved searches can be deleted

Specified by:
canDeleteSearch in interface OwSearchTemplate

canSaveSearch

public boolean canSaveSearch()
Description copied from interface: OwSearchTemplate
check if searches can be saved

Specified by:
canSaveSearch in interface OwSearchTemplate

canUpdateSearch

public boolean canUpdateSearch()
check if saved searches can be updated

Specified by:
canUpdateSearch in interface OwSearchTemplate

convertOperator

protected int convertOperator(String strOperator_p)
                       throws OwConfigurationException
Operator conversion utility

Parameters:
strOperator_p - the search template defined operator (egg. "in", "eq").
Returns:
the int code for the give operator
Throws:
OwConfigurationException - if the operator can not be converted

createSearchNode

protected OwSearchNode createSearchNode(int iOp_p,
                                        int iNodeType_p)
(overridable) factory method

Parameters:
iOp_p - combination operator which should be applied to the child OwSearchNode elements as defined in OwSearchNode
iNodeType_p - the type of the branch can be one of the NODE_TYPE_... definition

createSearchNode

protected OwSearchNode createSearchNode(OwField field_p,
                                        int iOp_p,
                                        int iAttributes_p,
                                        String strUniqueName_p,
                                        String strInstruction_p,
                                        Collection wildcarddefinitions_p)
                                 throws Exception
(overridable) factory method

Parameters:
field_p - OwField criteria as field
iOp_p - criteria operator which should be applied to the value as defined in OwSearchCriteria
iAttributes_p - int attributes as defined with ATTRIBUTE_...
strUniqueName_p - String a unique name that identifies this criteria
strInstruction_p - String instruction to be displayed, can be null
wildcarddefinitions_p - Collection of OwWildCardDefinition, or null if no wildcards are allowed
Throws:
Exception

createSearchNode

protected OwSearchNode createSearchNode(OwFieldDefinition fieldDefinition_p,
                                        int iOp_p,
                                        Object oInitialAndDefaultValue_p,
                                        int iAttributes_p,
                                        String strUniqueName_p,
                                        String strInstruction_p,
                                        Collection wildcarddefinitions_p)
(overridable) factory method

Parameters:
fieldDefinition_p - OwFieldDefinition of criteria
iOp_p - criteria operator which should be applied to the value as defined in OwSearchCriteria
oInitialAndDefaultValue_p - initial and default value, for range operators it is a two field array, first field for first range criteria, second field for second range criteria
iAttributes_p - int attributes as defined with ATTRIBUTE_...
strUniqueName_p - String a unique name that identifies this criteria
strInstruction_p - String instruction to be displayed, can be null
wildcarddefinitions_p - Collection of OwWildCardDefinition, or null if no wildcards are allowed

createSearchNode

protected OwSearchNode createSearchNode(OwFieldDefinition fieldDefinition_p,
                                        int iOp_p,
                                        Object oInitialAndDefaultValue_p,
                                        int iAttributes_p,
                                        String strUniqueName_p,
                                        String strInstruction_p,
                                        Collection wildcarddefinitions_p,
                                        Object minValue_p,
                                        Object maxValue_p,
                                        Object defaultValue_p,
                                        String sJavaClassName_p)
                                 throws Exception
(overridable) factory method

Parameters:
fieldDefinition_p - OwFieldDefinition
iOp_p - criteria operator which should be applied to the value as defined in OwSearchCriteria
oInitialAndDefaultValue_p - initial and default value, for range operators it is a two field array, first field for first range criteria, second field for second range criteria
iAttributes_p - int attributes as defined with ATTRIBUTE_...
strUniqueName_p - String a unique name that identifies this criteria
strInstruction_p - String instruction to be displayed, can be null
wildcarddefinitions_p - Collection of OwWildCardDefinition, or null if no wildcards are allowed
minValue_p - Object value to override the inherited FieldDefinition with custom values
maxValue_p - Object value to override the inherited FieldDefinition with custom values
defaultValue_p - Object value to override the inherited FieldDefinition with custom values
sJavaClassName_p - String value to override the inherited FieldDefinition with custom values
Throws:
Exception

deleteSavedSearch

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

Specified by:
deleteSavedSearch in interface OwSearchTemplate
Parameters:
name_p -
Throws:
Exception

getColumnInfoList

public Collection getColumnInfoList()
                             throws OwObjectNotFoundException,
                                    OwConfigurationException
get the cached list of the column info tuple, which describe the result view

Specified by:
getColumnInfoList in interface OwSearchTemplate
Returns:
Collection of OwFieldColumnInfo items
Throws:
OwObjectNotFoundException
OwConfigurationException

getContext

protected OwNetworkContext getContext()
get a reference to the network context

Returns:
an OwNetworkContext

getDefaultMaxSize

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

Specified by:
getDefaultMaxSize in interface OwSearchTemplate
Returns:
int

getDisplayName

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

Specified by:
getDisplayName in interface OwSearchTemplate
Parameters:
locale_p - Locale to use
Returns:
displayname of the template

getField

public OwField getField(String strFieldClassName_p)
                 throws Exception,
                        OwObjectNotFoundException
implementation of the OwFieldProvider interface get a field with the given field definition class name

Specified by:
getField in interface OwFieldProvider
Parameters:
strFieldClassName_p - String class name of requested fields
Returns:
OwField or throws OwObjectNotFoundException
Throws:
Exception
OwObjectNotFoundException

getFieldDefinitionProviderField

protected OwFieldDefinition getFieldDefinitionProviderField(String strFieldDefinitionName_p,
                                                            String strResourceName_p)
                                                     throws OwObjectNotFoundException,
                                                            Exception
(overridable) method for field definition provider based definition creation

Parameters:
strFieldDefinitionName_p - field definition name like in OwFieldDefinitionProvider.getFieldDefinition(String, String)
strResourceName_p - resource name like in OwFieldDefinitionProvider.getFieldDefinition(String, String)
Returns:
the field definition provider based result
Throws:
OwObjectNotFoundException
Exception

getFieldProviderName

public String getFieldProviderName()
get a name that identifies the field provider, can be used to create IDs

Specified by:
getFieldProviderName in interface OwFieldProvider
Returns:
String unique ID / Name of fieldprovider

getFieldProviderSource

public Object getFieldProviderSource()
get the source object that originally provided the fields. e.g. the fieldprovider might be a template pattern implementation like a view, where the original provider would still be an OwObject

Specified by:
getFieldProviderSource in interface OwFieldProvider
Returns:
Object the original source object where the fields have been taken, can be a this pointer

getFieldProviderType

public int getFieldProviderType()
get the type of field provider as defined with TYPE_...

Specified by:
getFieldProviderType in interface OwFieldProvider

getFields

public Collection getFields()
                     throws Exception
get all the properties in the form

Specified by:
getFields in interface OwFieldProvider
Returns:
Collection of OwField
Throws:
Exception

getHtmlLayout

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

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

getIcon

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

Specified by:
getIcon in interface OwSearchTemplate
Returns:
String icon path relative to //, or null if no icon is defined

getJspLayoutPage

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

Specified by:
getJspLayoutPage in interface OwSearchTemplate
Returns:
String containing a JSP page name, or null if it is not available

getName

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

Specified by:
getName in interface OwSearchTemplate
Returns:
name of the template

getOnTheFlyClassDescriptions

protected Map getOnTheFlyClassDescriptions()
get the already created on the fly classes

Returns:
Map containing OwFieldDefinition's

getPriorityRule

public OwPriorityRule getPriorityRule()
get a priority rule for priority

Specified by:
getPriorityRule in interface OwSearchTemplate
Returns:
OwPriorityRule or null if undefined

getPropertyClassInternal

protected OwFieldDefinition getPropertyClassInternal(String strClassName_p,
                                                     OwXMLUtil node_p)
                                              throws Exception
resolve the requested search field definition or create a on the fly class description

Parameters:
strClassName_p - String requested class name of field definition
node_p - OwXMLUtil Node with class attributes for on the fly creation
Returns:
OwFieldDefinition
Throws:
Exception

getSafeFieldValue

public Object getSafeFieldValue(String sName_p,
                                Object defaultvalue_p)
retrieve the value of a Field

Specified by:
getSafeFieldValue in interface OwFieldProvider
Parameters:
sName_p -
defaultvalue_p -
Returns:
Object the value of the Field of defaultvalue_p

getSavedSearch

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

Specified by:
getSavedSearch in interface OwSearchTemplate
Throws:
Exception

getSavedSearches

public Collection getSavedSearches()
                            throws Exception
Description copied from interface: OwSearchTemplate
get a collection of saved searches names

Specified by:
getSavedSearches in interface OwSearchTemplate
Returns:
Collection of String names, or null if nothing is available
Throws:
Exception

getSearch

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

Specified by:
getSearch in interface OwSearchTemplate
Parameters:
fRefresh_p - true = reload search from template, false = get cached search
Returns:
OwSearchNode the search tree created out of the template
Throws:
Exception

getSearchAttributeFromNode

protected int getSearchAttributeFromNode(Node node_p,
                                         int iDefaultEditAttribute_p)
                                  throws OwConfigurationException
compute the criteria attributes from a p8 XML node

Parameters:
node_p -
iDefaultEditAttribute_p - int default value for the edit attribute
Returns:
an int
Throws:
OwConfigurationException

getSort

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

Specified by:
getSort in interface OwSearchTemplate
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 iMinSortCriteria_p but not less

getVersionSelection

public int getVersionSelection()
get the version selection type

Specified by:
getVersionSelection in interface OwSearchTemplate
Returns:
int types of versions to search for as defined with VERSION_SELECT_...

hasHtmlLayout

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

Specified by:
hasHtmlLayout in interface OwSearchTemplate
Returns:
true if a HTML layout is available via getHtmlLayout

hasJspLayoutPage

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

Specified by:
hasJspLayoutPage in interface OwSearchTemplate
Returns:
true if a JSP layout page is available via getJspLayoutPage

init

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

Specified by:
init in interface OwSearchTemplate
Parameters:
fieldDefinitionProvider_p - OwFieldDefinitionProvider to resolve fields
Throws:
Exception

isInitalized

public boolean isInitalized()
check if search template is already initialized

Specified by:
isInitalized in interface OwSearchTemplate
Returns:
boolean true = template is initialized already, false = init was not called yet.

isOperator

protected boolean isOperator(String strOperator_p)
                      throws OwConfigurationException
Parameters:
strOperator_p -
Returns:
true if the given String is an operator that can be converted using convertOperator(String), false otherwise
Throws:
OwConfigurationException

resolveLiteralPlaceholder

protected Object resolveLiteralPlaceholder(String contextname_p,
                                           String placeholdername_p)
                                    throws Exception
(overridable) resolve the given literal placeholder name to a property / criteria value

Parameters:
contextname_p - String name of calling context, e.g. searchtemplate name
placeholdername_p - String name of placeholder to retrieve value for
Returns:
an Object
Throws:
Exception

resolveLiteralValue

protected Object resolveLiteralValue(String contextname_p,
                                     OwFieldDefinition propClass_p,
                                     Node literal_p)
                              throws Exception
resolve the given literal node to a property / criteria value

Parameters:
contextname_p -
propClass_p -
literal_p -
Returns:
an Object
Throws:
Exception

saveSearch

public void saveSearch(String name_p)
                throws Exception
Description copied from interface: OwSearchTemplate
save the current search

Specified by:
saveSearch in interface OwSearchTemplate
Throws:
Exception

createSubclassNode

protected OwSearchNode createSubclassNode(OwFieldDefinition fieldDefinition_p,
                                          int iOp_p,
                                          Object oInitialAndDefaultValue_p,
                                          int iAttributes_p,
                                          String strUniqueName_p,
                                          String strInstruction_p,
                                          Collection wildcarddefinitions_p,
                                          Object minValue_p,
                                          Object maxValue_p,
                                          Object defaultValue_p,
                                          String sJavaClassName_p)
                                   throws Exception
(overridable)

Parameters:
fieldDefinition_p -
iOp_p -
oInitialAndDefaultValue_p -
iAttributes_p -
strUniqueName_p -
strInstruction_p -
wildcarddefinitions_p -
minValue_p -
maxValue_p -
defaultValue_p -
sJavaClassName_p -
Returns:
search node for <subclasses> search template element
Throws:
Exception
Since:
3.2.0.3

scanCustomInfo

protected void scanCustomInfo(Node searchTemplateNode_p)
(overridable) scan search template for additional custom info

Parameters:
searchTemplateNode_p - Node

scanResourceNodeEx

protected void scanResourceNodeEx(OwSearchNode search_p,
                                  Node foldersNode_p,
                                  Node objectstoresNode_p)
                           throws Exception
Scan the folders and ObjectStore node and add resource criteria search nodes to the given search node as defined by AWD 3.0.0.0 search concepts specification. The new nodes are based on OwSearchPathField , OwSearchPath and OwSearchObjectStore object data.

Parameters:
search_p - OwSearchNode to add to
foldersNode_p - folder Node to traverse
objectstoresNode_p - objectstore Node to traverse
Throws:
Exception
Since:
3.0.0.0

setField

public void setField(String sName_p,
                     Object value_p)
              throws Exception,
                     OwObjectNotFoundException
modify a Field value, but does not save the value right away

Specified by:
setField in interface OwFieldProvider
Parameters:
sName_p -
value_p -
Throws:
Exception
OwObjectNotFoundException

setSavedSearch

public void setSavedSearch(String name_p)
                    throws Exception
Description copied from interface: OwSearchTemplate
init the search template with a saved search

Specified by:
setSavedSearch in interface OwSearchTemplate
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.