| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.student.contract.model; |
| 17 | |
|
| 18 | |
import java.util.ArrayList; |
| 19 | |
import java.util.List; |
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | 0 | public class OrchestrationObjectField { |
| 26 | |
|
| 27 | |
private OrchestrationObject parent; |
| 28 | |
private String name; |
| 29 | |
private String type; |
| 30 | |
|
| 31 | 0 | public enum FieldTypeCategory { |
| 32 | |
|
| 33 | 0 | PRIMITIVE, |
| 34 | 0 | MAPPED_STRING, |
| 35 | 0 | DYNAMIC_ATTRIBUTE, |
| 36 | 0 | COMPLEX, |
| 37 | 0 | COMPLEX_INLINE, |
| 38 | 0 | LIST_OF_PRIMITIVE, |
| 39 | 0 | LIST_OF_MAPPED_STRING, |
| 40 | 0 | LIST_OF_COMPLEX, |
| 41 | 0 | LIST_OF_COMPLEX_INLINE; |
| 42 | |
} |
| 43 | |
|
| 44 | |
public OrchestrationObject getParent() { |
| 45 | 0 | return parent; |
| 46 | |
} |
| 47 | |
|
| 48 | |
public void setParent(OrchestrationObject parent) { |
| 49 | 0 | this.parent = parent; |
| 50 | 0 | } |
| 51 | |
|
| 52 | |
public void setName(String name) { |
| 53 | 0 | this.name = name; |
| 54 | 0 | } |
| 55 | |
|
| 56 | |
public String getName() { |
| 57 | 0 | return name; |
| 58 | |
} |
| 59 | |
|
| 60 | |
public String getPropertyName() { |
| 61 | 0 | return name.substring(0, 1).toLowerCase() + name.substring(1); |
| 62 | |
} |
| 63 | |
|
| 64 | |
public String getProperName() { |
| 65 | 0 | return name.substring(0, 1).toUpperCase() + name.substring(1); |
| 66 | |
} |
| 67 | |
|
| 68 | |
public void setType(String type) { |
| 69 | 0 | this.type = type; |
| 70 | 0 | } |
| 71 | |
|
| 72 | |
public String getType() { |
| 73 | 0 | return type; |
| 74 | |
} |
| 75 | |
private FieldTypeCategory fieldTypeCategory; |
| 76 | |
|
| 77 | |
public FieldTypeCategory getFieldTypeCategory() { |
| 78 | 0 | return fieldTypeCategory; |
| 79 | |
} |
| 80 | |
|
| 81 | |
public void setFieldTypeCategory( |
| 82 | |
FieldTypeCategory fieldTypeCategory) { |
| 83 | 0 | this.fieldTypeCategory = fieldTypeCategory; |
| 84 | 0 | } |
| 85 | |
private OrchestrationObject inlineObject; |
| 86 | |
|
| 87 | |
public OrchestrationObject getInlineObject() { |
| 88 | 0 | return inlineObject; |
| 89 | |
} |
| 90 | |
|
| 91 | |
public void setInlineObject(OrchestrationObject inlineObject) { |
| 92 | 0 | this.inlineObject = inlineObject; |
| 93 | 0 | } |
| 94 | |
private List<TypeStateConstraint> constraints; |
| 95 | |
|
| 96 | |
public List<TypeStateConstraint> getConstraints() { |
| 97 | 0 | if (constraints == null) { |
| 98 | 0 | constraints = new ArrayList(); |
| 99 | |
} |
| 100 | 0 | return constraints; |
| 101 | |
} |
| 102 | |
|
| 103 | |
public void setConstraints(List<TypeStateConstraint> constraints) { |
| 104 | 0 | this.constraints = constraints; |
| 105 | 0 | } |
| 106 | |
private String defaultValue; |
| 107 | |
|
| 108 | |
public String getDefaultValue() { |
| 109 | 0 | return defaultValue; |
| 110 | |
} |
| 111 | |
|
| 112 | |
public void setDefaultValue(String defaultValue) { |
| 113 | 0 | this.defaultValue = defaultValue; |
| 114 | 0 | } |
| 115 | |
private String defaultValuePath; |
| 116 | |
|
| 117 | |
public String getDefaultValuePath() { |
| 118 | 0 | return defaultValuePath; |
| 119 | |
} |
| 120 | |
|
| 121 | |
public void setDefaultValuePath(String defaultValuePath) { |
| 122 | 0 | this.defaultValuePath = defaultValuePath; |
| 123 | 0 | } |
| 124 | |
|
| 125 | |
public String getFullyQualifiedName() { |
| 126 | |
|
| 127 | 0 | StringBuffer buf = new StringBuffer(); |
| 128 | 0 | buf.append(getParent().getName()); |
| 129 | 0 | buf.append("."); |
| 130 | 0 | buf.append(getProperName()); |
| 131 | 0 | return buf.toString(); |
| 132 | |
} |
| 133 | |
|
| 134 | 0 | public enum WriteAccess { |
| 135 | |
|
| 136 | 0 | ALWAYS, NEVER, ON_CREATE; |
| 137 | |
} |
| 138 | |
private WriteAccess writeAccess; |
| 139 | |
|
| 140 | |
public WriteAccess getWriteAccess() { |
| 141 | 0 | return writeAccess; |
| 142 | |
} |
| 143 | |
|
| 144 | |
public void setWriteAccess(WriteAccess writeAccess) { |
| 145 | 0 | this.writeAccess = writeAccess; |
| 146 | 0 | } |
| 147 | |
private String lookup; |
| 148 | |
|
| 149 | |
public String getLookup() { |
| 150 | 0 | return lookup; |
| 151 | |
} |
| 152 | |
|
| 153 | |
public void setLookup(String lookup) { |
| 154 | 0 | this.lookup = lookup; |
| 155 | 0 | } |
| 156 | |
private List<String> additionalLookups; |
| 157 | |
|
| 158 | |
public List<String> getAdditionalLookups() { |
| 159 | 0 | return additionalLookups; |
| 160 | |
} |
| 161 | |
|
| 162 | |
public void setAdditionalLookups(List<String> additionalLookups) { |
| 163 | 0 | this.additionalLookups = additionalLookups; |
| 164 | 0 | } |
| 165 | |
private String lookupContextPath; |
| 166 | |
|
| 167 | |
public String getLookupContextPath() { |
| 168 | 0 | return lookupContextPath; |
| 169 | |
} |
| 170 | |
|
| 171 | |
public void setLookupContextPath(String lookupContextPath) { |
| 172 | 0 | this.lookupContextPath = lookupContextPath; |
| 173 | 0 | } |
| 174 | |
private Integer maxRecursions; |
| 175 | |
|
| 176 | |
public Integer getMaxRecursions() { |
| 177 | 0 | return maxRecursions; |
| 178 | |
} |
| 179 | |
|
| 180 | |
public void setMaxRecursions(Integer maxRecursions) { |
| 181 | 0 | this.maxRecursions = maxRecursions; |
| 182 | 0 | } |
| 183 | |
} |