001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package gov.nist.secauto.oscal.lib.model.control.catalog;
007
008import gov.nist.secauto.oscal.lib.model.Catalog;
009import gov.nist.secauto.oscal.lib.model.CatalogGroup;
010import gov.nist.secauto.oscal.lib.model.Control;
011import gov.nist.secauto.oscal.lib.model.Parameter;
012
013import edu.umd.cs.findbugs.annotations.NonNull;
014
015public interface ICatalogVisitor<RESULT, CONTEXT> {
016  /**
017   * Visit the provided {@code catalog}.
018   *
019   * @param catalog
020   *          the bound catalog object
021   * @param context
022   *          the visitor context
023   * @return a meaningful result from visiting the object
024   */
025  RESULT visitCatalog(@NonNull Catalog catalog, CONTEXT context);
026
027  /**
028   * Visit the provided {@code group}.
029   *
030   * @param group
031   *          the bound group object
032   * @param context
033   *          the visitor context
034   * @return a meaningful result from visiting the object
035   */
036  RESULT visitGroup(@NonNull CatalogGroup group, CONTEXT context);
037
038  /**
039   * Visit the provided {@code control}.
040   *
041   * @param control
042   *          the bound control object
043   * @param context
044   *          the visitor context
045   * @return a meaningful result from visiting the object
046   */
047  RESULT visitControl(@NonNull Control control, CONTEXT context);
048
049  /**
050   * Visit the provided {@code parameter}.
051   *
052   * @param parameter
053   *          the bound parameter object
054   * @param context
055   *          the visitor context
056   * @return a meaningful result from visiting the object
057   */
058  RESULT visitParameter(@NonNull Parameter parameter, CONTEXT context);
059}