public abstract class AbstractStructureBean extends AbstractSortableTableBean<StructureBeanNode> implements CompositeStructureBean, StructureBean
CompositeStructureBean (and
StructureBean) interface.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractStructureBean.ConsistentNodeIterator
An iterator that iterates through nodes in a consistent manner, i.e., if
a certain node rejected by the filter it's children will also be rejected
automatically.
|
protected class |
AbstractStructureBean.StructureBeanNodeIterator
Iterator implementation that iterates through the nodes in the structure.
|
AbstractSortableTableBean.ForcedColumnsParams, AbstractSortableTableBean.SortInfoAbstractEditableTableBean.CellUpdaterTableClient, AbstractEditableTableBean.CommitResultImpl, AbstractEditableTableBean.ConnectResultImpl, AbstractEditableTableBean.DeleteResultImpl, AbstractEditableTableBean.DisconnectResultImpl, AbstractEditableTableBean.ObjectResultImpl, AbstractEditableTableBean.RemoveResultImpl, AbstractEditableTableBean.ReplaceResultImpl, AbstractEditableTableBean.UpdateResultImplAbstractPaginatedTableBean.CurrentPageEvaluationParams, AbstractPaginatedTableBean.TablePageAbstractTableBean.DefaultNavigationHandler, AbstractTableBean.TableClientImpl, AbstractTableBean.TableDataIterator, AbstractTableBean.ViewListenerProxyTableDataProvider.Displayed<T extends TableData>, TableDataProvider.Empty<T extends TableData>, TableDataProvider.Specific<T extends TableData>, TableDataProvider.Visible<T extends TableData>StructureModifiableTableBean.CallBack, StructureModifiableTableBean.CommitResult, StructureModifiableTableBean.CommitResults, StructureModifiableTableBean.ConnectResult, StructureModifiableTableBean.ConnectSpec, StructureModifiableTableBean.DeleteResult, StructureModifiableTableBean.DisconnectResult, StructureModifiableTableBean.ReplaceResult, StructureModifiableTableBean.ReplaceSpec, StructureModifiableTableBean.UpdateResult| Modifier and Type | Field and Description |
|---|---|
static TableDataFilter |
STRUCTURE_INVALID_TABLE_DATA_FILTER
Filter that will accept all nodes whose structure is considered to be
invalid. |
editable, editSupported, structureModificationSupportedDEFAULT_VISIBLE_TABLE_DATA_FILTER, EVALUATION_REQUIRED_TABLE_DATA_FILTER, SELECTED_TABLE_DATA_FILTEREMPTYMODE_ASCENDING, MODE_DESCENDING, MODE_NOT_SORTED| Constructor and Description |
|---|
AbstractStructureBean()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(StructureBeanNodeVisitor visitor)
Visit all nodes on this StructureBean.
|
StructureBeanNode |
addNode(StructureBeanNode parentNode,
java.lang.String relationshipId,
java.lang.String objectId,
boolean from,
int index)
Adds a new node as a child to the given node.
|
void |
addRoot(java.lang.String rootObjectId)
Add a new root object to the structure.
|
StructureBeanNode |
addRoot(java.lang.String relId,
java.lang.String objectId)
Add a new root object to the structure.
|
void |
addStructureListener(StructureListener listener)
Adds a
StructureListener to the structure. |
void |
changeRootNode(StructureBeanNode rootNode)
Changes the root node.
|
void |
changeRootNode(StructureBeanNode rootNode,
int i)
Changes the root node at the specified index.
|
void |
clearRootNodes()
Removes all root nodes.
|
void |
collapse()
Collapse the root nodes.
|
void |
collapseNode(StructureBeanNode node)
Collapse the node.
|
protected int |
countVisibleChildNodes(StructureBeanNode node)
Counts the visible nodes benieth the given node.
|
protected abstract StructureBeanNode |
createRootNode(java.lang.String rootObjectId)
Creates a root node with the specified object ID.
|
protected abstract StructureBeanNode |
createStructureNode(java.lang.String relationshipId,
java.lang.String objectId,
boolean from)
Creates a node with the specified relationship ID, object ID and
direction.
|
protected java.util.Comparator<StructureBeanNode> |
createTableDataComparator() |
protected abstract void |
doCollapseNode(StructureBeanNode node)
Override this method to collapse a node.
|
protected abstract void |
doExpandNode(StructureBeanNode node,
int levels)
Override this method to expand a node.
|
int |
expand()
Expands the root nodes one level.
|
int |
expand(int level)
Expands the root nodes.
|
int |
expandFully()
Fully expands the root nodes.
|
int |
expandNode(StructureBeanNode node)
Expands the specified node one level.
|
int |
expandNode(StructureBeanNode node,
int levels)
Expands the specified node.
|
int |
expandNodeFully(StructureBeanNode node)
Fully expands the node.
|
protected void |
fireStructureCollapseEvent(StructureBeanNode node)
Fires a
node
collapsed event. |
protected void |
fireStructureExpandEvent(StructureBeanNode node)
Fires a
node
expanded event. |
boolean |
getAllowInconsistentVisibleStructure()
Returns whether the structure should allow inconsistency among it's
visible nodes, i.e., if a node can be visible even though it's parent is
not.
|
boolean |
getCollapseOnFilterChange() |
protected java.util.Iterator<StructureBeanNode> |
getConsistentVisibleTableData()
This method will always return a consistent visible structure, i.e.,
nodes will not be visible unless their parent is visible.
|
java.util.Iterator<StructureBeanNode> |
getFilteredRootNodes(TableDataFilter filter)
Returns the root nodes that are accepted by the specified filter.
|
int |
getInitialExpandDepth()
Returns the initial expand depth.
|
ExpansionMode |
getInitialExpandMode()
Returns the mode used when performing an initial expand on the structure.
|
int |
getMultiLevelExpandDepth()
Returns the multi-level expand depth.
|
StructureBeanNode |
getNodeAt(int index)
Returns the node at the specified index.
|
int |
getNodeCount()
Returns the node count.
|
java.util.Iterator<StructureBeanNode> |
getNodes()
Returns the nodes in the structure.
|
java.util.Iterator<StructureBeanNode> |
getNodes(java.lang.String objectId)
Returns all nodes in the structure with the specified object ID.
|
java.util.Iterator<StructureBeanNode> |
getNodes(java.lang.String relationshipId,
java.lang.String objectId)
Returns all nodes in the structure with the specified object and
relationship ID.
|
protected java.lang.String |
getObjectIdForHeaders() |
int |
getRootCount()
Returns the root node count.
|
com.technia.tvc.core.db.inquiry.InquirySupport |
getRootInquirySupport()
Get an
InquirySupport instance that can be used to load root
nodes into the structure. |
com.technia.tvc.core.db.jpo.JPOSupport |
getRootJPOSupport()
Get an
JPOSupport instance that can be used to load root nodes
into the structure. |
StructureBeanNode |
getRootNode()
Returns the first root node.
|
StructureBeanNode |
getRootNodeAt(int i)
Returns the root node at the specified index.
|
java.util.Iterator<StructureBeanNode> |
getRootNodes()
Returns the root nodes.
|
protected StructureListener[] |
getStructureListeners() |
java.util.Iterator<StructureBeanNode> |
getTableData()
Returns all
StructureBeanNode instances currently in the
structure. |
TableData |
getTableDataAt(int index)
Returns the
TableData instance at the specified index. |
int |
getTableDataCount()
Returns the count of all
StructureBeanNode instances in the
table. |
StructureBeanNode |
getVisibleChildAt(StructureBeanNode node,
int index)
Returns the
visible child node at the
specified index. |
int |
getVisibleChildCount(StructureBeanNode node)
Returns the
visible child count. |
int |
getVisibleChildIndex(StructureBeanNode node,
StructureBeanNode child)
|
java.util.Iterator<StructureBeanNode> |
getVisibleChildNodes(StructureBeanNode node)
Returns all
visible child nodes. |
java.util.Iterator<StructureBeanNode> |
getVisibleRootNodes() |
java.util.Iterator<StructureBeanNode> |
getVisibleTableData()
Returns the visible nodes in the structure.
|
boolean |
hasNodes()
Returns whether the structure has any nodes at all.
|
boolean |
hasTableData()
Returns true if the structure contains any
StructureBeanNode instances. |
boolean |
hasVisibleChildren(StructureBeanNode node)
Returns true if the node has any
visible children. |
protected void |
invalidateRootNodes()
Invalidates the structure on all root nodes.
|
boolean |
isAllowHideSingleRootNode() |
static boolean |
isDefaultCollapseOnFilterChange() |
boolean |
isFiltersCombinable()
This method returns true.
|
boolean |
isFirstVisibleChild(StructureBeanNode node,
StructureBeanNode child)
Returns true if the child is the specified node's first
visible child. |
boolean |
isInquirySupported(com.technia.tvc.core.db.inquiry.Inquiry inquiry)
Returns whether the inquiry is supported or not.
|
boolean |
isLastVisibleChild(StructureBeanNode node,
StructureBeanNode child)
Returns true if the child is the specified node's last
visible child. |
boolean |
isRootInquirySupported(com.technia.tvc.core.db.inquiry.Inquiry inquiry)
Returns whether the specified inquiry can be used to load root nodes.
|
boolean |
isRootNode(StructureBeanNode node)
Returns whether the specified node is a root node in this structure.
|
boolean |
isRootNodesNavigable() |
boolean |
isToFlatTableSupported()
Check whether this
StructureBean can be converted to a
FlatTableBean. |
boolean |
isValid()
Returns whether the structure is valid or not (i.e., whether it requires
a
validation or not). |
boolean |
isVisibleChild(StructureBeanNode node,
StructureBeanNode child)
Returns true if the specified node is a
visible child to the specified node. |
void |
loadFromInquiry(com.technia.tvc.core.db.inquiry.Inquiry inquiry,
Environment env,
boolean append)
Evaluates the inquiry into the structure.
|
void |
loadFromJPO(JPOName name,
Environment env,
boolean append)
It's currently not supported to load the structure from a JPO.
|
protected void |
loadIntoNode(StructureBeanNode into,
com.technia.tvc.core.db.inquiry.StructureResult.Node source)
Loads the result of the inquiry into the structure.
|
void |
loadRootsFromInquiry(com.technia.tvc.core.db.inquiry.Inquiry inquiry,
Environment env)
Load the root nodes from the specified inquiry.
|
void |
loadRootsFromInquiry(com.technia.tvc.core.db.inquiry.Inquiry inquiry,
Environment env,
boolean append)
Load the root nodes from the specified inquiry.
|
void |
loadRootsFromJPO(JPOName name,
Environment env)
Load the root nodes from the specified JPO.
|
void |
loadRootsFromJPO(JPOName name,
Environment env,
boolean append)
Load the root nodes from the specified JPO.
|
protected void |
onClone(TableBean<StructureBeanNode> c)
Create a deep copy of this object.
|
protected void |
onNavigate(TableBean<? extends TableData> table,
java.lang.String objectId)
Initialize the
StructureBean when navigating. |
protected void |
onViewChanged()
Invoked when the table's view changes.
|
protected void |
onVisualsChanged()
Invoked when the view's filters changes.
|
boolean |
removeNode(StructureBeanNode node)
Removes the node from the structure.
|
void |
removeNodes(java.lang.String objectId)
Removes all nodes with the specified object ID.
|
void |
removeNodes(java.lang.String relationshipId,
java.lang.String objectId)
Removes all nodes with the specified object and relationship ID.
|
boolean |
removeRoot(java.lang.String rootObjectId)
Removes all root nodes with the specified object ID.
|
boolean |
removeRootNode(StructureBeanNode root)
Removes the specified root node.
|
void |
removeStructureListener(StructureListener listener)
Removes a
StructureListener from the structure. |
void |
removeTableData(TableData data)
Removed the specified
TableData from the structure. |
void |
setAllowHideSingleRootNode(boolean value) |
void |
setAllowInconsistentVisibleStructure(boolean b)
Sets whether the structure should allow inconsistency among it's visible
nodes, i.e., if a node can be visible even though it's parent is not.
|
void |
setCollapseOnFilterChange(boolean collapseOnFilterChange)
Defines the behavior of this structure when the visuals is being changed.
|
static void |
setExpanded(StructureBeanNode node,
int level)
Sets the
expanded flag on all
nodes below the specified until the specified level has been reached. |
void |
setInitialExpandDepth(int initialExpandDepth)
Sets the initial expand depth (i.e., the number of levels to expand the
root node the first time).
|
void |
setInitialExpandMode(ExpansionMode mode)
Sets the mode used when performing an initial expand on the structure.
|
void |
setMultiLevelExpandDepth(int multiLevelExpandDepth)
Sets the multi-level expand depth (i.e., the number of levels to expand a
node when the used requests that a multi-level expansion is performed on
a particular node).
|
StructureBeanNode |
setRoot(java.lang.String rootObjectId)
Sets the root object in the structure.
|
StructureBeanNode |
setRoot(java.lang.String rootRelationshipId,
java.lang.String rootObjectId)
Sets the root object in the structure.
|
void |
sort(Environment env)
Sorts the structure according to the current sort modes.
|
protected void |
sortImpl(StructureBeanNode node,
java.util.Comparator<StructureBeanNode> comparator)
Implementation of sort.
|
FlatTableBean |
toFlatTable()
Converts the
StructureBean to a FlatTableBean. |
void |
validate(Environment env)
Validates the structure.
|
addSortMode, addSortMode, clearSortModes, createEvaluationChain, fireColumnsUpdatedEvent, getModeForString, getSortMode, getSortMode, getSortOrder, getSortOrderByName, hasSortModes, initDefault, invalidateSort, isAnySorted, isEvaluationForcedFor, isSorted, isSorted, isSorted, isSortSupported, isValidSort, onColumnsUpdated, onTableChanged, onTableSorted, setSortMode, setSortMode, setSortSupported, sortIfRequired, validateSortaddTableEditListenerListener, afterConnect, afterDisconnect, afterEdit, afterEdit, connect, createConnectResult, createDisconnectResult, createReplaceResult, disconnect, editCell, editCells, fireWasEditedEvent, fireWasEditedEvent, getReuseCellsForEditEvaluation, getTableEditListeners, isEditable, isEditSupported, isStructureModificationSupported, performConnect, performDisconnect, performReplace, removeTableEditListener, replace, setEditable, setEditSupported, setStructureModificationSupported, validate, validateSpecaddSelectionListener, createDefaultSelectionModel, getSelectionModel, removeSelectionListener, selectableChanged, selectionChanged, setSelectionModeladdPaginationChangeListener, asNonPaginatedTable, evaluateColumns, firePaginationChanged, getCurrentPage, getDisplayedTableData, getPageCount, getPageTableData, getPageTableDataRange, getPaginationThreshold, getUnpaginatedTableData, getUnpaginatedTableDataCount, isOnlyEvaluateCurrentPage, isPaginated, isPaginationForced, isPaginationSupported, isProxyInvokation, removePaginationChangeListener, setCurrentPage, setOnlyEvaluateCurrentPage, setPageTableDataRange, setPaginated, setPaginationSupported, setPaginationThresholdaccept, addEntryProcessor, addTableClonedListener, addTableContentListener, addTableGroupedListener, addTableListener, addTableNavigateListener, addVisibleTableDataFilter, clearEntryProcessor, clearRows, clearRowsBeforeEvaluation, clearVisibleTableDataFilter, clone, createNavigationHandler, createNavigationHandler, createTableClient, createTableHeaders, ensureTable, ensureView, evaluate, evaluateColumns, fireDidNavigateEvent, fireTableChangedEvent, fireTableContentAdded, fireTableContentCleared, fireTableContentRemoved, fireTableEvaluatedEvent, fireTableInvalidatedEvent, fireTableSortedEvent, fireViewChangedEvent, fireVisualsChangedEvent, fireWasClonedEvent, fireWasGroupedEvent, getCalculations, getCellAt, getChoosableViews, getColumnAt, getColumnByName, getColumnCount, getColumnIndex, getColumnList, getColumns, getContextMenu, getDisplayedTableDataCount, getEntryProcessor, getEntryProcessors, getEnv, getEnv, getEvaluationChain, getEvaluationRequiredTableData, getEvaluationRequiredTableDataCount, getFilteredTableData, getFilteredTableDataCount, getHasParent, getHeader, getLocaleForHeaders, getMenuBar, getMode, getNavigationHandler, getNavigationHandler, getPageConfig, getParent, getSelectedTableData, getSelectedTableDataCount, getSubHeader, getTableClonedListeners, getTableContentListeners, getTableData, getTableData, getTableDataWithId, getTableGroupedListeners, getTableListeners, getTableNavigateListeners, getView, getViewFactory, getVisibleColumnAt, getVisibleColumnByName, getVisibleColumnCount, getVisibleColumns, getVisibleTableDataCount, getVisibleTableDataFilters, getVisibleTableDataFilters, group, hasCellAt, hasEvaluationForcedColumns, hasVisibleTableDataFilter, invalidate, invalidateTableData, isColumnsLoaded, isEvaluateReadOnly, isEvaluationRequired, isHeaderHTML, isNavigateSupported, isOnlyEvaluateVisibleColumns, isSubHeaderHTML, isTableChangeable, isViewChangeable, isVisible, isVisibleColumn, isVisibleColumnImpl, isVisualsChangeable, loadFromInquiry, loadFromJPO, navigate, navigate, onGroup, onTableEvaluated, onTableInvalidated, paramString, reload, removeEntryProcessor, removeParent, removeTableClonedListener, removeTableContentListener, removeTableData, removeTableData, removeTableGroupedListener, removeTableListener, removeTableNavigateListener, removeVisibleTableDataFilter, removeVisibleTableDataFilters, setChoosableViews, setContextMenu, setEntryProcessor, setEntryProcessors, setEnv, setEvaluateReadOnly, setHeader, setHeader, setMenuBar, setNavigateSupported, setOnlyEvaluateVisibleColumns, setPageConfig, setParent, setSubHeader, setSubHeader, setTableChangeable, setView, setView, setViewChangeable, setViewFactory, setVisualsChangeable, toStringgetAttribute, getAttributeMap, getAttributeNames, removeAttribute, setAttributeequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFullExpandSupported, isMultiLevelExpandSupportedaccept, addTableClonedListener, addTableContentListener, addTableGroupedListener, addTableListener, addTableNavigateListener, addVisibleTableDataFilter, clearVisibleTableDataFilter, clone, getCalculations, getCellAt, getColumnAt, getColumnByName, getColumnCount, getColumnIndex, getColumnList, getColumns, getDisplayedTableData, getDisplayedTableDataCount, getEvaluationRequiredTableData, getEvaluationRequiredTableDataCount, getFilteredTableData, getFilteredTableDataCount, getHasParent, getHeader, getNavigationHandler, getNavigationHandler, getParent, getSelectedTableData, getSelectedTableDataCount, getSubHeader, getTableClonedListeners, getTableData, getTableData, getTableDataWithId, getTableGroupedListeners, getTableListeners, getTableNavigateListeners, getVisibleColumnAt, getVisibleColumnByName, getVisibleColumnCount, getVisibleColumns, getVisibleTableDataCount, getVisibleTableDataFilters, getVisibleTableDataFilters, hasCellAt, hasVisibleTableDataFilter, invalidate, isHeaderHTML, isNavigateSupported, isOnlyEvaluateVisibleColumns, isSubHeaderHTML, isVisible, isVisibleColumn, navigate, navigate, reload, removeParent, removeTableClonedListener, removeTableContentListener, removeTableData, removeTableData, removeTableGroupedListener, removeTableListener, removeTableNavigateListener, removeVisibleTableDataFilter, removeVisibleTableDataFilters, setHeader, setHeader, setOnlyEvaluateVisibleColumns, setParent, setSubHeader, setSubHeadergetChoosableViews, getView, getViewFactory, isTableChangeable, isViewChangeable, isVisualsChangeable, setChoosableViews, setView, setView, setViewFactorygetMenuBar, setMenuBargetContextMenu, setContextMenugetEnv, getEnv, setEnvgetAttribute, getAttributeNames, removeAttribute, setAttributegetPageConfig, setPageConfigpublic static final TableDataFilter STRUCTURE_INVALID_TABLE_DATA_FILTER
invalid.public boolean isAllowHideSingleRootNode()
isAllowHideSingleRootNode in interface StructureBeanpublic void setAllowHideSingleRootNode(boolean value)
setAllowHideSingleRootNode in interface StructureBeanprotected java.lang.String getObjectIdForHeaders()
getObjectIdForHeaders in class AbstractTableBean<StructureBeanNode>public void setCollapseOnFilterChange(boolean collapseOnFilterChange)
TVCSystemProperties#STRUCTURE_COLLAPSE_ROOTNODES_ON_FILTERCHANGE.collapseOnFilterChange - A boolean indicating if the nodes should be
collapsed when the visuals/filters are changed.public boolean getCollapseOnFilterChange()
public static boolean isDefaultCollapseOnFilterChange()
public boolean getAllowInconsistentVisibleStructure()
getAllowInconsistentVisibleStructure in interface StructureBeansetAllowInconsistentVisibleStructure(boolean),
getVisibleTableData(),
getConsistentVisibleTableData()public void setAllowInconsistentVisibleStructure(boolean b)
setAllowInconsistentVisibleStructure in interface StructureBeanb - Allow inconsistency.getAllowInconsistentVisibleStructure(),
getVisibleTableData(),
getConsistentVisibleTableData()public java.util.Iterator<StructureBeanNode> getVisibleTableData()
setAllowInconsistentVisibleStructure(boolean) to configure
whether the structure should allow inconsistency among the returned
nodes.getVisibleTableData in interface TableBean<StructureBeanNode>getVisibleTableData in class AbstractTableBean<StructureBeanNode>visible TableData
instances.getAllowInconsistentVisibleStructure(),
setAllowInconsistentVisibleStructure(boolean),
getConsistentVisibleTableData()protected java.util.Iterator<StructureBeanNode> getConsistentVisibleTableData()
getVisibleTableData()public java.util.Iterator<StructureBeanNode> getVisibleRootNodes()
protected void onClone(TableBean<StructureBeanNode> c)
onClone in class AbstractSortableTableBean<StructureBeanNode>public void validate(Environment env) throws TVCException
StructureBeanNode instances that
requires a validation.validate in interface TableBean<StructureBeanNode>validate in class AbstractSortableTableBean<StructureBeanNode>env - The environment to use.TVCException - If unable to validate the structure.public boolean isValid()
validation or not).isValid in interface TableBean<StructureBeanNode>isValid in class AbstractSortableTableBean<StructureBeanNode>public StructureBeanNode addNode(StructureBeanNode parentNode, java.lang.String relationshipId, java.lang.String objectId, boolean from, int index) throws TVCException
addNode in interface StructureBeanparentNode - The parent node, to which the new node is addedrelationshipId - The relationship idobjectId - The object id of the new nodefrom - True for from direction (e.g. parentNode -> newNode)index - The index within the child array (0 for first)TVCException - Upon errorspublic StructureBeanNode setRoot(java.lang.String rootObjectId) throws TVCException
setRoot in interface StructureBeanrootObjectId - The object ID of the root object.TVCException - If unable to set the root object.public StructureBeanNode setRoot(java.lang.String rootRelationshipId, java.lang.String rootObjectId) throws TVCException
setRoot in interface StructureBeanrootRelationshipId - The relationship ID of the root object.rootObjectId - The object ID of the root object.TVCException - If unable to set the root object.public void addRoot(java.lang.String rootObjectId)
throws TVCException
addRoot in interface CompositeStructureBeanrootObjectId - The object ID of the root object.TVCException - If unable to add a root object.public StructureBeanNode addRoot(java.lang.String relId, java.lang.String objectId) throws TVCException
addRoot in interface CompositeStructureBeanrelId - The relationship idobjectId - The object ID of the root object.TVCException - If unable to add a root object.public void changeRootNode(StructureBeanNode rootNode) throws TVCException
changeRootNode in interface StructureBeanjava.lang.IllegalStateException - If the structure doesn't have a root node.TVCExceptionpublic void changeRootNode(StructureBeanNode rootNode, int i) throws TVCException
changeRootNode in interface CompositeStructureBeanjava.lang.IndexOutOfBoundsException - If the structure doesn't have a root
node at the specified index.TVCExceptionpublic boolean removeRoot(java.lang.String rootObjectId)
removeRoot in interface CompositeStructureBeanpublic boolean removeRootNode(StructureBeanNode root)
removeRootNode in interface CompositeStructureBeanpublic void clearRootNodes()
clearRootNodes in interface CompositeStructureBeanpublic int getRootCount()
getRootCount in interface CompositeStructureBeanpublic java.util.Iterator<StructureBeanNode> getRootNodes()
getRootNodes in interface CompositeStructureBeanpublic java.util.Iterator<StructureBeanNode> getFilteredRootNodes(TableDataFilter filter)
getFilteredRootNodes in interface CompositeStructureBeanpublic StructureBeanNode getRootNodeAt(int i)
getRootNodeAt in interface CompositeStructureBeanpublic boolean isRootNode(StructureBeanNode node)
isRootNode in interface CompositeStructureBeanpublic boolean isRootNodesNavigable()
isRootNodesNavigable in interface CompositeStructureBeanpublic void setInitialExpandDepth(int initialExpandDepth)
setInitialExpandDepth in interface StructureBeangetInitialExpandDepth()public int getInitialExpandDepth()
getInitialExpandDepth in interface StructureBeansetInitialExpandDepth(int)public void setInitialExpandMode(ExpansionMode mode)
setInitialExpandMode in interface StructureBeanpublic ExpansionMode getInitialExpandMode()
getInitialExpandMode in interface StructureBeanpublic void setMultiLevelExpandDepth(int multiLevelExpandDepth)
setMultiLevelExpandDepth in interface StructureBeanStructureBean.isMultiLevelExpandSupported(),
getMultiLevelExpandDepth()public int getMultiLevelExpandDepth()
getMultiLevelExpandDepth in interface StructureBeanStructureBean.isMultiLevelExpandSupported(),
setMultiLevelExpandDepth(int)public int expand()
throws TVCException
expand in interface StructureBeanTVCExceptionpublic int expand(int level)
throws TVCException
expand in interface StructureBeanlevel - The number of levels to expand.TVCExceptionpublic int expandFully()
throws TVCException
expandFully in interface StructureBeanTVCExceptionStructureBean.isFullExpandSupported(),
expandNodeFully(StructureBeanNode)public void collapse()
throws TVCException
collapse in interface StructureBeanTVCExceptionpublic int expandNode(StructureBeanNode node) throws TVCException
expandNode in interface StructureBeannode - The node to expand.TVCExceptionexpandNode(StructureBeanNode,int),
expandNodeFully(StructureBeanNode)public int expandNodeFully(StructureBeanNode node) throws TVCException
expandNodeFully in interface StructureBeannode - The node to expand.TVCExceptionexpandNode(StructureBeanNode),
expandNode(StructureBeanNode,int)public static void setExpanded(StructureBeanNode node, int level)
expanded flag on all
nodes below the specified until the specified level has been reached.public StructureBeanNode getRootNode()
getRootNode in interface StructureBeanpublic java.util.Iterator<StructureBeanNode> getTableData()
StructureBeanNode instances currently in the
structure.getTableData in interface TableBean<StructureBeanNode>getTableData in interface TableDataProvider<StructureBeanNode>TableData instances currently in the table.public void removeTableData(TableData data)
TableData from the structure.removeTableData in interface TableBean<StructureBeanNode>data - The TableData that should be removed from the table.public TableData getTableDataAt(int index)
TableData instance at the specified index.getTableDataAt in interface TableBean<StructureBeanNode>getTableDataAt in class AbstractTableBean<StructureBeanNode>index - The index.TableData instance at the specified index.java.lang.IndexOutOfBoundsException - If the index is invalid.getNodeAt(int)public int getTableDataCount()
StructureBeanNode instances in the
table.getTableDataCount in interface TableBean<StructureBeanNode>getTableDataCount in class AbstractTableBean<StructureBeanNode>StructureBeanNode instances in the
table.getTableData(),
getNodes(),
getNodeCount()public boolean hasTableData()
StructureBeanNode instances.hasTableData in interface TableBean<StructureBeanNode>hasTableData in class AbstractTableBean<StructureBeanNode>StructureBeanNode instances.public java.util.Iterator<StructureBeanNode> getNodes()
getNodes in interface StructureBeanpublic java.util.Iterator<StructureBeanNode> getNodes(java.lang.String objectId)
getNodes in interface StructureBeanpublic java.util.Iterator<StructureBeanNode> getNodes(java.lang.String relationshipId, java.lang.String objectId)
getNodes in interface StructureBeanpublic boolean removeNode(StructureBeanNode node)
removeNode in interface StructureBeanpublic void removeNodes(java.lang.String objectId)
removeNodes in interface StructureBeanpublic void removeNodes(java.lang.String relationshipId,
java.lang.String objectId)
removeNodes in interface StructureBeanpublic StructureBeanNode getNodeAt(int index)
getNodeAt in interface StructureBeanjava.lang.IndexOutOfBoundsException - If the index is invalid.public int getNodeCount()
getNodeCount in interface StructureBeanpublic boolean hasNodes()
hasNodes in interface StructureBeanpublic boolean isInquirySupported(com.technia.tvc.core.db.inquiry.Inquiry inquiry)
isInquirySupported in interface com.technia.tvc.core.db.inquiry.InquirySupportpublic boolean isRootInquirySupported(com.technia.tvc.core.db.inquiry.Inquiry inquiry)
isRootInquirySupported in interface CompositeStructureBeanpublic void loadRootsFromInquiry(com.technia.tvc.core.db.inquiry.Inquiry inquiry,
Environment env)
throws TVCException
loadRootsFromInquiry in interface CompositeStructureBeanTVCExceptionpublic void loadRootsFromInquiry(com.technia.tvc.core.db.inquiry.Inquiry inquiry,
Environment env,
boolean append)
throws TVCException
loadRootsFromInquiry in interface CompositeStructureBeanTVCExceptionpublic com.technia.tvc.core.db.inquiry.InquirySupport getRootInquirySupport()
InquirySupport instance that can be used to load root
nodes into the structure.getRootInquirySupport in interface CompositeStructureBeanpublic void loadFromInquiry(com.technia.tvc.core.db.inquiry.Inquiry inquiry,
Environment env,
boolean append)
throws TVCException
loadFromInquiry in interface com.technia.tvc.core.db.inquiry.InquirySupportTVCExceptionprotected void loadIntoNode(StructureBeanNode into, com.technia.tvc.core.db.inquiry.StructureResult.Node source) throws TVCException
TVCExceptionpublic void loadRootsFromJPO(JPOName name, Environment env) throws TVCException
loadRootsFromJPO in interface CompositeStructureBeanTVCExceptionpublic void loadRootsFromJPO(JPOName name, Environment env, boolean append) throws TVCException
loadRootsFromJPO in interface CompositeStructureBeanTVCExceptionpublic com.technia.tvc.core.db.jpo.JPOSupport getRootJPOSupport()
JPOSupport instance that can be used to load root nodes
into the structure.getRootJPOSupport in interface CompositeStructureBeanpublic void loadFromJPO(JPOName name, Environment env, boolean append) throws TVCException
loadFromJPO in interface com.technia.tvc.core.db.jpo.JPOSupportjava.lang.UnsupportedOperationException - This operation is currently not
supported.TVCExceptionpublic void addStructureListener(StructureListener listener)
StructureListener to the structure.addStructureListener in interface StructureBeanlistener - The StructureListener to add.public void removeStructureListener(StructureListener listener)
StructureListener from the structure.removeStructureListener in interface StructureBeanlistener - The StructureListener to removeprotected StructureListener[] getStructureListeners()
StructureListener.protected void fireStructureExpandEvent(StructureBeanNode node)
node
expanded event.protected void fireStructureCollapseEvent(StructureBeanNode node)
node
collapsed event.public void sort(Environment env) throws TVCException
sort in class AbstractSortableTableBean<StructureBeanNode>env - the environment.TVCException - if unable to sort.protected java.util.Comparator<StructureBeanNode> createTableDataComparator()
protected void sortImpl(StructureBeanNode node, java.util.Comparator<StructureBeanNode> comparator)
protected abstract StructureBeanNode createRootNode(java.lang.String rootObjectId) throws TVCException
TVCExceptionprotected abstract StructureBeanNode createStructureNode(java.lang.String relationshipId, java.lang.String objectId, boolean from) throws TVCException
TVCExceptionprotected void onNavigate(TableBean<? extends TableData> table, java.lang.String objectId) throws TVCException
StructureBean when navigating.onNavigate in class AbstractSortableTableBean<StructureBeanNode>TVCExceptionpublic boolean isVisibleChild(StructureBeanNode node, StructureBeanNode child)
visible child to the specified node.isVisibleChild in interface StructureBeanpublic boolean isFirstVisibleChild(StructureBeanNode node, StructureBeanNode child)
visible child.isFirstVisibleChild in interface StructureBeanpublic boolean isLastVisibleChild(StructureBeanNode node, StructureBeanNode child)
visible child.isLastVisibleChild in interface StructureBeanpublic StructureBeanNode getVisibleChildAt(StructureBeanNode node, int index)
visible child node at the
specified index.getVisibleChildAt in interface StructureBeanpublic int getVisibleChildIndex(StructureBeanNode node, StructureBeanNode child)
visible
child, or -1 if the child in fact isn't a
visible child to the specified node.getVisibleChildIndex in interface StructureBeanpublic java.util.Iterator<StructureBeanNode> getVisibleChildNodes(StructureBeanNode node)
visible child nodes.getVisibleChildNodes in interface StructureBeanpublic int getVisibleChildCount(StructureBeanNode node)
visible child count.getVisibleChildCount in interface StructureBeanpublic boolean hasVisibleChildren(StructureBeanNode node)
visible children.hasVisibleChildren in interface StructureBeanprotected void onViewChanged()
onViewChanged in class AbstractSortableTableBean<StructureBeanNode>protected void onVisualsChanged()
onVisualsChanged in class AbstractTableBean<StructureBeanNode>protected void invalidateRootNodes()
public boolean isToFlatTableSupported()
StructureBeanStructureBean can be converted to a
FlatTableBean.isToFlatTableSupported in interface StructureBeanStructureBean.toFlatTable() is supported.StructureBean.toFlatTable()public FlatTableBean toFlatTable() throws TVCException
StructureBeanStructureBean to a FlatTableBean.toFlatTable in interface StructureBeanStructureBean as a flat table, i.e.,
containing the same rows but with the structure information
erased.TVCException - If unable to convert the StructureBean into
a flat table.StructureBean.isToFlatTableSupported()public void accept(StructureBeanNodeVisitor visitor)
StructureBeanaccept in interface StructureBeanvisitor - The visitor.public boolean isFiltersCombinable()
isFiltersCombinable in interface StructureBeanpublic int expandNode(StructureBeanNode node, int levels) throws TVCException
expandNode in interface StructureBeannode - The node to expand.levels - The number of levels to expand the node.TVCExceptionexpandNode(StructureBeanNode),
expandNodeFully(StructureBeanNode)protected int countVisibleChildNodes(StructureBeanNode node)
node - A node.protected abstract void doExpandNode(StructureBeanNode node, int levels) throws TVCException
node - The node to expand.levels - The number of levels to expand.TVCException - If unable to expand.public void collapseNode(StructureBeanNode node) throws TVCException
collapseNode in interface StructureBeannode - The node to collapse.TVCExceptionprotected abstract void doCollapseNode(StructureBeanNode node) throws TVCException
node - The node to collapse.TVCException - If unable to collapse the node.Copyright ? Technia AB. All Rights Reserved.