Class AbstractCatalogVisitor<T,R>
java.lang.Object
gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogVisitor<T,R>
- Type Parameters:
T
- the type of the state object used to pass calling context informationR
- the type of the result for visiting a collection of groups and/or controls
- All Implemented Interfaces:
ICatalogVisitor<T,
R>
- Direct Known Subclasses:
AbstractCatalogEntityVisitor
Used to visit a catalog containing groups and controls.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract R
aggregateResults
(R first, R second, T state) protected abstract R
newDefaultResult
(T state) protected R
visitCatalog
(gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, T state) protected R
visitControlContainer
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem catalogOrGroupOrControl, R initialResult, T state) Visit the child controls (in that order) of a given catalog, group, or control container.protected R
visitControlInternal
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem control, R childResult, T state) Called when visiting a control after visiting it's children.protected R
visitControlItem
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem control, T state) Called when visiting a control.protected R
visitGroupContainer
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem catalogOrGroup, R initialResult, T state) Visit the child groups and controls (in that order) of a given catalog or group container.protected R
visitGroupInternal
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem group, R childResult, T state) Called when visiting a group after visiting it's children.protected R
visitGroupItem
(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem group, T state) Called when visiting a group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gov.nist.secauto.oscal.lib.profile.resolver.support.ICatalogVisitor
visitControl, visitGroup
-
Constructor Details
-
AbstractCatalogVisitor
public AbstractCatalogVisitor()
-
-
Method Details
-
newDefaultResult
-
aggregateResults
-
visitCatalog
protected R visitCatalog(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, T state) -
visitGroupContainer
protected R visitGroupContainer(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem catalogOrGroup, R initialResult, T state) Visit the child groups and controls (in that order) of a given catalog or group container.- Parameters:
catalogOrGroup
- the catalog or group Metapath item currently being visitedinitialResult
- the initial result value to use when aggregating child resultsstate
- the current visitor state- Returns:
- a meaningful result of the given type
-
visitGroupItem
protected R visitGroupItem(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem group, T state) Called when visiting a group.This method will first visit the group's children, then the group itself.
- Parameters:
group
- the group Metapath item to visitstate
- the current visitor state- Returns:
- a meaningful result of the given type
-
visitGroupInternal
protected R visitGroupInternal(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem group, R childResult, T state) Called when visiting a group after visiting it's children.- Parameters:
group
- the group Metapath item currently being visitedchildResult
- the result of visiting the group's childrenstate
- the current visitor state- Returns:
- a meaningful result of the given type
-
visitControlContainer
protected R visitControlContainer(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem catalogOrGroupOrControl, R initialResult, T state) Visit the child controls (in that order) of a given catalog, group, or control container.- Parameters:
catalogOrGroupOrControl
- the catalog, group, or control Metapath item currently being visitedinitialResult
- the initial result value to use when aggregating child resultsstate
- the current visitor state- Returns:
- a meaningful result of the given type
-
visitControlItem
protected R visitControlItem(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem control, T state) Called when visiting a control.This method will first visit the control's children, then the control itself.
- Parameters:
control
- the control Metapath item to visitstate
- the current visitor state- Returns:
- a meaningful result of the given type
-
visitControlInternal
protected R visitControlInternal(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem control, R childResult, T state) Called when visiting a control after visiting it's children.- Parameters:
control
- the Metapath item for the control currently being visitedchildResult
- the result of visiting the control's childrenstate
- the calling context information- Returns:
- a meaningful result of the given type
-