com.webmethods.caf.jcr.faces.data
Class ChildrenTableContentProvider

java.lang.Object
  extended by com.webmethods.caf.faces.bean.PageFlowScopeAdapter
      extended by com.webmethods.caf.jcr.faces.data.BaseIteratorTableContentProvider
          extended by com.webmethods.caf.jcr.faces.data.ChildrenTableContentProvider
All Implemented Interfaces:
IPageFlowScopeAdapter, IAddressableTableContentProvider, IContentProvider, IFilterableTableContentProvider, IRefreshable, IRefreshableContentProvider, ISelectableTableContentProvider, ISortableTableContentProvider, ITableContentProvider, Serializable

public class ChildrenTableContentProvider
extends BaseIteratorTableContentProvider
implements IFilterableTableContentProvider

CAF table content provider for listing the children of a JCR Node.

Since:
8.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.webmethods.caf.jcr.faces.data.BaseIteratorTableContentProvider
m_index, m_selectableHelper, m_var
 
Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
 
Constructor Summary
ChildrenTableContentProvider()
          Default Constructtor.
ChildrenTableContentProvider(Session jcrSession, String parentNodeId, String parentNodePath)
          Constructor
 
Method Summary
 String getFilter()
          Filter expression.
 String getParentNodeId()
          Gets the parent node id
 String getParentNodePath()
          Gets the parent node path
protected  boolean hasValidInputParameters()
          Checks if the input parameters are valid
protected  RangeIterator invokeSearch()
          Performs the work to lookup the children of the specified parent node If a filter value is supplied, the returned items will match the filter pattern.
 boolean isFilterable()
          True if this provider truely is filterable.
 void setFilter(String filter)
          Filter expression.
 void setParentNodeId(String parentNodeId)
          Sets the parent node id
 void setParentNodePath(String parentNodePath)
          Sets the parent node path
 
Methods inherited from class com.webmethods.caf.jcr.faces.data.BaseIteratorTableContentProvider
getCurrentRow, getJcrSession, getNeedRefresh, getPropertyKeys, getRowCount, getRowId, getRowIndex, getRowSelectedCount, getRowSelectedIds, getRowType, getRowUnselectedIds, getRowVariable, getSelectedRows, getSort, getType, getUniqueId, getUseUnselectedModel, getValue, hasProperty, isAddressable, isAutoRefresh, isRowAvailable, isRowSelected, refresh, setAutoRefresh, setJcrSession, setNeedRefresh, setRowById, setRowIndex, setRowSelected, setRowSelectedIds, setRowUnselectedIds, setRowVariable, setSort, supportsAutoRefresh
 
Methods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.webmethods.caf.faces.data.ITableContentProvider
getCurrentRow, getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex, setRowVariable
 
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
getPropertyKeys, getType, getValue, hasProperty, toString
 

Constructor Detail

ChildrenTableContentProvider

public ChildrenTableContentProvider()
Default Constructtor. Must call BaseIteratorTableContentProvider.setJcrSession(Session) and ChildrenTableContentProvider.setParentNodeId(String) or ChildrenTableContentProvider.setParentNodePath(String) before using this provider


ChildrenTableContentProvider

public ChildrenTableContentProvider(Session jcrSession,
                                    String parentNodeId,
                                    String parentNodePath)
Constructor

Parameters:
jcrSession - the active JCR session
parentNodeId - the node id of the parent (should be null if parentNodePath is supplied)
parentNodePath - the node path of the parent (should be null if parentNodeId is supplied)
Method Detail

getParentNodePath

public String getParentNodePath()
Gets the parent node path

Returns:
the parentNodePath

setParentNodePath

public void setParentNodePath(String parentNodePath)
Sets the parent node path

Parameters:
parentNodePath - the parentNodePath to set

getParentNodeId

public String getParentNodeId()
Gets the parent node id

Returns:
the parentNodeId

setParentNodeId

public void setParentNodeId(String parentNodeId)
Sets the parent node id

Parameters:
parentNodeId - the parentNodeId to set

hasValidInputParameters

protected boolean hasValidInputParameters()
Checks if the input parameters are valid

Specified by:
hasValidInputParameters in class BaseIteratorTableContentProvider

invokeSearch

protected RangeIterator invokeSearch()
Performs the work to lookup the children of the specified parent node If a filter value is supplied, the returned items will match the filter pattern.

Specified by:
invokeSearch in class BaseIteratorTableContentProvider
Returns:
node iterator

getFilter

public String getFilter()
Description copied from interface: IFilterableTableContentProvider
Filter expression. Only rows matched by this filter should be exposed. Null or empty ("") signals expose the default set of rows.

Specified by:
getFilter in interface IFilterableTableContentProvider

isFilterable

public boolean isFilterable()
Description copied from interface: IFilterableTableContentProvider
True if this provider truely is filterable.

Specified by:
isFilterable in interface IFilterableTableContentProvider

setFilter

public void setFilter(String filter)
Description copied from interface: IFilterableTableContentProvider
Filter expression. Only rows matched by this filter should be exposed. Null or empty ("") signals expose the default set of rows.

Specified by:
setFilter in interface IFilterableTableContentProvider