001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_implementation-common_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.TokenAdapter; 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.constraint.IConstraint; 011import dev.metaschema.core.util.ObjectUtils; 012import dev.metaschema.databind.model.annotations.AllowedValue; 013import dev.metaschema.databind.model.annotations.AllowedValues; 014import dev.metaschema.databind.model.annotations.BoundField; 015import dev.metaschema.databind.model.annotations.BoundFlag; 016import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 017import dev.metaschema.databind.model.annotations.ValueConstraints; 018import edu.umd.cs.findbugs.annotations.NonNull; 019import edu.umd.cs.findbugs.annotations.Nullable; 020import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 021import org.apache.commons.lang3.builder.ToStringStyle; 022 023/** 024 * Indicates the degree to which the a given control is implemented. 025 */ 026@MetaschemaAssembly( 027 formalName = "Implementation Status", 028 description = "Indicates the degree to which the a given control is implemented.", 029 name = "implementation-status", 030 moduleClass = OscalImplementationCommonModule.class 031) 032public class ImplementationStatus implements IBoundObject { 033 private final IMetaschemaData __metaschemaData; 034 035 /** 036 * Identifies the implementation status of the control or control objective. 037 */ 038 @BoundFlag( 039 formalName = "Implementation State", 040 description = "Identifies the implementation status of the control or control objective.", 041 name = "state", 042 required = true, 043 typeAdapter = TokenAdapter.class, 044 valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-implementation-status-values", 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.")})) 045 ) 046 private String _state; 047 048 /** 049 * Additional commentary about the containing object. 050 */ 051 @BoundField( 052 formalName = "Remarks", 053 description = "Additional commentary about the containing object.", 054 useName = "remarks", 055 typeAdapter = MarkupMultilineAdapter.class 056 ) 057 private MarkupMultiline _remarks; 058 059 /** 060 * Constructs a new {@code dev.metaschema.oscal.lib.model.ImplementationStatus} instance with no metadata. 061 */ 062 public ImplementationStatus() { 063 this(null); 064 } 065 066 /** 067 * Constructs a new {@code dev.metaschema.oscal.lib.model.ImplementationStatus} instance with the specified metadata. 068 * 069 * @param data 070 * the metaschema data, or {@code null} if none 071 */ 072 public ImplementationStatus(IMetaschemaData data) { 073 this.__metaschemaData = data; 074 } 075 076 @Override 077 public IMetaschemaData getMetaschemaData() { 078 return __metaschemaData; 079 } 080 081 /** 082 * Get the "{@literal Implementation State}". 083 * 084 * <p> 085 * Identifies the implementation status of the control or control objective. 086 * 087 * @return the state value 088 */ 089 @NonNull 090 public String getState() { 091 return _state; 092 } 093 094 /** 095 * Set the "{@literal Implementation State}". 096 * 097 * <p> 098 * Identifies the implementation status of the control or control objective. 099 * 100 * @param value 101 * the state value to set 102 */ 103 public void setState(@NonNull String value) { 104 _state = value; 105 } 106 107 /** 108 * Get the "{@literal Remarks}". 109 * 110 * <p> 111 * Additional commentary about the containing object. 112 * 113 * @return the remarks value, or {@code null} if not set 114 */ 115 @Nullable 116 public MarkupMultiline getRemarks() { 117 return _remarks; 118 } 119 120 /** 121 * Set the "{@literal Remarks}". 122 * 123 * <p> 124 * Additional commentary about the containing object. 125 * 126 * @param value 127 * the remarks value to set, or {@code null} to clear 128 */ 129 public void setRemarks(@Nullable MarkupMultiline value) { 130 _remarks = value; 131 } 132 133 @Override 134 public String toString() { 135 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 136 } 137}