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