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