Class RemoveVisitor
java.lang.Object
gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor
- All Implemented Interfaces:
ICatalogVisitor<Boolean,
gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context>
public class RemoveVisitor
extends Object
implements ICatalogVisitor<Boolean,gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context>
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
remove
(Control control, String objectName, String objectClass, String objectId, String objectNamespace, RemoveVisitor.TargetType itemType) Apply the remove directive.visitCatalog
(Catalog catalog, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Visit the providedcatalog
.visitControl
(Control control, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Visit the providedcontrol
.visitGroup
(CatalogGroup group, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Visit the providedgroup
.visitParameter
(Parameter parameter, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Visit the providedparameter
.boolean
visitPart
(ControlPart part, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Visit the control part.
-
Constructor Details
-
RemoveVisitor
public RemoveVisitor()
-
-
Method Details
-
remove
public static boolean remove(@NonNull Control control, @Nullable String objectName, @Nullable String objectClass, @Nullable String objectId, @Nullable String objectNamespace, @Nullable RemoveVisitor.TargetType itemType) Apply the remove directive.- Parameters:
control
- the control targetobjectName
- the name flag of a matching node to removeobjectClass
- the class flag of a matching node to removeobjectId
- the id flag of a matching node to removeobjectNamespace
- the namespace flag of a matching node to removeitemType
- the type of a matching node to remove- Returns:
true
if the modification was made orfalse
otherwise- Throws:
ProfileResolutionEvaluationException
- if a processing error occurred during profile resolution
-
visitCatalog
public Boolean visitCatalog(Catalog catalog, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Description copied from interface:ICatalogVisitor
Visit the providedcatalog
.- Specified by:
visitCatalog
in interfaceICatalogVisitor<Boolean,
gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context> - Parameters:
catalog
- the bound catalog objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
visitGroup
public Boolean visitGroup(CatalogGroup group, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Description copied from interface:ICatalogVisitor
Visit the providedgroup
.- Specified by:
visitGroup
in interfaceICatalogVisitor<Boolean,
gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context> - Parameters:
group
- the bound group objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
visitControl
public Boolean visitControl(Control control, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Description copied from interface:ICatalogVisitor
Visit the providedcontrol
.- Specified by:
visitControl
in interfaceICatalogVisitor<Boolean,
gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context> - Parameters:
control
- the bound control objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
visitParameter
public Boolean visitParameter(Parameter parameter, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Description copied from interface:ICatalogVisitor
Visit the providedparameter
.- Specified by:
visitParameter
in interfaceICatalogVisitor<Boolean,
gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context> - Parameters:
parameter
- the bound parameter objectcontext
- the visitor context- Returns:
- a meaningful result from visiting the object
-
visitPart
public boolean visitPart(ControlPart part, gov.nist.secauto.oscal.lib.profile.resolver.alter.RemoveVisitor.Context context) Visit the control part.- Parameters:
part
- the bound part objectcontext
- the visitor context- Returns:
true
if the removal was applied orfalse
otherwise
-