1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package dev.metaschema.oscal.lib.model.control.catalog;
7   
8   import dev.metaschema.oscal.lib.model.Catalog;
9   import dev.metaschema.oscal.lib.model.CatalogGroup;
10  import dev.metaschema.oscal.lib.model.Control;
11  import dev.metaschema.oscal.lib.model.Parameter;
12  import edu.umd.cs.findbugs.annotations.NonNull;
13  
14  public interface ICatalogVisitor<RESULT, CONTEXT> {
15    /**
16     * Visit the provided {@code catalog}.
17     *
18     * @param catalog
19     *          the bound catalog object
20     * @param context
21     *          the visitor context
22     * @return a meaningful result from visiting the object
23     */
24    RESULT visitCatalog(@NonNull Catalog catalog, CONTEXT context);
25  
26    /**
27     * Visit the provided {@code group}.
28     *
29     * @param group
30     *          the bound group object
31     * @param context
32     *          the visitor context
33     * @return a meaningful result from visiting the object
34     */
35    RESULT visitGroup(@NonNull CatalogGroup group, CONTEXT context);
36  
37    /**
38     * Visit the provided {@code control}.
39     *
40     * @param control
41     *          the bound control object
42     * @param context
43     *          the visitor context
44     * @return a meaningful result from visiting the object
45     */
46    RESULT visitControl(@NonNull Control control, CONTEXT context);
47  
48    /**
49     * Visit the provided {@code parameter}.
50     *
51     * @param parameter
52     *          the bound parameter object
53     * @param context
54     *          the visitor context
55     * @return a meaningful result from visiting the object
56     */
57    RESULT visitParameter(@NonNull Parameter parameter, CONTEXT context);
58  }