001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_ssp_metaschema.xml 002// Do not edit - changes will be lost when regenerated. 003package dev.metaschema.oscal.lib.model; 004 005import dev.metaschema.core.datatype.adapter.UuidAdapter; 006import dev.metaschema.core.datatype.markup.MarkupMultiline; 007import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter; 008import dev.metaschema.core.model.IBoundObject; 009import dev.metaschema.core.model.IMetaschemaData; 010import dev.metaschema.core.model.JsonGroupAsBehavior; 011import dev.metaschema.core.model.constraint.IConstraint; 012import dev.metaschema.core.util.ObjectUtils; 013import dev.metaschema.databind.model.annotations.AllowedValue; 014import dev.metaschema.databind.model.annotations.AllowedValues; 015import dev.metaschema.databind.model.annotations.AssemblyConstraints; 016import dev.metaschema.databind.model.annotations.BoundAssembly; 017import dev.metaschema.databind.model.annotations.BoundField; 018import dev.metaschema.databind.model.annotations.BoundFlag; 019import dev.metaschema.databind.model.annotations.GroupAs; 020import dev.metaschema.databind.model.annotations.HasCardinality; 021import dev.metaschema.databind.model.annotations.IndexHasKey; 022import dev.metaschema.databind.model.annotations.IsUnique; 023import dev.metaschema.databind.model.annotations.KeyField; 024import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 025import dev.metaschema.databind.model.annotations.ValueConstraints; 026import edu.umd.cs.findbugs.annotations.NonNull; 027import edu.umd.cs.findbugs.annotations.Nullable; 028import java.util.LinkedList; 029import java.util.List; 030import java.util.UUID; 031import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 032import org.apache.commons.lang3.builder.ToStringStyle; 033 034/** 035 * Defines how the referenced component implements a set of controls. 036 */ 037@MetaschemaAssembly( 038 formalName = "Component Control Implementation", 039 description = "Defines how the referenced component implements a set of controls.", 040 name = "by-component", 041 moduleClass = OscalSspModule.class, 042 remarks = "Use of `set-parameter` in this context, sets the parameter for the control referenced in the containing `implemented-requirement` applied to the referenced component. If the `by-component` is used as a child of a `statement`, then the parameter value also applies only in the context of the referenced statement. If the same parameter is also set in the `control-implementation` or a specific `implemented-requirement`, then this `by-component/set-parameter` value will override the other value(s) in the context of the referenced component, control, and statement (if parent).", 043 valueConstraints = @ValueConstraints(allowedValues = {@AllowedValues(id = "oscal-by-component-link-rel-values", level = IConstraint.Level.ERROR, target = "link/@rel", allowOthers = true, values = {@AllowedValue(value = "imported-from", description = "The hyperlink identifies a URI pointing to the `component` in a `component-definition` that originally described the `component` this component was based on."), @AllowedValue(value = "provided-by", description = "A reference to the UUID of a control or statement `by-component` object that is used as evidence of implementation.")}), @AllowedValues(id = "oscal-by-component-responsible-role-id-values", level = IConstraint.Level.ERROR, target = ".//responsible-role/@role-id", allowOthers = true, values = {@AllowedValue(value = "asset-owner", description = "Accountable for ensuring the asset is managed in accordance with organizational policies and procedures."), @AllowedValue(value = "asset-administrator", description = "Responsible for administering a set of assets."), @AllowedValue(value = "security-operations", description = "Members of the security operations center (SOC)."), @AllowedValue(value = "network-operations", description = "Members of the network operations center (NOC)."), @AllowedValue(value = "incident-response", description = "Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions."), @AllowedValue(value = "help-desk", description = "Responsible for providing information and support to users."), @AllowedValue(value = "configuration-management", description = "Responsible for the configuration management processes governing changes to the asset."), @AllowedValue(value = "maintainer", description = "Responsible for the creation and maintenance of a component."), @AllowedValue(value = "provider", description = "Organization responsible for providing the component, if this is different from the \"maintainer\" (e.g., a reseller).")})}, indexHasKey = @IndexHasKey(id = "oscal-by-component-uuid-index", level = IConstraint.Level.ERROR, target = "link[@rel='provided-by']", indexName = "by-component-uuid", keyFields = @KeyField(target = "@href", pattern = "#(.*)"))), 044 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-ssp-by-component-set-parameter", level = IConstraint.Level.ERROR, target = "set-parameter", keyFields = @KeyField(target = "@param-id"), remarks = "Since multiple `set-parameter` entries can be provided, each parameter must be set only once.")) 045) 046public class ByComponent implements IBoundObject { 047 private final IMetaschemaData __metaschemaData; 048 049 /** 050 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the <code>component</code> that is implementing a given control. 051 */ 052 @BoundFlag( 053 formalName = "Component Universally Unique Identifier Reference", 054 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to the `component` that is implementing a given control.", 055 name = "component-uuid", 056 required = true, 057 typeAdapter = UuidAdapter.class 058 ) 059 private UUID _componentUuid; 060 061 /** 062 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this by-component entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>by-component</code> entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 063 */ 064 @BoundFlag( 065 formalName = "By-Component Universally Unique Identifier", 066 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this by-component entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `by-component` entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same subject across revisions of the document.", 067 name = "uuid", 068 required = true, 069 typeAdapter = UuidAdapter.class 070 ) 071 private UUID _uuid; 072 073 /** 074 * An implementation statement that describes how a control or a control statement is implemented within the referenced system component. 075 */ 076 @BoundField( 077 formalName = "Control Implementation Description", 078 description = "An implementation statement that describes how a control or a control statement is implemented within the referenced system component.", 079 useName = "description", 080 minOccurs = 1, 081 typeAdapter = MarkupMultilineAdapter.class 082 ) 083 private MarkupMultiline _description; 084 085 /** 086 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 087 */ 088 @BoundAssembly( 089 formalName = "Property", 090 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 091 useName = "prop", 092 maxOccurs = -1, 093 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 094 ) 095 private List<Property> _props; 096 097 /** 098 * A reference to a local or remote resource, that has a specific relation to the containing object. 099 */ 100 @BoundAssembly( 101 formalName = "Link", 102 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 103 useName = "link", 104 maxOccurs = -1, 105 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 106 ) 107 private List<Link> _links; 108 109 /** 110 * Identifies the parameter that will be set by the enclosed value. 111 */ 112 @BoundAssembly( 113 formalName = "Set Parameter Value", 114 description = "Identifies the parameter that will be set by the enclosed value.", 115 useName = "set-parameter", 116 maxOccurs = -1, 117 groupAs = @GroupAs(name = "set-parameters", inJson = JsonGroupAsBehavior.LIST) 118 ) 119 private List<SetParameter> _setParameters; 120 121 /** 122 * Indicates the degree to which the a given control is implemented. 123 */ 124 @BoundAssembly( 125 formalName = "Implementation Status", 126 description = "Indicates the degree to which the a given control is implemented.", 127 useName = "implementation-status", 128 remarks = "The `implementation-status` is used to qualify the `status` value to indicate the degree to which the control is implemented." 129 ) 130 private ImplementationStatus _implementationStatus; 131 132 /** 133 * Identifies content intended for external consumption, such as with leveraged organizations. 134 */ 135 @BoundAssembly( 136 formalName = "Export", 137 description = "Identifies content intended for external consumption, such as with leveraged organizations.", 138 useName = "export" 139 ) 140 private Export _export; 141 142 /** 143 * Describes a control implementation inherited by a leveraging system. 144 */ 145 @BoundAssembly( 146 formalName = "Inherited Control Implementation", 147 description = "Describes a control implementation inherited by a leveraging system.", 148 useName = "inherited", 149 maxOccurs = -1, 150 groupAs = @GroupAs(name = "inherited", inJson = JsonGroupAsBehavior.LIST) 151 ) 152 private List<Inherited> _inherited; 153 154 /** 155 * Describes how this system satisfies a responsibility imposed by a leveraged system. 156 */ 157 @BoundAssembly( 158 formalName = "Satisfied Control Implementation Responsibility", 159 description = "Describes how this system satisfies a responsibility imposed by a leveraged system.", 160 useName = "satisfied", 161 maxOccurs = -1, 162 groupAs = @GroupAs(name = "satisfied", inJson = JsonGroupAsBehavior.LIST) 163 ) 164 private List<Satisfied> _satisfied; 165 166 /** 167 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 168 */ 169 @BoundAssembly( 170 formalName = "Responsible Role", 171 description = "A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role.", 172 useName = "responsible-role", 173 maxOccurs = -1, 174 groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST) 175 ) 176 private List<ResponsibleRole> _responsibleRoles; 177 178 /** 179 * Additional commentary about the containing object. 180 */ 181 @BoundField( 182 formalName = "Remarks", 183 description = "Additional commentary about the containing object.", 184 useName = "remarks", 185 typeAdapter = MarkupMultilineAdapter.class 186 ) 187 private MarkupMultiline _remarks; 188 189 /** 190 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent} instance with no metadata. 191 */ 192 public ByComponent() { 193 this(null); 194 } 195 196 /** 197 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent} instance with the specified metadata. 198 * 199 * @param data 200 * the metaschema data, or {@code null} if none 201 */ 202 public ByComponent(IMetaschemaData data) { 203 this.__metaschemaData = data; 204 } 205 206 @Override 207 public IMetaschemaData getMetaschemaData() { 208 return __metaschemaData; 209 } 210 211 /** 212 * Get the "{@literal Component Universally Unique Identifier Reference}". 213 * 214 * <p> 215 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the <code>component</code> that is implementing a given control. 216 * 217 * @return the component-uuid value 218 */ 219 @NonNull 220 public UUID getComponentUuid() { 221 return _componentUuid; 222 } 223 224 /** 225 * Set the "{@literal Component Universally Unique Identifier Reference}". 226 * 227 * <p> 228 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the <code>component</code> that is implementing a given control. 229 * 230 * @param value 231 * the component-uuid value to set 232 */ 233 public void setComponentUuid(@NonNull UUID value) { 234 _componentUuid = value; 235 } 236 237 /** 238 * Get the "{@literal By-Component Universally Unique Identifier}". 239 * 240 * <p> 241 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this by-component entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>by-component</code> entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 242 * 243 * @return the uuid value 244 */ 245 @NonNull 246 public UUID getUuid() { 247 return _uuid; 248 } 249 250 /** 251 * Set the "{@literal By-Component Universally Unique Identifier}". 252 * 253 * <p> 254 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this by-component entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>by-component</code> entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 255 * 256 * @param value 257 * the uuid value to set 258 */ 259 public void setUuid(@NonNull UUID value) { 260 _uuid = value; 261 } 262 263 /** 264 * Get the "{@literal Control Implementation Description}". 265 * 266 * <p> 267 * An implementation statement that describes how a control or a control statement is implemented within the referenced system component. 268 * 269 * @return the description value 270 */ 271 @NonNull 272 public MarkupMultiline getDescription() { 273 return _description; 274 } 275 276 /** 277 * Set the "{@literal Control Implementation Description}". 278 * 279 * <p> 280 * An implementation statement that describes how a control or a control statement is implemented within the referenced system component. 281 * 282 * @param value 283 * the description value to set 284 */ 285 public void setDescription(@NonNull MarkupMultiline value) { 286 _description = value; 287 } 288 289 /** 290 * Get the "{@literal Property}". 291 * 292 * <p> 293 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 294 * 295 * @return the prop value 296 */ 297 @NonNull 298 public List<Property> getProps() { 299 if (_props == null) { 300 _props = new LinkedList<>(); 301 } 302 return ObjectUtils.notNull(_props); 303 } 304 305 /** 306 * Set the "{@literal Property}". 307 * 308 * <p> 309 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 310 * 311 * @param value 312 * the prop value to set 313 */ 314 public void setProps(@NonNull List<Property> value) { 315 _props = value; 316 } 317 318 /** 319 * Add a new {@link Property} item to the underlying collection. 320 * @param item the item to add 321 * @return {@code true} 322 */ 323 public boolean addProp(Property item) { 324 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 325 if (_props == null) { 326 _props = new LinkedList<>(); 327 } 328 return _props.add(value); 329 } 330 331 /** 332 * Remove the first matching {@link Property} item from the underlying collection. 333 * @param item the item to remove 334 * @return {@code true} if the item was removed or {@code false} otherwise 335 */ 336 public boolean removeProp(Property item) { 337 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 338 return _props != null && _props.remove(value); 339 } 340 341 /** 342 * Get the "{@literal Link}". 343 * 344 * <p> 345 * A reference to a local or remote resource, that has a specific relation to the containing object. 346 * 347 * @return the link value 348 */ 349 @NonNull 350 public List<Link> getLinks() { 351 if (_links == null) { 352 _links = new LinkedList<>(); 353 } 354 return ObjectUtils.notNull(_links); 355 } 356 357 /** 358 * Set the "{@literal Link}". 359 * 360 * <p> 361 * A reference to a local or remote resource, that has a specific relation to the containing object. 362 * 363 * @param value 364 * the link value to set 365 */ 366 public void setLinks(@NonNull List<Link> value) { 367 _links = value; 368 } 369 370 /** 371 * Add a new {@link Link} item to the underlying collection. 372 * @param item the item to add 373 * @return {@code true} 374 */ 375 public boolean addLink(Link item) { 376 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 377 if (_links == null) { 378 _links = new LinkedList<>(); 379 } 380 return _links.add(value); 381 } 382 383 /** 384 * Remove the first matching {@link Link} item from the underlying collection. 385 * @param item the item to remove 386 * @return {@code true} if the item was removed or {@code false} otherwise 387 */ 388 public boolean removeLink(Link item) { 389 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 390 return _links != null && _links.remove(value); 391 } 392 393 /** 394 * Get the "{@literal Set Parameter Value}". 395 * 396 * <p> 397 * Identifies the parameter that will be set by the enclosed value. 398 * 399 * @return the set-parameter value 400 */ 401 @NonNull 402 public List<SetParameter> getSetParameters() { 403 if (_setParameters == null) { 404 _setParameters = new LinkedList<>(); 405 } 406 return ObjectUtils.notNull(_setParameters); 407 } 408 409 /** 410 * Set the "{@literal Set Parameter Value}". 411 * 412 * <p> 413 * Identifies the parameter that will be set by the enclosed value. 414 * 415 * @param value 416 * the set-parameter value to set 417 */ 418 public void setSetParameters(@NonNull List<SetParameter> value) { 419 _setParameters = value; 420 } 421 422 /** 423 * Add a new {@link SetParameter} item to the underlying collection. 424 * @param item the item to add 425 * @return {@code true} 426 */ 427 public boolean addSetParameter(SetParameter item) { 428 SetParameter value = ObjectUtils.requireNonNull(item,"item cannot be null"); 429 if (_setParameters == null) { 430 _setParameters = new LinkedList<>(); 431 } 432 return _setParameters.add(value); 433 } 434 435 /** 436 * Remove the first matching {@link SetParameter} item from the underlying collection. 437 * @param item the item to remove 438 * @return {@code true} if the item was removed or {@code false} otherwise 439 */ 440 public boolean removeSetParameter(SetParameter item) { 441 SetParameter value = ObjectUtils.requireNonNull(item,"item cannot be null"); 442 return _setParameters != null && _setParameters.remove(value); 443 } 444 445 /** 446 * Get the "{@literal Implementation Status}". 447 * 448 * <p> 449 * Indicates the degree to which the a given control is implemented. 450 * 451 * @return the implementation-status value, or {@code null} if not set 452 */ 453 @Nullable 454 public ImplementationStatus getImplementationStatus() { 455 return _implementationStatus; 456 } 457 458 /** 459 * Set the "{@literal Implementation Status}". 460 * 461 * <p> 462 * Indicates the degree to which the a given control is implemented. 463 * 464 * @param value 465 * the implementation-status value to set, or {@code null} to clear 466 */ 467 public void setImplementationStatus(@Nullable ImplementationStatus value) { 468 _implementationStatus = value; 469 } 470 471 /** 472 * Get the "{@literal Export}". 473 * 474 * <p> 475 * Identifies content intended for external consumption, such as with leveraged organizations. 476 * 477 * @return the export value, or {@code null} if not set 478 */ 479 @Nullable 480 public Export getExport() { 481 return _export; 482 } 483 484 /** 485 * Set the "{@literal Export}". 486 * 487 * <p> 488 * Identifies content intended for external consumption, such as with leveraged organizations. 489 * 490 * @param value 491 * the export value to set, or {@code null} to clear 492 */ 493 public void setExport(@Nullable Export value) { 494 _export = value; 495 } 496 497 /** 498 * Get the "{@literal Inherited Control Implementation}". 499 * 500 * <p> 501 * Describes a control implementation inherited by a leveraging system. 502 * 503 * @return the inherited value 504 */ 505 @NonNull 506 public List<Inherited> getInherited() { 507 if (_inherited == null) { 508 _inherited = new LinkedList<>(); 509 } 510 return ObjectUtils.notNull(_inherited); 511 } 512 513 /** 514 * Set the "{@literal Inherited Control Implementation}". 515 * 516 * <p> 517 * Describes a control implementation inherited by a leveraging system. 518 * 519 * @param value 520 * the inherited value to set 521 */ 522 public void setInherited(@NonNull List<Inherited> value) { 523 _inherited = value; 524 } 525 526 /** 527 * Add a new {@link Inherited} item to the underlying collection. 528 * @param item the item to add 529 * @return {@code true} 530 */ 531 public boolean addInherited(Inherited item) { 532 Inherited value = ObjectUtils.requireNonNull(item,"item cannot be null"); 533 if (_inherited == null) { 534 _inherited = new LinkedList<>(); 535 } 536 return _inherited.add(value); 537 } 538 539 /** 540 * Remove the first matching {@link Inherited} item from the underlying collection. 541 * @param item the item to remove 542 * @return {@code true} if the item was removed or {@code false} otherwise 543 */ 544 public boolean removeInherited(Inherited item) { 545 Inherited value = ObjectUtils.requireNonNull(item,"item cannot be null"); 546 return _inherited != null && _inherited.remove(value); 547 } 548 549 /** 550 * Get the "{@literal Satisfied Control Implementation Responsibility}". 551 * 552 * <p> 553 * Describes how this system satisfies a responsibility imposed by a leveraged system. 554 * 555 * @return the satisfied value 556 */ 557 @NonNull 558 public List<Satisfied> getSatisfied() { 559 if (_satisfied == null) { 560 _satisfied = new LinkedList<>(); 561 } 562 return ObjectUtils.notNull(_satisfied); 563 } 564 565 /** 566 * Set the "{@literal Satisfied Control Implementation Responsibility}". 567 * 568 * <p> 569 * Describes how this system satisfies a responsibility imposed by a leveraged system. 570 * 571 * @param value 572 * the satisfied value to set 573 */ 574 public void setSatisfied(@NonNull List<Satisfied> value) { 575 _satisfied = value; 576 } 577 578 /** 579 * Add a new {@link Satisfied} item to the underlying collection. 580 * @param item the item to add 581 * @return {@code true} 582 */ 583 public boolean addSatisfied(Satisfied item) { 584 Satisfied value = ObjectUtils.requireNonNull(item,"item cannot be null"); 585 if (_satisfied == null) { 586 _satisfied = new LinkedList<>(); 587 } 588 return _satisfied.add(value); 589 } 590 591 /** 592 * Remove the first matching {@link Satisfied} item from the underlying collection. 593 * @param item the item to remove 594 * @return {@code true} if the item was removed or {@code false} otherwise 595 */ 596 public boolean removeSatisfied(Satisfied item) { 597 Satisfied value = ObjectUtils.requireNonNull(item,"item cannot be null"); 598 return _satisfied != null && _satisfied.remove(value); 599 } 600 601 /** 602 * Get the "{@literal Responsible Role}". 603 * 604 * <p> 605 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 606 * 607 * @return the responsible-role value 608 */ 609 @NonNull 610 public List<ResponsibleRole> getResponsibleRoles() { 611 if (_responsibleRoles == null) { 612 _responsibleRoles = new LinkedList<>(); 613 } 614 return ObjectUtils.notNull(_responsibleRoles); 615 } 616 617 /** 618 * Set the "{@literal Responsible Role}". 619 * 620 * <p> 621 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 622 * 623 * @param value 624 * the responsible-role value to set 625 */ 626 public void setResponsibleRoles(@NonNull List<ResponsibleRole> value) { 627 _responsibleRoles = value; 628 } 629 630 /** 631 * Add a new {@link ResponsibleRole} item to the underlying collection. 632 * @param item the item to add 633 * @return {@code true} 634 */ 635 public boolean addResponsibleRole(ResponsibleRole item) { 636 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 637 if (_responsibleRoles == null) { 638 _responsibleRoles = new LinkedList<>(); 639 } 640 return _responsibleRoles.add(value); 641 } 642 643 /** 644 * Remove the first matching {@link ResponsibleRole} item from the underlying collection. 645 * @param item the item to remove 646 * @return {@code true} if the item was removed or {@code false} otherwise 647 */ 648 public boolean removeResponsibleRole(ResponsibleRole item) { 649 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 650 return _responsibleRoles != null && _responsibleRoles.remove(value); 651 } 652 653 /** 654 * Get the "{@literal Remarks}". 655 * 656 * <p> 657 * Additional commentary about the containing object. 658 * 659 * @return the remarks value, or {@code null} if not set 660 */ 661 @Nullable 662 public MarkupMultiline getRemarks() { 663 return _remarks; 664 } 665 666 /** 667 * Set the "{@literal Remarks}". 668 * 669 * <p> 670 * Additional commentary about the containing object. 671 * 672 * @param value 673 * the remarks value to set, or {@code null} to clear 674 */ 675 public void setRemarks(@Nullable MarkupMultiline value) { 676 _remarks = value; 677 } 678 679 @Override 680 public String toString() { 681 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 682 } 683 684 /** 685 * Identifies content intended for external consumption, such as with leveraged organizations. 686 */ 687 @MetaschemaAssembly( 688 formalName = "Export", 689 description = "Identifies content intended for external consumption, such as with leveraged organizations.", 690 name = "export", 691 moduleClass = OscalSspModule.class, 692 valueConstraints = @ValueConstraints(indexHasKey = @IndexHasKey(id = "oscal-by-component-export-provided-uuid-index", level = IConstraint.Level.ERROR, target = "responsibility", indexName = "by-component-export-provided-uuid", keyFields = @KeyField(target = "@provided-uuid"))), 693 modelConstraints = @AssemblyConstraints(cardinality = @HasCardinality(id = "oscal-by-component-export-provided-responsibility-cardinality", level = IConstraint.Level.ERROR, target = "provided|responsibility", minOccurs = 1)) 694 ) 695 public static class Export implements IBoundObject { 696 private final IMetaschemaData __metaschemaData; 697 698 /** 699 * An implementation statement that describes the aspects of the control or control statement implementation that can be available to another system leveraging this system. 700 */ 701 @BoundField( 702 formalName = "Control Implementation Export Description", 703 description = "An implementation statement that describes the aspects of the control or control statement implementation that can be available to another system leveraging this system.", 704 useName = "description", 705 typeAdapter = MarkupMultilineAdapter.class 706 ) 707 private MarkupMultiline _description; 708 709 /** 710 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 711 */ 712 @BoundAssembly( 713 formalName = "Property", 714 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 715 useName = "prop", 716 maxOccurs = -1, 717 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 718 ) 719 private List<Property> _props; 720 721 /** 722 * A reference to a local or remote resource, that has a specific relation to the containing object. 723 */ 724 @BoundAssembly( 725 formalName = "Link", 726 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 727 useName = "link", 728 maxOccurs = -1, 729 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 730 ) 731 private List<Link> _links; 732 733 /** 734 * Describes a capability which may be inherited by a leveraging system. 735 */ 736 @BoundAssembly( 737 formalName = "Provided Control Implementation", 738 description = "Describes a capability which may be inherited by a leveraging system.", 739 useName = "provided", 740 maxOccurs = -1, 741 groupAs = @GroupAs(name = "provided", inJson = JsonGroupAsBehavior.LIST) 742 ) 743 private List<Provided> _provided; 744 745 /** 746 * Describes a control implementation responsibility imposed on a leveraging system. 747 */ 748 @BoundAssembly( 749 formalName = "Control Implementation Responsibility", 750 description = "Describes a control implementation responsibility imposed on a leveraging system.", 751 useName = "responsibility", 752 maxOccurs = -1, 753 groupAs = @GroupAs(name = "responsibilities", inJson = JsonGroupAsBehavior.LIST) 754 ) 755 private List<Responsibility> _responsibilities; 756 757 /** 758 * Additional commentary about the containing object. 759 */ 760 @BoundField( 761 formalName = "Remarks", 762 description = "Additional commentary about the containing object.", 763 useName = "remarks", 764 typeAdapter = MarkupMultilineAdapter.class 765 ) 766 private MarkupMultiline _remarks; 767 768 /** 769 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Export} instance with no metadata. 770 */ 771 public Export() { 772 this(null); 773 } 774 775 /** 776 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Export} instance with the specified metadata. 777 * 778 * @param data 779 * the metaschema data, or {@code null} if none 780 */ 781 public Export(IMetaschemaData data) { 782 this.__metaschemaData = data; 783 } 784 785 @Override 786 public IMetaschemaData getMetaschemaData() { 787 return __metaschemaData; 788 } 789 790 /** 791 * Get the "{@literal Control Implementation Export Description}". 792 * 793 * <p> 794 * An implementation statement that describes the aspects of the control or control statement implementation that can be available to another system leveraging this system. 795 * 796 * @return the description value, or {@code null} if not set 797 */ 798 @Nullable 799 public MarkupMultiline getDescription() { 800 return _description; 801 } 802 803 /** 804 * Set the "{@literal Control Implementation Export Description}". 805 * 806 * <p> 807 * An implementation statement that describes the aspects of the control or control statement implementation that can be available to another system leveraging this system. 808 * 809 * @param value 810 * the description value to set, or {@code null} to clear 811 */ 812 public void setDescription(@Nullable MarkupMultiline value) { 813 _description = value; 814 } 815 816 /** 817 * Get the "{@literal Property}". 818 * 819 * <p> 820 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 821 * 822 * @return the prop value 823 */ 824 @NonNull 825 public List<Property> getProps() { 826 if (_props == null) { 827 _props = new LinkedList<>(); 828 } 829 return ObjectUtils.notNull(_props); 830 } 831 832 /** 833 * Set the "{@literal Property}". 834 * 835 * <p> 836 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 837 * 838 * @param value 839 * the prop value to set 840 */ 841 public void setProps(@NonNull List<Property> value) { 842 _props = value; 843 } 844 845 /** 846 * Add a new {@link Property} item to the underlying collection. 847 * @param item the item to add 848 * @return {@code true} 849 */ 850 public boolean addProp(Property item) { 851 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 852 if (_props == null) { 853 _props = new LinkedList<>(); 854 } 855 return _props.add(value); 856 } 857 858 /** 859 * Remove the first matching {@link Property} item from the underlying collection. 860 * @param item the item to remove 861 * @return {@code true} if the item was removed or {@code false} otherwise 862 */ 863 public boolean removeProp(Property item) { 864 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 865 return _props != null && _props.remove(value); 866 } 867 868 /** 869 * Get the "{@literal Link}". 870 * 871 * <p> 872 * A reference to a local or remote resource, that has a specific relation to the containing object. 873 * 874 * @return the link value 875 */ 876 @NonNull 877 public List<Link> getLinks() { 878 if (_links == null) { 879 _links = new LinkedList<>(); 880 } 881 return ObjectUtils.notNull(_links); 882 } 883 884 /** 885 * Set the "{@literal Link}". 886 * 887 * <p> 888 * A reference to a local or remote resource, that has a specific relation to the containing object. 889 * 890 * @param value 891 * the link value to set 892 */ 893 public void setLinks(@NonNull List<Link> value) { 894 _links = value; 895 } 896 897 /** 898 * Add a new {@link Link} item to the underlying collection. 899 * @param item the item to add 900 * @return {@code true} 901 */ 902 public boolean addLink(Link item) { 903 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 904 if (_links == null) { 905 _links = new LinkedList<>(); 906 } 907 return _links.add(value); 908 } 909 910 /** 911 * Remove the first matching {@link Link} item from the underlying collection. 912 * @param item the item to remove 913 * @return {@code true} if the item was removed or {@code false} otherwise 914 */ 915 public boolean removeLink(Link item) { 916 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 917 return _links != null && _links.remove(value); 918 } 919 920 /** 921 * Get the "{@literal Provided Control Implementation}". 922 * 923 * <p> 924 * Describes a capability which may be inherited by a leveraging system. 925 * 926 * @return the provided value 927 */ 928 @NonNull 929 public List<Provided> getProvided() { 930 if (_provided == null) { 931 _provided = new LinkedList<>(); 932 } 933 return ObjectUtils.notNull(_provided); 934 } 935 936 /** 937 * Set the "{@literal Provided Control Implementation}". 938 * 939 * <p> 940 * Describes a capability which may be inherited by a leveraging system. 941 * 942 * @param value 943 * the provided value to set 944 */ 945 public void setProvided(@NonNull List<Provided> value) { 946 _provided = value; 947 } 948 949 /** 950 * Add a new {@link Provided} item to the underlying collection. 951 * @param item the item to add 952 * @return {@code true} 953 */ 954 public boolean addProvided(Provided item) { 955 Provided value = ObjectUtils.requireNonNull(item,"item cannot be null"); 956 if (_provided == null) { 957 _provided = new LinkedList<>(); 958 } 959 return _provided.add(value); 960 } 961 962 /** 963 * Remove the first matching {@link Provided} item from the underlying collection. 964 * @param item the item to remove 965 * @return {@code true} if the item was removed or {@code false} otherwise 966 */ 967 public boolean removeProvided(Provided item) { 968 Provided value = ObjectUtils.requireNonNull(item,"item cannot be null"); 969 return _provided != null && _provided.remove(value); 970 } 971 972 /** 973 * Get the "{@literal Control Implementation Responsibility}". 974 * 975 * <p> 976 * Describes a control implementation responsibility imposed on a leveraging system. 977 * 978 * @return the responsibility value 979 */ 980 @NonNull 981 public List<Responsibility> getResponsibilities() { 982 if (_responsibilities == null) { 983 _responsibilities = new LinkedList<>(); 984 } 985 return ObjectUtils.notNull(_responsibilities); 986 } 987 988 /** 989 * Set the "{@literal Control Implementation Responsibility}". 990 * 991 * <p> 992 * Describes a control implementation responsibility imposed on a leveraging system. 993 * 994 * @param value 995 * the responsibility value to set 996 */ 997 public void setResponsibilities(@NonNull List<Responsibility> value) { 998 _responsibilities = value; 999 } 1000 1001 /** 1002 * Add a new {@link Responsibility} item to the underlying collection. 1003 * @param item the item to add 1004 * @return {@code true} 1005 */ 1006 public boolean addResponsibility(Responsibility item) { 1007 Responsibility value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1008 if (_responsibilities == null) { 1009 _responsibilities = new LinkedList<>(); 1010 } 1011 return _responsibilities.add(value); 1012 } 1013 1014 /** 1015 * Remove the first matching {@link Responsibility} item from the underlying collection. 1016 * @param item the item to remove 1017 * @return {@code true} if the item was removed or {@code false} otherwise 1018 */ 1019 public boolean removeResponsibility(Responsibility item) { 1020 Responsibility value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1021 return _responsibilities != null && _responsibilities.remove(value); 1022 } 1023 1024 /** 1025 * Get the "{@literal Remarks}". 1026 * 1027 * <p> 1028 * Additional commentary about the containing object. 1029 * 1030 * @return the remarks value, or {@code null} if not set 1031 */ 1032 @Nullable 1033 public MarkupMultiline getRemarks() { 1034 return _remarks; 1035 } 1036 1037 /** 1038 * Set the "{@literal Remarks}". 1039 * 1040 * <p> 1041 * Additional commentary about the containing object. 1042 * 1043 * @param value 1044 * the remarks value to set, or {@code null} to clear 1045 */ 1046 public void setRemarks(@Nullable MarkupMultiline value) { 1047 _remarks = value; 1048 } 1049 1050 @Override 1051 public String toString() { 1052 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 1053 } 1054 1055 /** 1056 * Describes a capability which may be inherited by a leveraging system. 1057 */ 1058 @MetaschemaAssembly( 1059 formalName = "Provided Control Implementation", 1060 description = "Describes a capability which may be inherited by a leveraging system.", 1061 name = "provided", 1062 moduleClass = OscalSspModule.class, 1063 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-provided-responsible-role", level = IConstraint.Level.ERROR, target = "responsible-role", keyFields = @KeyField(target = "@role-id"), remarks = "Since `responsible-role` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once.")) 1064 ) 1065 public static class Provided implements IBoundObject { 1066 private final IMetaschemaData __metaschemaData; 1067 1068 /** 1069 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this provided entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>provided</code> entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1070 */ 1071 @BoundFlag( 1072 formalName = "Provided Universally Unique Identifier", 1073 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this provided entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `provided` entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same subject across revisions of the document.", 1074 name = "uuid", 1075 required = true, 1076 typeAdapter = UuidAdapter.class 1077 ) 1078 private UUID _uuid; 1079 1080 /** 1081 * An implementation statement that describes the aspects of the control or control statement implementation that can be provided to another system leveraging this system. 1082 */ 1083 @BoundField( 1084 formalName = "Provided Control Implementation Description", 1085 description = "An implementation statement that describes the aspects of the control or control statement implementation that can be provided to another system leveraging this system.", 1086 useName = "description", 1087 minOccurs = 1, 1088 typeAdapter = MarkupMultilineAdapter.class 1089 ) 1090 private MarkupMultiline _description; 1091 1092 /** 1093 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1094 */ 1095 @BoundAssembly( 1096 formalName = "Property", 1097 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 1098 useName = "prop", 1099 maxOccurs = -1, 1100 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 1101 ) 1102 private List<Property> _props; 1103 1104 /** 1105 * A reference to a local or remote resource, that has a specific relation to the containing object. 1106 */ 1107 @BoundAssembly( 1108 formalName = "Link", 1109 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 1110 useName = "link", 1111 maxOccurs = -1, 1112 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 1113 ) 1114 private List<Link> _links; 1115 1116 /** 1117 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 1118 */ 1119 @BoundAssembly( 1120 formalName = "Responsible Role", 1121 description = "A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role.", 1122 useName = "responsible-role", 1123 maxOccurs = -1, 1124 groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST) 1125 ) 1126 private List<ResponsibleRole> _responsibleRoles; 1127 1128 /** 1129 * Additional commentary about the containing object. 1130 */ 1131 @BoundField( 1132 formalName = "Remarks", 1133 description = "Additional commentary about the containing object.", 1134 useName = "remarks", 1135 typeAdapter = MarkupMultilineAdapter.class 1136 ) 1137 private MarkupMultiline _remarks; 1138 1139 /** 1140 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Export.Provided} instance with no metadata. 1141 */ 1142 public Provided() { 1143 this(null); 1144 } 1145 1146 /** 1147 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Export.Provided} instance with the specified metadata. 1148 * 1149 * @param data 1150 * the metaschema data, or {@code null} if none 1151 */ 1152 public Provided(IMetaschemaData data) { 1153 this.__metaschemaData = data; 1154 } 1155 1156 @Override 1157 public IMetaschemaData getMetaschemaData() { 1158 return __metaschemaData; 1159 } 1160 1161 /** 1162 * Get the "{@literal Provided Universally Unique Identifier}". 1163 * 1164 * <p> 1165 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this provided entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>provided</code> entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1166 * 1167 * @return the uuid value 1168 */ 1169 @NonNull 1170 public UUID getUuid() { 1171 return _uuid; 1172 } 1173 1174 /** 1175 * Set the "{@literal Provided Universally Unique Identifier}". 1176 * 1177 * <p> 1178 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this provided entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>provided</code> entry can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1179 * 1180 * @param value 1181 * the uuid value to set 1182 */ 1183 public void setUuid(@NonNull UUID value) { 1184 _uuid = value; 1185 } 1186 1187 /** 1188 * Get the "{@literal Provided Control Implementation Description}". 1189 * 1190 * <p> 1191 * An implementation statement that describes the aspects of the control or control statement implementation that can be provided to another system leveraging this system. 1192 * 1193 * @return the description value 1194 */ 1195 @NonNull 1196 public MarkupMultiline getDescription() { 1197 return _description; 1198 } 1199 1200 /** 1201 * Set the "{@literal Provided Control Implementation Description}". 1202 * 1203 * <p> 1204 * An implementation statement that describes the aspects of the control or control statement implementation that can be provided to another system leveraging this system. 1205 * 1206 * @param value 1207 * the description value to set 1208 */ 1209 public void setDescription(@NonNull MarkupMultiline value) { 1210 _description = value; 1211 } 1212 1213 /** 1214 * Get the "{@literal Property}". 1215 * 1216 * <p> 1217 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1218 * 1219 * @return the prop value 1220 */ 1221 @NonNull 1222 public List<Property> getProps() { 1223 if (_props == null) { 1224 _props = new LinkedList<>(); 1225 } 1226 return ObjectUtils.notNull(_props); 1227 } 1228 1229 /** 1230 * Set the "{@literal Property}". 1231 * 1232 * <p> 1233 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1234 * 1235 * @param value 1236 * the prop value to set 1237 */ 1238 public void setProps(@NonNull List<Property> value) { 1239 _props = value; 1240 } 1241 1242 /** 1243 * Add a new {@link Property} item to the underlying collection. 1244 * @param item the item to add 1245 * @return {@code true} 1246 */ 1247 public boolean addProp(Property item) { 1248 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1249 if (_props == null) { 1250 _props = new LinkedList<>(); 1251 } 1252 return _props.add(value); 1253 } 1254 1255 /** 1256 * Remove the first matching {@link Property} item from the underlying collection. 1257 * @param item the item to remove 1258 * @return {@code true} if the item was removed or {@code false} otherwise 1259 */ 1260 public boolean removeProp(Property item) { 1261 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1262 return _props != null && _props.remove(value); 1263 } 1264 1265 /** 1266 * Get the "{@literal Link}". 1267 * 1268 * <p> 1269 * A reference to a local or remote resource, that has a specific relation to the containing object. 1270 * 1271 * @return the link value 1272 */ 1273 @NonNull 1274 public List<Link> getLinks() { 1275 if (_links == null) { 1276 _links = new LinkedList<>(); 1277 } 1278 return ObjectUtils.notNull(_links); 1279 } 1280 1281 /** 1282 * Set the "{@literal Link}". 1283 * 1284 * <p> 1285 * A reference to a local or remote resource, that has a specific relation to the containing object. 1286 * 1287 * @param value 1288 * the link value to set 1289 */ 1290 public void setLinks(@NonNull List<Link> value) { 1291 _links = value; 1292 } 1293 1294 /** 1295 * Add a new {@link Link} item to the underlying collection. 1296 * @param item the item to add 1297 * @return {@code true} 1298 */ 1299 public boolean addLink(Link item) { 1300 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1301 if (_links == null) { 1302 _links = new LinkedList<>(); 1303 } 1304 return _links.add(value); 1305 } 1306 1307 /** 1308 * Remove the first matching {@link Link} item from the underlying collection. 1309 * @param item the item to remove 1310 * @return {@code true} if the item was removed or {@code false} otherwise 1311 */ 1312 public boolean removeLink(Link item) { 1313 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1314 return _links != null && _links.remove(value); 1315 } 1316 1317 /** 1318 * Get the "{@literal Responsible Role}". 1319 * 1320 * <p> 1321 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 1322 * 1323 * @return the responsible-role value 1324 */ 1325 @NonNull 1326 public List<ResponsibleRole> getResponsibleRoles() { 1327 if (_responsibleRoles == null) { 1328 _responsibleRoles = new LinkedList<>(); 1329 } 1330 return ObjectUtils.notNull(_responsibleRoles); 1331 } 1332 1333 /** 1334 * Set the "{@literal Responsible Role}". 1335 * 1336 * <p> 1337 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 1338 * 1339 * @param value 1340 * the responsible-role value to set 1341 */ 1342 public void setResponsibleRoles(@NonNull List<ResponsibleRole> value) { 1343 _responsibleRoles = value; 1344 } 1345 1346 /** 1347 * Add a new {@link ResponsibleRole} item to the underlying collection. 1348 * @param item the item to add 1349 * @return {@code true} 1350 */ 1351 public boolean addResponsibleRole(ResponsibleRole item) { 1352 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1353 if (_responsibleRoles == null) { 1354 _responsibleRoles = new LinkedList<>(); 1355 } 1356 return _responsibleRoles.add(value); 1357 } 1358 1359 /** 1360 * Remove the first matching {@link ResponsibleRole} item from the underlying collection. 1361 * @param item the item to remove 1362 * @return {@code true} if the item was removed or {@code false} otherwise 1363 */ 1364 public boolean removeResponsibleRole(ResponsibleRole item) { 1365 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1366 return _responsibleRoles != null && _responsibleRoles.remove(value); 1367 } 1368 1369 /** 1370 * Get the "{@literal Remarks}". 1371 * 1372 * <p> 1373 * Additional commentary about the containing object. 1374 * 1375 * @return the remarks value, or {@code null} if not set 1376 */ 1377 @Nullable 1378 public MarkupMultiline getRemarks() { 1379 return _remarks; 1380 } 1381 1382 /** 1383 * Set the "{@literal Remarks}". 1384 * 1385 * <p> 1386 * Additional commentary about the containing object. 1387 * 1388 * @param value 1389 * the remarks value to set, or {@code null} to clear 1390 */ 1391 public void setRemarks(@Nullable MarkupMultiline value) { 1392 _remarks = value; 1393 } 1394 1395 @Override 1396 public String toString() { 1397 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 1398 } 1399 } 1400 1401 /** 1402 * Describes a control implementation responsibility imposed on a leveraging system. 1403 */ 1404 @MetaschemaAssembly( 1405 formalName = "Control Implementation Responsibility", 1406 description = "Describes a control implementation responsibility imposed on a leveraging system.", 1407 name = "responsibility", 1408 moduleClass = OscalSspModule.class, 1409 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-responsibility-responsible-role", level = IConstraint.Level.ERROR, target = "responsible-role", keyFields = @KeyField(target = "@role-id"), remarks = "Since `responsible-role` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once.")) 1410 ) 1411 public static class Responsibility implements IBoundObject { 1412 private final IMetaschemaData __metaschemaData; 1413 1414 /** 1415 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this responsibility elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>responsibility</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1416 */ 1417 @BoundFlag( 1418 formalName = "Responsibility Universally Unique Identifier", 1419 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this responsibility elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `responsibility` can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same subject across revisions of the document.", 1420 name = "uuid", 1421 required = true, 1422 typeAdapter = UuidAdapter.class 1423 ) 1424 private UUID _uuid; 1425 1426 /** 1427 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system. 1428 */ 1429 @BoundFlag( 1430 formalName = "Provided UUID", 1431 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system.", 1432 name = "provided-uuid", 1433 typeAdapter = UuidAdapter.class 1434 ) 1435 private UUID _providedUuid; 1436 1437 /** 1438 * An implementation statement that describes the aspects of the control or control statement implementation that a leveraging system must implement to satisfy the control provided by a leveraged system. 1439 */ 1440 @BoundField( 1441 formalName = "Control Implementation Responsibility Description", 1442 description = "An implementation statement that describes the aspects of the control or control statement implementation that a leveraging system must implement to satisfy the control provided by a leveraged system.", 1443 useName = "description", 1444 minOccurs = 1, 1445 typeAdapter = MarkupMultilineAdapter.class 1446 ) 1447 private MarkupMultiline _description; 1448 1449 /** 1450 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1451 */ 1452 @BoundAssembly( 1453 formalName = "Property", 1454 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 1455 useName = "prop", 1456 maxOccurs = -1, 1457 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 1458 ) 1459 private List<Property> _props; 1460 1461 /** 1462 * A reference to a local or remote resource, that has a specific relation to the containing object. 1463 */ 1464 @BoundAssembly( 1465 formalName = "Link", 1466 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 1467 useName = "link", 1468 maxOccurs = -1, 1469 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 1470 ) 1471 private List<Link> _links; 1472 1473 /** 1474 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 1475 */ 1476 @BoundAssembly( 1477 formalName = "Responsible Role", 1478 description = "A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role.", 1479 useName = "responsible-role", 1480 remarks = "A role defined at the by-component level takes precedence over the same role defined on the parent implemented-requirement or on the referenced component.", 1481 maxOccurs = -1, 1482 groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST) 1483 ) 1484 private List<ResponsibleRole> _responsibleRoles; 1485 1486 /** 1487 * Additional commentary about the containing object. 1488 */ 1489 @BoundField( 1490 formalName = "Remarks", 1491 description = "Additional commentary about the containing object.", 1492 useName = "remarks", 1493 typeAdapter = MarkupMultilineAdapter.class 1494 ) 1495 private MarkupMultiline _remarks; 1496 1497 /** 1498 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Export.Responsibility} instance with no metadata. 1499 */ 1500 public Responsibility() { 1501 this(null); 1502 } 1503 1504 /** 1505 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Export.Responsibility} instance with the specified metadata. 1506 * 1507 * @param data 1508 * the metaschema data, or {@code null} if none 1509 */ 1510 public Responsibility(IMetaschemaData data) { 1511 this.__metaschemaData = data; 1512 } 1513 1514 @Override 1515 public IMetaschemaData getMetaschemaData() { 1516 return __metaschemaData; 1517 } 1518 1519 /** 1520 * Get the "{@literal Responsibility Universally Unique Identifier}". 1521 * 1522 * <p> 1523 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this responsibility elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>responsibility</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1524 * 1525 * @return the uuid value 1526 */ 1527 @NonNull 1528 public UUID getUuid() { 1529 return _uuid; 1530 } 1531 1532 /** 1533 * Set the "{@literal Responsibility Universally Unique Identifier}". 1534 * 1535 * <p> 1536 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this responsibility elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>responsibility</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1537 * 1538 * @param value 1539 * the uuid value to set 1540 */ 1541 public void setUuid(@NonNull UUID value) { 1542 _uuid = value; 1543 } 1544 1545 /** 1546 * Get the "{@literal Provided UUID}". 1547 * 1548 * <p> 1549 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system. 1550 * 1551 * @return the provided-uuid value, or {@code null} if not set 1552 */ 1553 @Nullable 1554 public UUID getProvidedUuid() { 1555 return _providedUuid; 1556 } 1557 1558 /** 1559 * Set the "{@literal Provided UUID}". 1560 * 1561 * <p> 1562 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system. 1563 * 1564 * @param value 1565 * the provided-uuid value to set, or {@code null} to clear 1566 */ 1567 public void setProvidedUuid(@Nullable UUID value) { 1568 _providedUuid = value; 1569 } 1570 1571 /** 1572 * Get the "{@literal Control Implementation Responsibility Description}". 1573 * 1574 * <p> 1575 * An implementation statement that describes the aspects of the control or control statement implementation that a leveraging system must implement to satisfy the control provided by a leveraged system. 1576 * 1577 * @return the description value 1578 */ 1579 @NonNull 1580 public MarkupMultiline getDescription() { 1581 return _description; 1582 } 1583 1584 /** 1585 * Set the "{@literal Control Implementation Responsibility Description}". 1586 * 1587 * <p> 1588 * An implementation statement that describes the aspects of the control or control statement implementation that a leveraging system must implement to satisfy the control provided by a leveraged system. 1589 * 1590 * @param value 1591 * the description value to set 1592 */ 1593 public void setDescription(@NonNull MarkupMultiline value) { 1594 _description = value; 1595 } 1596 1597 /** 1598 * Get the "{@literal Property}". 1599 * 1600 * <p> 1601 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1602 * 1603 * @return the prop value 1604 */ 1605 @NonNull 1606 public List<Property> getProps() { 1607 if (_props == null) { 1608 _props = new LinkedList<>(); 1609 } 1610 return ObjectUtils.notNull(_props); 1611 } 1612 1613 /** 1614 * Set the "{@literal Property}". 1615 * 1616 * <p> 1617 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1618 * 1619 * @param value 1620 * the prop value to set 1621 */ 1622 public void setProps(@NonNull List<Property> value) { 1623 _props = value; 1624 } 1625 1626 /** 1627 * Add a new {@link Property} item to the underlying collection. 1628 * @param item the item to add 1629 * @return {@code true} 1630 */ 1631 public boolean addProp(Property item) { 1632 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1633 if (_props == null) { 1634 _props = new LinkedList<>(); 1635 } 1636 return _props.add(value); 1637 } 1638 1639 /** 1640 * Remove the first matching {@link Property} item from the underlying collection. 1641 * @param item the item to remove 1642 * @return {@code true} if the item was removed or {@code false} otherwise 1643 */ 1644 public boolean removeProp(Property item) { 1645 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1646 return _props != null && _props.remove(value); 1647 } 1648 1649 /** 1650 * Get the "{@literal Link}". 1651 * 1652 * <p> 1653 * A reference to a local or remote resource, that has a specific relation to the containing object. 1654 * 1655 * @return the link value 1656 */ 1657 @NonNull 1658 public List<Link> getLinks() { 1659 if (_links == null) { 1660 _links = new LinkedList<>(); 1661 } 1662 return ObjectUtils.notNull(_links); 1663 } 1664 1665 /** 1666 * Set the "{@literal Link}". 1667 * 1668 * <p> 1669 * A reference to a local or remote resource, that has a specific relation to the containing object. 1670 * 1671 * @param value 1672 * the link value to set 1673 */ 1674 public void setLinks(@NonNull List<Link> value) { 1675 _links = value; 1676 } 1677 1678 /** 1679 * Add a new {@link Link} item to the underlying collection. 1680 * @param item the item to add 1681 * @return {@code true} 1682 */ 1683 public boolean addLink(Link item) { 1684 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1685 if (_links == null) { 1686 _links = new LinkedList<>(); 1687 } 1688 return _links.add(value); 1689 } 1690 1691 /** 1692 * Remove the first matching {@link Link} item from the underlying collection. 1693 * @param item the item to remove 1694 * @return {@code true} if the item was removed or {@code false} otherwise 1695 */ 1696 public boolean removeLink(Link item) { 1697 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1698 return _links != null && _links.remove(value); 1699 } 1700 1701 /** 1702 * Get the "{@literal Responsible Role}". 1703 * 1704 * <p> 1705 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 1706 * 1707 * @return the responsible-role value 1708 */ 1709 @NonNull 1710 public List<ResponsibleRole> getResponsibleRoles() { 1711 if (_responsibleRoles == null) { 1712 _responsibleRoles = new LinkedList<>(); 1713 } 1714 return ObjectUtils.notNull(_responsibleRoles); 1715 } 1716 1717 /** 1718 * Set the "{@literal Responsible Role}". 1719 * 1720 * <p> 1721 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 1722 * 1723 * @param value 1724 * the responsible-role value to set 1725 */ 1726 public void setResponsibleRoles(@NonNull List<ResponsibleRole> value) { 1727 _responsibleRoles = value; 1728 } 1729 1730 /** 1731 * Add a new {@link ResponsibleRole} item to the underlying collection. 1732 * @param item the item to add 1733 * @return {@code true} 1734 */ 1735 public boolean addResponsibleRole(ResponsibleRole item) { 1736 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1737 if (_responsibleRoles == null) { 1738 _responsibleRoles = new LinkedList<>(); 1739 } 1740 return _responsibleRoles.add(value); 1741 } 1742 1743 /** 1744 * Remove the first matching {@link ResponsibleRole} item from the underlying collection. 1745 * @param item the item to remove 1746 * @return {@code true} if the item was removed or {@code false} otherwise 1747 */ 1748 public boolean removeResponsibleRole(ResponsibleRole item) { 1749 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 1750 return _responsibleRoles != null && _responsibleRoles.remove(value); 1751 } 1752 1753 /** 1754 * Get the "{@literal Remarks}". 1755 * 1756 * <p> 1757 * Additional commentary about the containing object. 1758 * 1759 * @return the remarks value, or {@code null} if not set 1760 */ 1761 @Nullable 1762 public MarkupMultiline getRemarks() { 1763 return _remarks; 1764 } 1765 1766 /** 1767 * Set the "{@literal Remarks}". 1768 * 1769 * <p> 1770 * Additional commentary about the containing object. 1771 * 1772 * @param value 1773 * the remarks value to set, or {@code null} to clear 1774 */ 1775 public void setRemarks(@Nullable MarkupMultiline value) { 1776 _remarks = value; 1777 } 1778 1779 @Override 1780 public String toString() { 1781 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 1782 } 1783 } 1784 } 1785 1786 /** 1787 * Describes a control implementation inherited by a leveraging system. 1788 */ 1789 @MetaschemaAssembly( 1790 formalName = "Inherited Control Implementation", 1791 description = "Describes a control implementation inherited by a leveraging system.", 1792 name = "inherited", 1793 moduleClass = OscalSspModule.class, 1794 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-inherited-responsible-role", level = IConstraint.Level.ERROR, target = "responsible-role", keyFields = @KeyField(target = "@role-id"), remarks = "Since `responsible-role` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once.")) 1795 ) 1796 public static class Inherited implements IBoundObject { 1797 private final IMetaschemaData __metaschemaData; 1798 1799 /** 1800 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this inherited entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>inherited control implementation</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1801 */ 1802 @BoundFlag( 1803 formalName = "Inherited Universally Unique Identifier", 1804 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this inherited entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `inherited control implementation` can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same subject across revisions of the document.", 1805 name = "uuid", 1806 required = true, 1807 typeAdapter = UuidAdapter.class 1808 ) 1809 private UUID _uuid; 1810 1811 /** 1812 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system. 1813 */ 1814 @BoundFlag( 1815 formalName = "Provided UUID", 1816 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system.", 1817 name = "provided-uuid", 1818 typeAdapter = UuidAdapter.class 1819 ) 1820 private UUID _providedUuid; 1821 1822 /** 1823 * An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is inheriting from a leveraged system. 1824 */ 1825 @BoundField( 1826 formalName = "Inherited Control Implementation Description", 1827 description = "An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is inheriting from a leveraged system.", 1828 useName = "description", 1829 minOccurs = 1, 1830 typeAdapter = MarkupMultilineAdapter.class 1831 ) 1832 private MarkupMultiline _description; 1833 1834 /** 1835 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1836 */ 1837 @BoundAssembly( 1838 formalName = "Property", 1839 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 1840 useName = "prop", 1841 maxOccurs = -1, 1842 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 1843 ) 1844 private List<Property> _props; 1845 1846 /** 1847 * A reference to a local or remote resource, that has a specific relation to the containing object. 1848 */ 1849 @BoundAssembly( 1850 formalName = "Link", 1851 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 1852 useName = "link", 1853 maxOccurs = -1, 1854 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 1855 ) 1856 private List<Link> _links; 1857 1858 /** 1859 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 1860 */ 1861 @BoundAssembly( 1862 formalName = "Responsible Role", 1863 description = "A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role.", 1864 useName = "responsible-role", 1865 maxOccurs = -1, 1866 groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST) 1867 ) 1868 private List<ResponsibleRole> _responsibleRoles; 1869 1870 /** 1871 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Inherited} instance with no metadata. 1872 */ 1873 public Inherited() { 1874 this(null); 1875 } 1876 1877 /** 1878 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Inherited} instance with the specified metadata. 1879 * 1880 * @param data 1881 * the metaschema data, or {@code null} if none 1882 */ 1883 public Inherited(IMetaschemaData data) { 1884 this.__metaschemaData = data; 1885 } 1886 1887 @Override 1888 public IMetaschemaData getMetaschemaData() { 1889 return __metaschemaData; 1890 } 1891 1892 /** 1893 * Get the "{@literal Inherited Universally Unique Identifier}". 1894 * 1895 * <p> 1896 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this inherited entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>inherited control implementation</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1897 * 1898 * @return the uuid value 1899 */ 1900 @NonNull 1901 public UUID getUuid() { 1902 return _uuid; 1903 } 1904 1905 /** 1906 * Set the "{@literal Inherited Universally Unique Identifier}". 1907 * 1908 * <p> 1909 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this inherited entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>inherited control implementation</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 1910 * 1911 * @param value 1912 * the uuid value to set 1913 */ 1914 public void setUuid(@NonNull UUID value) { 1915 _uuid = value; 1916 } 1917 1918 /** 1919 * Get the "{@literal Provided UUID}". 1920 * 1921 * <p> 1922 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system. 1923 * 1924 * @return the provided-uuid value, or {@code null} if not set 1925 */ 1926 @Nullable 1927 public UUID getProvidedUuid() { 1928 return _providedUuid; 1929 } 1930 1931 /** 1932 * Set the "{@literal Provided UUID}". 1933 * 1934 * <p> 1935 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system. 1936 * 1937 * @param value 1938 * the provided-uuid value to set, or {@code null} to clear 1939 */ 1940 public void setProvidedUuid(@Nullable UUID value) { 1941 _providedUuid = value; 1942 } 1943 1944 /** 1945 * Get the "{@literal Inherited Control Implementation Description}". 1946 * 1947 * <p> 1948 * An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is inheriting from a leveraged system. 1949 * 1950 * @return the description value 1951 */ 1952 @NonNull 1953 public MarkupMultiline getDescription() { 1954 return _description; 1955 } 1956 1957 /** 1958 * Set the "{@literal Inherited Control Implementation Description}". 1959 * 1960 * <p> 1961 * An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is inheriting from a leveraged system. 1962 * 1963 * @param value 1964 * the description value to set 1965 */ 1966 public void setDescription(@NonNull MarkupMultiline value) { 1967 _description = value; 1968 } 1969 1970 /** 1971 * Get the "{@literal Property}". 1972 * 1973 * <p> 1974 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1975 * 1976 * @return the prop value 1977 */ 1978 @NonNull 1979 public List<Property> getProps() { 1980 if (_props == null) { 1981 _props = new LinkedList<>(); 1982 } 1983 return ObjectUtils.notNull(_props); 1984 } 1985 1986 /** 1987 * Set the "{@literal Property}". 1988 * 1989 * <p> 1990 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 1991 * 1992 * @param value 1993 * the prop value to set 1994 */ 1995 public void setProps(@NonNull List<Property> value) { 1996 _props = value; 1997 } 1998 1999 /** 2000 * Add a new {@link Property} item to the underlying collection. 2001 * @param item the item to add 2002 * @return {@code true} 2003 */ 2004 public boolean addProp(Property item) { 2005 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2006 if (_props == null) { 2007 _props = new LinkedList<>(); 2008 } 2009 return _props.add(value); 2010 } 2011 2012 /** 2013 * Remove the first matching {@link Property} item from the underlying collection. 2014 * @param item the item to remove 2015 * @return {@code true} if the item was removed or {@code false} otherwise 2016 */ 2017 public boolean removeProp(Property item) { 2018 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2019 return _props != null && _props.remove(value); 2020 } 2021 2022 /** 2023 * Get the "{@literal Link}". 2024 * 2025 * <p> 2026 * A reference to a local or remote resource, that has a specific relation to the containing object. 2027 * 2028 * @return the link value 2029 */ 2030 @NonNull 2031 public List<Link> getLinks() { 2032 if (_links == null) { 2033 _links = new LinkedList<>(); 2034 } 2035 return ObjectUtils.notNull(_links); 2036 } 2037 2038 /** 2039 * Set the "{@literal Link}". 2040 * 2041 * <p> 2042 * A reference to a local or remote resource, that has a specific relation to the containing object. 2043 * 2044 * @param value 2045 * the link value to set 2046 */ 2047 public void setLinks(@NonNull List<Link> value) { 2048 _links = value; 2049 } 2050 2051 /** 2052 * Add a new {@link Link} item to the underlying collection. 2053 * @param item the item to add 2054 * @return {@code true} 2055 */ 2056 public boolean addLink(Link item) { 2057 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2058 if (_links == null) { 2059 _links = new LinkedList<>(); 2060 } 2061 return _links.add(value); 2062 } 2063 2064 /** 2065 * Remove the first matching {@link Link} item from the underlying collection. 2066 * @param item the item to remove 2067 * @return {@code true} if the item was removed or {@code false} otherwise 2068 */ 2069 public boolean removeLink(Link item) { 2070 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2071 return _links != null && _links.remove(value); 2072 } 2073 2074 /** 2075 * Get the "{@literal Responsible Role}". 2076 * 2077 * <p> 2078 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 2079 * 2080 * @return the responsible-role value 2081 */ 2082 @NonNull 2083 public List<ResponsibleRole> getResponsibleRoles() { 2084 if (_responsibleRoles == null) { 2085 _responsibleRoles = new LinkedList<>(); 2086 } 2087 return ObjectUtils.notNull(_responsibleRoles); 2088 } 2089 2090 /** 2091 * Set the "{@literal Responsible Role}". 2092 * 2093 * <p> 2094 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 2095 * 2096 * @param value 2097 * the responsible-role value to set 2098 */ 2099 public void setResponsibleRoles(@NonNull List<ResponsibleRole> value) { 2100 _responsibleRoles = value; 2101 } 2102 2103 /** 2104 * Add a new {@link ResponsibleRole} item to the underlying collection. 2105 * @param item the item to add 2106 * @return {@code true} 2107 */ 2108 public boolean addResponsibleRole(ResponsibleRole item) { 2109 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2110 if (_responsibleRoles == null) { 2111 _responsibleRoles = new LinkedList<>(); 2112 } 2113 return _responsibleRoles.add(value); 2114 } 2115 2116 /** 2117 * Remove the first matching {@link ResponsibleRole} item from the underlying collection. 2118 * @param item the item to remove 2119 * @return {@code true} if the item was removed or {@code false} otherwise 2120 */ 2121 public boolean removeResponsibleRole(ResponsibleRole item) { 2122 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2123 return _responsibleRoles != null && _responsibleRoles.remove(value); 2124 } 2125 2126 @Override 2127 public String toString() { 2128 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 2129 } 2130 } 2131 2132 /** 2133 * Describes how this system satisfies a responsibility imposed by a leveraged system. 2134 */ 2135 @MetaschemaAssembly( 2136 formalName = "Satisfied Control Implementation Responsibility", 2137 description = "Describes how this system satisfies a responsibility imposed by a leveraged system.", 2138 name = "satisfied", 2139 moduleClass = OscalSspModule.class, 2140 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-satisfied-responsible-role", level = IConstraint.Level.ERROR, target = "responsible-role", keyFields = @KeyField(target = "@role-id"), remarks = "Since `responsible-role` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once.")) 2141 ) 2142 public static class Satisfied implements IBoundObject { 2143 private final IMetaschemaData __metaschemaData; 2144 2145 /** 2146 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this satisfied control implementation entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>control implementation</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 2147 */ 2148 @BoundFlag( 2149 formalName = "Satisfied Universally Unique Identifier", 2150 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this satisfied control implementation entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `control implementation` can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same subject across revisions of the document.", 2151 name = "uuid", 2152 required = true, 2153 typeAdapter = UuidAdapter.class 2154 ) 2155 private UUID _uuid; 2156 2157 /** 2158 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a control implementation that satisfies a responsibility imposed by a leveraged system. 2159 */ 2160 @BoundFlag( 2161 formalName = "Responsibility UUID", 2162 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a control implementation that satisfies a responsibility imposed by a leveraged system.", 2163 name = "responsibility-uuid", 2164 typeAdapter = UuidAdapter.class 2165 ) 2166 private UUID _responsibilityUuid; 2167 2168 /** 2169 * An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is implementing based on a requirement from a leveraged system. 2170 */ 2171 @BoundField( 2172 formalName = "Satisfied Control Implementation Responsibility Description", 2173 description = "An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is implementing based on a requirement from a leveraged system.", 2174 useName = "description", 2175 minOccurs = 1, 2176 typeAdapter = MarkupMultilineAdapter.class 2177 ) 2178 private MarkupMultiline _description; 2179 2180 /** 2181 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 2182 */ 2183 @BoundAssembly( 2184 formalName = "Property", 2185 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 2186 useName = "prop", 2187 maxOccurs = -1, 2188 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 2189 ) 2190 private List<Property> _props; 2191 2192 /** 2193 * A reference to a local or remote resource, that has a specific relation to the containing object. 2194 */ 2195 @BoundAssembly( 2196 formalName = "Link", 2197 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 2198 useName = "link", 2199 maxOccurs = -1, 2200 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 2201 ) 2202 private List<Link> _links; 2203 2204 /** 2205 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 2206 */ 2207 @BoundAssembly( 2208 formalName = "Responsible Role", 2209 description = "A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role.", 2210 useName = "responsible-role", 2211 maxOccurs = -1, 2212 groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST) 2213 ) 2214 private List<ResponsibleRole> _responsibleRoles; 2215 2216 /** 2217 * Additional commentary about the containing object. 2218 */ 2219 @BoundField( 2220 formalName = "Remarks", 2221 description = "Additional commentary about the containing object.", 2222 useName = "remarks", 2223 typeAdapter = MarkupMultilineAdapter.class 2224 ) 2225 private MarkupMultiline _remarks; 2226 2227 /** 2228 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Satisfied} instance with no metadata. 2229 */ 2230 public Satisfied() { 2231 this(null); 2232 } 2233 2234 /** 2235 * Constructs a new {@code dev.metaschema.oscal.lib.model.ByComponent.Satisfied} instance with the specified metadata. 2236 * 2237 * @param data 2238 * the metaschema data, or {@code null} if none 2239 */ 2240 public Satisfied(IMetaschemaData data) { 2241 this.__metaschemaData = data; 2242 } 2243 2244 @Override 2245 public IMetaschemaData getMetaschemaData() { 2246 return __metaschemaData; 2247 } 2248 2249 /** 2250 * Get the "{@literal Satisfied Universally Unique Identifier}". 2251 * 2252 * <p> 2253 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this satisfied control implementation entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>control implementation</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 2254 * 2255 * @return the uuid value 2256 */ 2257 @NonNull 2258 public UUID getUuid() { 2259 return _uuid; 2260 } 2261 2262 /** 2263 * Set the "{@literal Satisfied Universally Unique Identifier}". 2264 * 2265 * <p> 2266 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this satisfied control implementation entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>control implementation</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 2267 * 2268 * @param value 2269 * the uuid value to set 2270 */ 2271 public void setUuid(@NonNull UUID value) { 2272 _uuid = value; 2273 } 2274 2275 /** 2276 * Get the "{@literal Responsibility UUID}". 2277 * 2278 * <p> 2279 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a control implementation that satisfies a responsibility imposed by a leveraged system. 2280 * 2281 * @return the responsibility-uuid value, or {@code null} if not set 2282 */ 2283 @Nullable 2284 public UUID getResponsibilityUuid() { 2285 return _responsibilityUuid; 2286 } 2287 2288 /** 2289 * Set the "{@literal Responsibility UUID}". 2290 * 2291 * <p> 2292 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a control implementation that satisfies a responsibility imposed by a leveraged system. 2293 * 2294 * @param value 2295 * the responsibility-uuid value to set, or {@code null} to clear 2296 */ 2297 public void setResponsibilityUuid(@Nullable UUID value) { 2298 _responsibilityUuid = value; 2299 } 2300 2301 /** 2302 * Get the "{@literal Satisfied Control Implementation Responsibility Description}". 2303 * 2304 * <p> 2305 * An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is implementing based on a requirement from a leveraged system. 2306 * 2307 * @return the description value 2308 */ 2309 @NonNull 2310 public MarkupMultiline getDescription() { 2311 return _description; 2312 } 2313 2314 /** 2315 * Set the "{@literal Satisfied Control Implementation Responsibility Description}". 2316 * 2317 * <p> 2318 * An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is implementing based on a requirement from a leveraged system. 2319 * 2320 * @param value 2321 * the description value to set 2322 */ 2323 public void setDescription(@NonNull MarkupMultiline value) { 2324 _description = value; 2325 } 2326 2327 /** 2328 * Get the "{@literal Property}". 2329 * 2330 * <p> 2331 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 2332 * 2333 * @return the prop value 2334 */ 2335 @NonNull 2336 public List<Property> getProps() { 2337 if (_props == null) { 2338 _props = new LinkedList<>(); 2339 } 2340 return ObjectUtils.notNull(_props); 2341 } 2342 2343 /** 2344 * Set the "{@literal Property}". 2345 * 2346 * <p> 2347 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 2348 * 2349 * @param value 2350 * the prop value to set 2351 */ 2352 public void setProps(@NonNull List<Property> value) { 2353 _props = value; 2354 } 2355 2356 /** 2357 * Add a new {@link Property} item to the underlying collection. 2358 * @param item the item to add 2359 * @return {@code true} 2360 */ 2361 public boolean addProp(Property item) { 2362 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2363 if (_props == null) { 2364 _props = new LinkedList<>(); 2365 } 2366 return _props.add(value); 2367 } 2368 2369 /** 2370 * Remove the first matching {@link Property} item from the underlying collection. 2371 * @param item the item to remove 2372 * @return {@code true} if the item was removed or {@code false} otherwise 2373 */ 2374 public boolean removeProp(Property item) { 2375 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2376 return _props != null && _props.remove(value); 2377 } 2378 2379 /** 2380 * Get the "{@literal Link}". 2381 * 2382 * <p> 2383 * A reference to a local or remote resource, that has a specific relation to the containing object. 2384 * 2385 * @return the link value 2386 */ 2387 @NonNull 2388 public List<Link> getLinks() { 2389 if (_links == null) { 2390 _links = new LinkedList<>(); 2391 } 2392 return ObjectUtils.notNull(_links); 2393 } 2394 2395 /** 2396 * Set the "{@literal Link}". 2397 * 2398 * <p> 2399 * A reference to a local or remote resource, that has a specific relation to the containing object. 2400 * 2401 * @param value 2402 * the link value to set 2403 */ 2404 public void setLinks(@NonNull List<Link> value) { 2405 _links = value; 2406 } 2407 2408 /** 2409 * Add a new {@link Link} item to the underlying collection. 2410 * @param item the item to add 2411 * @return {@code true} 2412 */ 2413 public boolean addLink(Link item) { 2414 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2415 if (_links == null) { 2416 _links = new LinkedList<>(); 2417 } 2418 return _links.add(value); 2419 } 2420 2421 /** 2422 * Remove the first matching {@link Link} item from the underlying collection. 2423 * @param item the item to remove 2424 * @return {@code true} if the item was removed or {@code false} otherwise 2425 */ 2426 public boolean removeLink(Link item) { 2427 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2428 return _links != null && _links.remove(value); 2429 } 2430 2431 /** 2432 * Get the "{@literal Responsible Role}". 2433 * 2434 * <p> 2435 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 2436 * 2437 * @return the responsible-role value 2438 */ 2439 @NonNull 2440 public List<ResponsibleRole> getResponsibleRoles() { 2441 if (_responsibleRoles == null) { 2442 _responsibleRoles = new LinkedList<>(); 2443 } 2444 return ObjectUtils.notNull(_responsibleRoles); 2445 } 2446 2447 /** 2448 * Set the "{@literal Responsible Role}". 2449 * 2450 * <p> 2451 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 2452 * 2453 * @param value 2454 * the responsible-role value to set 2455 */ 2456 public void setResponsibleRoles(@NonNull List<ResponsibleRole> value) { 2457 _responsibleRoles = value; 2458 } 2459 2460 /** 2461 * Add a new {@link ResponsibleRole} item to the underlying collection. 2462 * @param item the item to add 2463 * @return {@code true} 2464 */ 2465 public boolean addResponsibleRole(ResponsibleRole item) { 2466 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2467 if (_responsibleRoles == null) { 2468 _responsibleRoles = new LinkedList<>(); 2469 } 2470 return _responsibleRoles.add(value); 2471 } 2472 2473 /** 2474 * Remove the first matching {@link ResponsibleRole} item from the underlying collection. 2475 * @param item the item to remove 2476 * @return {@code true} if the item was removed or {@code false} otherwise 2477 */ 2478 public boolean removeResponsibleRole(ResponsibleRole item) { 2479 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 2480 return _responsibleRoles != null && _responsibleRoles.remove(value); 2481 } 2482 2483 /** 2484 * Get the "{@literal Remarks}". 2485 * 2486 * <p> 2487 * Additional commentary about the containing object. 2488 * 2489 * @return the remarks value, or {@code null} if not set 2490 */ 2491 @Nullable 2492 public MarkupMultiline getRemarks() { 2493 return _remarks; 2494 } 2495 2496 /** 2497 * Set the "{@literal Remarks}". 2498 * 2499 * <p> 2500 * Additional commentary about the containing object. 2501 * 2502 * @param value 2503 * the remarks value to set, or {@code null} to clear 2504 */ 2505 public void setRemarks(@Nullable MarkupMultiline value) { 2506 _remarks = value; 2507 } 2508 2509 @Override 2510 public String toString() { 2511 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 2512 } 2513 } 2514}