001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.oscal.lib.profile.resolver.policy; 007 008import dev.metaschema.core.metapath.item.node.IAssemblyNodeItem; 009import dev.metaschema.oscal.lib.model.CatalogGroup; 010import dev.metaschema.oscal.lib.model.Control; 011import dev.metaschema.oscal.lib.profile.resolver.ProfileResolutionEvaluationException; 012import dev.metaschema.oscal.lib.profile.resolver.support.ICatalogVisitor; 013import edu.umd.cs.findbugs.annotations.NonNull; 014 015/** 016 * A visitor used to process references. 017 * 018 * @param <T> 019 * the visitor context type used to pass state while visiting 020 */ 021public interface IReferenceVisitor<T> extends ICatalogVisitor<T, Void> { 022 023 /** 024 * Visit the provided {@code item} representing an OSCAL {@link CatalogGroup} 025 * and handle any enclosed references. 026 * 027 * @param item 028 * the Metapath node item containing reference nodes 029 * @throws ProfileResolutionEvaluationException 030 * if there was an error handing the reference 031 */ 032 @Override 033 Void visitGroup(@NonNull IAssemblyNodeItem item, Void childResult, T context); 034 035 /** 036 * Visit the provided {@code item} representing an OSCAL {@link Control} and 037 * handle any enclosed references. 038 * 039 * @param item 040 * the Metapath node item containing reference nodes 041 * @throws ProfileResolutionEvaluationException 042 * if there was an error handing the reference 043 */ 044 @Override 045 Void visitControl(@NonNull IAssemblyNodeItem item, Void childResult, T context); 046 // 047 // /** 048 // * Visit the provided {@code item} representing an OSCAL {@link Parameter} and 049 // handle any enclosed 050 // * references. 051 // * 052 // * @param item 053 // * the Metapath node item containing reference nodes 054 // * @throws ProfileResolutionEvaluationException 055 // * if there was an error handing the reference 056 // */ 057 // void resolveParameter(@NonNull IModelNodeItem item); 058 // 059 // /** 060 // * Visit the provided {@code item} representing an OSCAL {@link ControlPart} 061 // and handle any 062 // enclosed 063 // * references. 064 // * 065 // * @param item 066 // * the Metapath node item containing reference nodes 067 // * @throws ProfileResolutionEvaluationException 068 // * if there was an error handing the reference 069 // */ 070 // void resolvePart(@NonNull IModelNodeItem item, T context); 071 // 072 // /** 073 // * Visit the provided {@code item} representing an OSCAL {@link Role} and 074 // handle any enclosed 075 // * references. 076 // * 077 // * @param item 078 // * the Metapath node item containing reference nodes 079 // * @throws ProfileResolutionEvaluationException 080 // * if there was an error handing the reference 081 // */ 082 // void resolveRole(@NonNull IModelNodeItem item); 083 // 084 // /** 085 // * Visit the provided {@code item} representing an OSCAL {@link Party} and 086 // handle any enclosed 087 // * references. 088 // * 089 // * @param item 090 // * the Metapath node item containing reference nodes 091 // * @throws ProfileResolutionEvaluationException 092 // * if there was an error handing the reference 093 // */ 094 // void resolveParty(@NonNull IModelNodeItem item); 095 // 096 // /** 097 // * Visit the provided {@code item} representing an OSCAL {@link Location} and 098 // handle any enclosed 099 // * references. 100 // * 101 // * @param item 102 // * the Metapath node item containing reference nodes 103 // * @throws ProfileResolutionEvaluationException 104 // * if there was an error handing the reference 105 // */ 106 // void resolveLocation(@NonNull IModelNodeItem item); 107 // 108 // /** 109 // * Visit the provided {@code item} representing an OSCAL {@link Resource} and 110 // handle any enclosed 111 // * references. 112 // * 113 // * @param item 114 // * the Metapath node item containing reference nodes 115 // * @throws ProfileResolutionEvaluationException 116 // * if there was an error handing the reference 117 // */ 118 // void resolveResource(@NonNull IModelNodeItem item); 119}