001package gov.nist.secauto.oscal.lib.model; 002 003import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValue; 004import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValues; 005import gov.nist.secauto.metaschema.binding.model.annotations.BoundField; 006import gov.nist.secauto.metaschema.binding.model.annotations.BoundFieldValue; 007import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag; 008import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly; 009import gov.nist.secauto.metaschema.binding.model.annotations.ValueConstraints; 010import gov.nist.secauto.metaschema.model.common.constraint.IConstraint; 011import gov.nist.secauto.metaschema.model.common.datatype.adapter.TokenAdapter; 012import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline; 013import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilineAdapter; 014import java.lang.Override; 015import java.lang.String; 016import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle; 017import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 018 019/** 020 * Indicates the degree to which the a given control is implemented. 021 */ 022@MetaschemaAssembly( 023 formalName = "Implementation Status", 024 description = "Indicates the degree to which the a given control is implemented.", 025 name = "implementation-status", 026 metaschema = OscalImplementationCommonMetaschema.class 027) 028public class ImplementationStatus { 029 @BoundFlag( 030 formalName = "Implementation State", 031 description = "Identifies the implementation status of the control or control objective.", 032 useName = "state", 033 required = true, 034 typeAdapter = TokenAdapter.class 035 ) 036 @ValueConstraints( 037 allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = {@AllowedValue(value = "implemented", description = "The control is fully implemented."), @AllowedValue(value = "partial", description = "The control is partially implemented."), @AllowedValue(value = "planned", description = "There is a plan for implementing the control as explained in the remarks."), @AllowedValue(value = "alternative", description = "There is an alternative implementation for this control as explained in the remarks."), @AllowedValue(value = "not-applicable", description = "This control does not apply to this system as justified in the remarks.")}) 038 ) 039 private String _state; 040 041 @BoundField( 042 formalName = "Remarks", 043 description = "Additional commentary about the containing object.", 044 useName = "remarks" 045 ) 046 @BoundFieldValue( 047 typeAdapter = MarkupMultilineAdapter.class 048 ) 049 private MarkupMultiline _remarks; 050 051 public ImplementationStatus() { 052 } 053 054 public String getState() { 055 return _state; 056 } 057 058 public void setState(String value) { 059 _state = value; 060 } 061 062 public MarkupMultiline getRemarks() { 063 return _remarks; 064 } 065 066 public void setRemarks(MarkupMultiline value) { 067 _remarks = value; 068 } 069 070 @Override 071 public String toString() { 072 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString(); 073 } 074}