Class AddVisitor
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor
-
- All Implemented Interfaces:
ICatalogVisitor<Boolean,gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context>
public class AddVisitor extends Object implements ICatalogVisitor<Boolean,gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAddVisitor.Positionstatic classAddVisitor.TargetType
-
Constructor Summary
Constructors Constructor Description AddVisitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanadd(Control control, AddVisitor.Position position, String byId, gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine title, List<Parameter> params, List<Property> props, List<Link> links, List<ControlPart> parts)Apply the add directive.BooleanvisitCatalog(Catalog catalog, gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context context)Visit the providedcatalog.BooleanvisitControl(Control control, gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context context)Visit the providedcontrol.BooleanvisitGroup(CatalogGroup group, gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context context)Visit the providedgroup.BooleanvisitParameter(Parameter parameter, gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context context)Visit the providedparameter.booleanvisitPart(ControlPart part, gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context context)Visit the control part.
-
-
-
Constructor Detail
-
AddVisitor
public AddVisitor()
-
-
Method Detail
-
add
public static boolean add(@NonNull Control control, @Nullable AddVisitor.Position position, @Nullable String byId, @Nullable gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine title, @NonNull List<Parameter> params, @NonNull List<Property> props, @NonNull List<Link> links, @NonNull List<ControlPart> parts)
Apply the add directive.- Parameters:
control- the control targetposition- the position to apply the content ornullbyId- the identifier of the target ornulltitle- a title to setparams- parameters to addprops- properties to addlinks- links to addparts- parts to add- Returns:
trueif the modification was made orfalseotherwise- Throws:
ProfileResolutionEvaluationException- if a processing error occurred during profile resolution
-
visitCatalog
public Boolean visitCatalog(Catalog catalog, gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.Context context)
Description copied from interface:ICatalogVisitorVisit the providedcatalog.- Specified by:
visitCatalogin interfaceICatalogVisitor<Boolean,gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.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.AddVisitor.Context context)
Description copied from interface:ICatalogVisitorVisit the providedgroup.- Specified by:
visitGroupin interfaceICatalogVisitor<Boolean,gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.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.AddVisitor.Context context)
Description copied from interface:ICatalogVisitorVisit the providedcontrol.- Specified by:
visitControlin interfaceICatalogVisitor<Boolean,gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.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.AddVisitor.Context context)
Description copied from interface:ICatalogVisitorVisit the providedparameter.- Specified by:
visitParameterin interfaceICatalogVisitor<Boolean,gov.nist.secauto.oscal.lib.profile.resolver.alter.AddVisitor.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.AddVisitor.Context context)
Visit the control part.- Parameters:
part- the bound part objectcontext- the visitor context- Returns:
trueif the removal was applied orfalseotherwise
-
-