org.hippoecm.hst.content.beans.query
Interface HstCtxWhereClauseComputer

All Known Implementing Classes:
HstCtxWhereClauseComputerImpl

public interface HstCtxWhereClauseComputer

Implementations should return an xpath filter (where clause) that accounts for searching in virtual subtrees. It is AND-ed with the where clause from a normal xpath search. This is only needed for sites/application rendering and searching virtual structures. The actual implementation of a HstCtxWhereClauseComputer is accessible through


Method Summary
 String getCtxWhereClause(List<javax.jcr.Node> scopes, boolean skipInvalidScopes)
          returns the context where clause as from getCtxWhereClause(Node), only now combines a set of scopes.
 String getCtxWhereClause(javax.jcr.Node node)
          This method returns the context where clause (without the '[' ']' brackets ) that is appended to the 'normal' xpath where clause for searching in virtual strutures.
 HstVirtualizer getVirtualizer(List<javax.jcr.Node> scopes, boolean skipInvalidScopes)
          Returns a virtualizer for the scopes.
 HstVirtualizer getVirtualizer(javax.jcr.Node scope)
          Returns a virtualizer for the scope.
 

Method Detail

getCtxWhereClause

String getCtxWhereClause(javax.jcr.Node node)
                         throws HstContextualizeException
This method returns the context where clause (without the '[' ']' brackets ) that is appended to the 'normal' xpath where clause for searching in virtual strutures. The scope to search from, the Node must be translated into a where clause, and also all possible ancestor filters that result in the virtual structure most be accounted for in the where clause computer. When the search is done in a non virtual Node, the #getCtxWhereClause(Node, HstRequestContext) is allowed to simply return null

Parameters:
node - the Node below which (in other words the scope) the search is done
Returns:
the string containing the xpath where clause (without the enclosing '[' and ']') or null when it cannot compute one. If there is no where clause, for example because the node is the jcr root node, just "" should be returned
Throws:
HstContextualizeException

getCtxWhereClause

String getCtxWhereClause(List<javax.jcr.Node> scopes,
                         boolean skipInvalidScopes)
                         throws HstContextualizeException
returns the context where clause as from getCtxWhereClause(Node), only now combines a set of scopes.

Parameters:
scopes -
skipInvalidScopes - true when invalid scopes are skipped
Returns:
the string containing the xpath where clause (without the enclosing '[' and ']') representing all scopes or null when it cannot compute one. If there is no where clause, for example because the node is the jcr root node, just "" should be returned
Throws:
HstContextualizeException

getVirtualizer

HstVirtualizer getVirtualizer(javax.jcr.Node scope)
                              throws HstContextualizeException
Returns a virtualizer for the scope. If the scope is physical, a virtualizer can be returned that just returns the physical node.

Parameters:
scope -
Returns:
A virtualizer for the scope. If null is returned, no virtualization can be done
Throws:
HstContextualizeException

getVirtualizer

HstVirtualizer getVirtualizer(List<javax.jcr.Node> scopes,
                              boolean skipInvalidScopes)
                              throws HstContextualizeException
Returns a virtualizer for the scopes.

Parameters:
scopes - all the scopes that was searched in
skipInvalidScopes - whether to skip invalid scopes. If false, a HstContextualizeException is thrown when an invalid scope is found
Returns:
A virtualizer for the scopes. If null is returned, no virtualization can be done
Throws:
HstContextualizeException


Copyright © 2008-2012 Hippo. All Rights Reserved.