001package gov.nist.secauto.oscal.lib.model; 002 003import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; 004import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultiline; 005import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultilineAdapter; 006import gov.nist.secauto.metaschema.core.model.IBoundObject; 007import gov.nist.secauto.metaschema.core.model.IMetaschemaData; 008import gov.nist.secauto.metaschema.core.model.constraint.IConstraint; 009import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValue; 010import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValues; 011import gov.nist.secauto.metaschema.databind.model.annotations.BoundField; 012import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; 013import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly; 014import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints; 015import java.lang.Override; 016import java.lang.String; 017import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 018import org.apache.commons.lang3.builder.ToStringStyle; 019 020/** 021 * Indicates the degree to which the a given control is implemented. 022 */ 023@MetaschemaAssembly( 024 formalName = "Implementation Status", 025 description = "Indicates the degree to which the a given control is implemented.", 026 name = "implementation-status", 027 moduleClass = OscalImplementationCommonModule.class 028) 029public class ImplementationStatus implements IBoundObject { 030 private final IMetaschemaData __metaschemaData; 031 032 /** 033 * "Identifies the implementation status of the control or control objective." 034 */ 035 @BoundFlag( 036 formalName = "Implementation State", 037 description = "Identifies the implementation status of the control or control objective.", 038 name = "state", 039 required = true, 040 typeAdapter = TokenAdapter.class, 041 valueConstraints = @ValueConstraints(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.")})) 042 ) 043 private String _state; 044 045 @BoundField( 046 formalName = "Remarks", 047 description = "Additional commentary about the containing object.", 048 useName = "remarks", 049 typeAdapter = MarkupMultilineAdapter.class 050 ) 051 private MarkupMultiline _remarks; 052 053 public ImplementationStatus() { 054 this(null); 055 } 056 057 public ImplementationStatus(IMetaschemaData data) { 058 this.__metaschemaData = data; 059 } 060 061 @Override 062 public IMetaschemaData getMetaschemaData() { 063 return __metaschemaData; 064 } 065 066 public String getState() { 067 return _state; 068 } 069 070 public void setState(String value) { 071 _state = value; 072 } 073 074 public MarkupMultiline getRemarks() { 075 return _remarks; 076 } 077 078 public void setRemarks(MarkupMultiline value) { 079 _remarks = value; 080 } 081 082 @Override 083 public String toString() { 084 return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString(); 085 } 086}