Class ControlSelectionVisitor
- All Implemented Interfaces:
ICatalogVisitor<IControlSelectionState,Boolean>
Catalog indexing all nodes that can be referenced.
For each CatalogGroup, Control, and ControlPart,
determine if that object is IIndexer.SelectionStatus.SELECTED or
IIndexer.SelectionStatus.UNSELECTED.
A Control is IIndexer.SelectionStatus.SELECTED if it matches the
configured IControlFilter, otherwise it is
IIndexer.SelectionStatus.UNSELECTED.
A CatalogGroup is IIndexer.SelectionStatus.SELECTED if it contains a
IIndexer.SelectionStatus.SELECTED descendant Control, otherwise it is
IIndexer.SelectionStatus.UNSELECTED.
A ControlPart is IIndexer.SelectionStatus.SELECTED if its containing
control is IIndexer.SelectionStatus.SELECTED.
All other indexed nodes will have the IIndexer.SelectionStatus.UNKNOWN, since
these nodes require reference counting to determine if they are to be kept or
not.
-
Field Summary
Fields inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor
CHILD_PART_METAPATH -
Method Summary
Modifier and TypeMethodDescriptionprotected BooleanaggregateResults(Boolean first, Boolean second, IControlSelectionState state) protected IIndexergetIndexer(IControlSelectionState state) static ControlSelectionVisitorinstance()protected Booleanvoidvisit(gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, IControlSelectionState state) visitCatalog(gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, IControlSelectionState state) visitControl(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem controlItem, Boolean childResult, IControlSelectionState state) Called when visiting a control.visitGroup(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem groupItem, Boolean childSelected, IControlSelectionState state) Called when visiting a group.voidvisitProfile(gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem profileDocument, IControlSelectionState state) Methods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractIndexingVisitor
visitLocation, visitParameter, visitPart, visitParty, visitResource, visitRoleMethods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogEntityVisitor
getItemTypesToVisit, isVisitedItemType, visitBackMatter, visitControlContainer, visitControlInternal, visitGroupContainer, visitGroupInternal, visitMetadata, visitPartsMethods inherited from class gov.nist.secauto.oscal.lib.profile.resolver.support.AbstractCatalogVisitor
visitControlItem, visitGroupItem
-
Method Details
-
instance
-
getIndexer
- Specified by:
getIndexerin classAbstractIndexingVisitor<IControlSelectionState,Boolean>
-
newDefaultResult
- Specified by:
newDefaultResultin classAbstractCatalogVisitor<IControlSelectionState,Boolean>
-
aggregateResults
- Specified by:
aggregateResultsin classAbstractCatalogVisitor<IControlSelectionState,Boolean>
-
visit
public void visit(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, @NonNull IControlSelectionState state) -
visitProfile
public void visitProfile(@NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, @NonNull gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem profileDocument, @NonNull IControlSelectionState state) -
visitCatalog
public Boolean visitCatalog(gov.nist.secauto.metaschema.core.metapath.item.node.IDocumentNodeItem catalogDocument, IControlSelectionState state) - Overrides:
visitCatalogin classAbstractCatalogEntityVisitor<IControlSelectionState,Boolean>
-
visitGroup
public Boolean visitGroup(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem groupItem, Boolean childSelected, IControlSelectionState state) Description copied from interface:ICatalogVisitorCalled when visiting a group.Can be overridden by classes extending this interface to support processing of the visited object.
- Specified by:
visitGroupin interfaceICatalogVisitor<IControlSelectionState,Boolean> - Overrides:
visitGroupin classAbstractIndexingVisitor<IControlSelectionState,Boolean> - Parameters:
groupItem- the Metapath item for the groupchildSelected- the result of evaluating the group's childrenstate- the calling context information- Returns:
- a meaningful result of the given type
-
visitControl
public Boolean visitControl(gov.nist.secauto.metaschema.core.metapath.item.node.IAssemblyNodeItem controlItem, Boolean childResult, IControlSelectionState state) Description copied from interface:ICatalogVisitorCalled when visiting a control.Can be overridden by classes extending this interface to support processing of the visited object.
- Specified by:
visitControlin interfaceICatalogVisitor<IControlSelectionState,Boolean> - Overrides:
visitControlin classAbstractIndexingVisitor<IControlSelectionState,Boolean> - Parameters:
controlItem- the Metapath item for the controlchildResult- the result of evaluating the control's childrenstate- the calling context information- Returns:
- a meaningful result of the given type
-