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