001/* 002 * Portions of this software was developed by employees of the National Institute 003 * of Standards and Technology (NIST), an agency of the Federal Government and is 004 * being made available as a public service. Pursuant to title 17 United States 005 * Code Section 105, works of NIST employees are not subject to copyright 006 * protection in the United States. This software may be subject to foreign 007 * copyright. Permission in the United States and in foreign countries, to the 008 * extent that NIST may hold copyright, to use, copy, modify, create derivative 009 * works, and distribute this software and its documentation without fee is hereby 010 * granted on a non-exclusive basis, provided that this notice and disclaimer 011 * of warranty appears in all copies. 012 * 013 * THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER 014 * EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY 015 * THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF 016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM 017 * INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE 018 * SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT 019 * SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, 020 * INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, 021 * OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, 022 * CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR 023 * PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT 024 * OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER. 025 */ 026 027package gov.nist.secauto.oscal.lib.profile.resolver.policy; 028 029import gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem; 030import gov.nist.secauto.oscal.lib.model.CatalogGroup; 031import gov.nist.secauto.oscal.lib.model.Control; 032import gov.nist.secauto.oscal.lib.profile.resolver.ProfileResolutionEvaluationException; 033import gov.nist.secauto.oscal.lib.profile.resolver.support.ICatalogVisitor; 034 035import edu.umd.cs.findbugs.annotations.NonNull; 036 037/** 038 * A visitor used to process references. 039 * 040 * @param <T> 041 * the visitor context type used to pass state while visiting 042 */ 043public interface IReferenceVisitor<T> extends ICatalogVisitor<T, Void> { 044 045 /** 046 * Visit the provided {@code item} representing an OSCAL {@link CatalogGroup} 047 * and handle any enclosed references. 048 * 049 * @param item 050 * the Metapath node item containing reference nodes 051 * @throws ProfileResolutionEvaluationException 052 * if there was an error handing the reference 053 */ 054 @Override 055 Void visitGroup(@NonNull IRequiredValueModelNodeItem item, Void childResult, T context); 056 057 /** 058 * Visit the provided {@code item} representing an OSCAL {@link Control} and 059 * handle any enclosed references. 060 * 061 * @param item 062 * the Metapath node item containing reference nodes 063 * @throws ProfileResolutionEvaluationException 064 * if there was an error handing the reference 065 */ 066 @Override 067 Void visitControl(@NonNull IRequiredValueModelNodeItem item, Void childResult, T context); 068 // 069 // /** 070 // * Visit the provided {@code item} representing an OSCAL {@link Parameter} and 071 // handle any enclosed 072 // * references. 073 // * 074 // * @param item 075 // * the Metapath node item containing reference nodes 076 // * @throws ProfileResolutionEvaluationException 077 // * if there was an error handing the reference 078 // */ 079 // void resolveParameter(@NonNull IRequiredValueModelNodeItem item); 080 // 081 // /** 082 // * Visit the provided {@code item} representing an OSCAL {@link ControlPart} 083 // and handle any 084 // enclosed 085 // * references. 086 // * 087 // * @param item 088 // * the Metapath node item containing reference nodes 089 // * @throws ProfileResolutionEvaluationException 090 // * if there was an error handing the reference 091 // */ 092 // void resolvePart(@NonNull IRequiredValueModelNodeItem item, T context); 093 // 094 // /** 095 // * Visit the provided {@code item} representing an OSCAL {@link Role} and 096 // handle any enclosed 097 // * references. 098 // * 099 // * @param item 100 // * the Metapath node item containing reference nodes 101 // * @throws ProfileResolutionEvaluationException 102 // * if there was an error handing the reference 103 // */ 104 // void resolveRole(@NonNull IRequiredValueModelNodeItem item); 105 // 106 // /** 107 // * Visit the provided {@code item} representing an OSCAL {@link Party} and 108 // handle any enclosed 109 // * references. 110 // * 111 // * @param item 112 // * the Metapath node item containing reference nodes 113 // * @throws ProfileResolutionEvaluationException 114 // * if there was an error handing the reference 115 // */ 116 // void resolveParty(@NonNull IRequiredValueModelNodeItem item); 117 // 118 // /** 119 // * Visit the provided {@code item} representing an OSCAL {@link Location} and 120 // handle any enclosed 121 // * references. 122 // * 123 // * @param item 124 // * the Metapath node item containing reference nodes 125 // * @throws ProfileResolutionEvaluationException 126 // * if there was an error handing the reference 127 // */ 128 // void resolveLocation(@NonNull IRequiredValueModelNodeItem item); 129 // 130 // /** 131 // * Visit the provided {@code item} representing an OSCAL {@link Resource} and 132 // handle any enclosed 133 // * references. 134 // * 135 // * @param item 136 // * the Metapath node item containing reference nodes 137 // * @throws ProfileResolutionEvaluationException 138 // * if there was an error handing the reference 139 // */ 140 // void resolveResource(@NonNull IRequiredValueModelNodeItem item); 141}