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.Control; 009import gov.nist.secauto.oscal.lib.model.Parameter; 010 011import java.util.List; 012import java.util.stream.Stream; 013 014import edu.umd.cs.findbugs.annotations.NonNull; 015 016public interface IControlContainer { 017 018 List<Control> getControls(); 019 020 /** 021 * Add a new {@link Control} item to the end of the underlying collection. 022 * 023 * @param item 024 * the item to add 025 * @return {@code true} 026 */ 027 boolean addControl(@NonNull Control item); 028 029 /** 030 * Remove the first matching {@link Control} item from the underlying 031 * collection. 032 * 033 * @param item 034 * the item to remove 035 * @return {@code true} if the item was removed or {@code false} otherwise 036 */ 037 boolean removeControl(@NonNull Control item); 038 039 List<Parameter> getParams(); 040 041 /** 042 * Add a new {@link Parameter} item to the underlying collection. 043 * 044 * @param item 045 * the item to add 046 * @return {@code true} 047 */ 048 boolean addParam(@NonNull Parameter item); 049 050 /** 051 * Remove the first matching {@link Parameter} item from the underlying 052 * collection. 053 * 054 * @param item 055 * the item to remove 056 * @return {@code true} if the item was removed or {@code false} otherwise 057 */ 058 boolean removeParam(@NonNull Parameter item); 059 060 /** 061 * Get the parameter identifiers referenced in the object's context, but not by 062 * their child objects. 063 * 064 * @return a stream of identifiers 065 */ 066 Stream<String> getReferencedParameterIds(); 067}