Coverage Report - org.kuali.student.common.ui.client.configurable.mvc.multiplicity.MultiplicityFieldConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
MultiplicityFieldConfiguration
0%
0/28
N/A
1
 
 1  
 package org.kuali.student.common.ui.client.configurable.mvc.multiplicity;
 2  
 
 3  
 import org.kuali.student.common.assembly.data.Metadata;
 4  
 import org.kuali.student.common.ui.client.configurable.mvc.binding.ModelWidgetBinding;
 5  
 import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo;
 6  
 
 7  
 public class MultiplicityFieldConfiguration {
 8  
     
 9  
     private String fieldPath;
 10  
     private MessageKeyInfo messageKeyInfo;
 11  
     private Metadata metadata;
 12  
     private MultiplicityFieldWidgetInitializer fieldWidgetInitializer;
 13  
     @SuppressWarnings("unchecked")
 14  
         private ModelWidgetBinding modelWidgetBinding;
 15  
     private boolean isRequired;
 16  0
         private boolean optional = false;
 17  
     
 18  
     public MultiplicityFieldConfiguration(
 19  
             String fieldPath,
 20  
             MessageKeyInfo messageKeyInfo,
 21  
             Metadata metadata,
 22  0
             MultiplicityFieldWidgetInitializer fieldWidgetInitializer) {
 23  0
         setFieldPath(fieldPath);
 24  0
         setMessageKeyInfo(messageKeyInfo);
 25  0
         setMetadata(metadata);
 26  0
         setFieldWidgetInitializer(fieldWidgetInitializer);
 27  0
     }
 28  
     
 29  
     public String getFieldPath() {
 30  0
         return fieldPath;
 31  
     }
 32  
     public void setFieldPath(String fieldPath) {
 33  0
         this.fieldPath = fieldPath;
 34  0
     }
 35  
     public MessageKeyInfo getMessageKeyInfo() {
 36  0
         return messageKeyInfo;
 37  
     }
 38  
     public void setMessageKeyInfo(MessageKeyInfo messageKeyInfo) {
 39  0
         this.messageKeyInfo = messageKeyInfo;
 40  0
     }
 41  
     public Metadata getMetadata() {
 42  0
         return metadata;
 43  
     }
 44  
     public void setMetadata(Metadata metadata) {
 45  0
         this.metadata = metadata;
 46  0
     }
 47  
     public MultiplicityFieldWidgetInitializer getFieldWidgetInitializer() {
 48  0
         return fieldWidgetInitializer;
 49  
     }
 50  
     public void setFieldWidgetInitializer(MultiplicityFieldWidgetInitializer fieldWidgetInitializer) {
 51  0
         this.fieldWidgetInitializer = fieldWidgetInitializer;
 52  0
     }
 53  
 
 54  
     public boolean isRequired() {
 55  0
         return isRequired;
 56  
     }
 57  
 
 58  
     public void setRequired(boolean isRequired) {
 59  0
         this.isRequired = isRequired;
 60  0
     }
 61  
 
 62  
         public void setModelWidgetBinding(ModelWidgetBinding modelWidgetBinding) {
 63  0
                 this.modelWidgetBinding = modelWidgetBinding;
 64  0
         }
 65  
 
 66  
         public ModelWidgetBinding getModelWidgetBinding() {
 67  0
                 return modelWidgetBinding;
 68  
         }
 69  
         
 70  
         
 71  
         /**
 72  
          * Sets the optional flag
 73  
          * Fields that are optional should not be displayed if there is no data in some cases,
 74  
          * it is up to the section implementation whether or not to honor this flag
 75  
          * @param optional
 76  
          */
 77  
         public void setOptional(boolean optional){
 78  0
                 this.optional = optional;
 79  0
         }
 80  
         
 81  
         /**
 82  
          * Fields that are optional should not be displayed if there is no data in some cases,
 83  
          * it is up to the section implementation whether or not to honor this flag
 84  
          */
 85  
         public boolean isOptional(){
 86  0
                 return optional;
 87  
         }
 88  
 }