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 java.util.List;
9 import java.util.stream.Stream;
10
11 import dev.metaschema.oscal.lib.model.Control;
12 import dev.metaschema.oscal.lib.model.Parameter;
13 import edu.umd.cs.findbugs.annotations.NonNull;
14
15 public interface IControlContainer {
16
17 List<Control> getControls();
18
19 /**
20 * Add a new {@link Control} item to the end of the underlying collection.
21 *
22 * @param item
23 * the item to add
24 * @return {@code true}
25 */
26 boolean addControl(@NonNull Control item);
27
28 /**
29 * Remove the first matching {@link Control} item from the underlying
30 * collection.
31 *
32 * @param item
33 * the item to remove
34 * @return {@code true} if the item was removed or {@code false} otherwise
35 */
36 boolean removeControl(@NonNull Control item);
37
38 List<Parameter> getParams();
39
40 /**
41 * Add a new {@link Parameter} item to the underlying collection.
42 *
43 * @param item
44 * the item to add
45 * @return {@code true}
46 */
47 boolean addParam(@NonNull Parameter item);
48
49 /**
50 * Remove the first matching {@link Parameter} item from the underlying
51 * collection.
52 *
53 * @param item
54 * the item to remove
55 * @return {@code true} if the item was removed or {@code false} otherwise
56 */
57 boolean removeParam(@NonNull Parameter item);
58
59 /**
60 * Get the parameter identifiers referenced in the object's context, but not by
61 * their child objects.
62 *
63 * @return a stream of identifiers
64 */
65 Stream<String> getReferencedParameterIds();
66 }