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.List; |
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | 0 | public class OrchestrationObject { |
25 | |
|
26 | 0 | public enum Source { |
27 | |
|
28 | 0 | MESSAGE_STRUCTURE, ORCH_OBJS; |
29 | |
} |
30 | |
private List<OrchestrationObjectField> fields; |
31 | |
private String name; |
32 | |
|
33 | |
public void setName(String name) { |
34 | 0 | this.name = name; |
35 | 0 | } |
36 | |
|
37 | |
public String getName() { |
38 | 0 | return name; |
39 | |
} |
40 | |
|
41 | |
public void setFields(List<OrchestrationObjectField> fields) { |
42 | 0 | this.fields = fields; |
43 | 0 | } |
44 | |
|
45 | |
public List<OrchestrationObjectField> getFields() { |
46 | 0 | return fields; |
47 | |
} |
48 | |
private boolean hasOwnCreateUpdate; |
49 | |
|
50 | |
public boolean hasOwnCreateUpdate() { |
51 | 0 | return hasOwnCreateUpdate; |
52 | |
} |
53 | |
|
54 | |
public void setHasOwnCreateUpdate(boolean hasOwnCreateUpdate) { |
55 | 0 | this.hasOwnCreateUpdate = hasOwnCreateUpdate; |
56 | 0 | } |
57 | |
private OrchestrationObjectField inlineField; |
58 | |
|
59 | |
public OrchestrationObjectField getInlineField() { |
60 | 0 | return inlineField; |
61 | |
} |
62 | |
|
63 | |
public void setInlineField(OrchestrationObjectField inlineField) { |
64 | 0 | this.inlineField = inlineField; |
65 | 0 | } |
66 | |
private String orchestrationPackagePath; |
67 | |
|
68 | |
public String getOrchestrationPackagePath() { |
69 | 0 | return orchestrationPackagePath; |
70 | |
} |
71 | |
|
72 | |
public void setOrchestrationPackagePath(String packagePath) { |
73 | 0 | this.orchestrationPackagePath = packagePath; |
74 | 0 | } |
75 | |
private String infoPackagePath; |
76 | |
|
77 | |
public String getInfoPackagePath() { |
78 | 0 | return infoPackagePath; |
79 | |
} |
80 | |
|
81 | |
public void setInfoPackagePath(String infoPackagePath) { |
82 | 0 | this.infoPackagePath = infoPackagePath; |
83 | 0 | } |
84 | |
|
85 | |
public String getJavaClassInfoName() { |
86 | 0 | return name.substring(0, 1).toUpperCase() + name.substring(1); |
87 | |
} |
88 | |
|
89 | |
public String getFullyQualifiedJavaClassInfoName() { |
90 | 0 | return this.infoPackagePath + "." + this.getJavaClassInfoName(); |
91 | |
} |
92 | |
|
93 | |
public String getJavaClassHelperName() { |
94 | 0 | if (inlineField == null) { |
95 | 0 | return getJavaClassInfoName() + "Helper"; |
96 | |
} |
97 | 0 | return inlineField.getParent().getJavaClassInfoName() |
98 | |
+ getJavaClassInfoName() + "Helper"; |
99 | |
} |
100 | |
|
101 | |
public String getFullyQualifiedJavaClassHelperName() { |
102 | 0 | return orchestrationPackagePath + "." + getJavaClassHelperName(); |
103 | |
} |
104 | |
|
105 | |
public String getJavaClassConstantsName() { |
106 | 0 | if (inlineField == null) { |
107 | 0 | return getJavaClassInfoName() + "Constants"; |
108 | |
} |
109 | 0 | return inlineField.getParent().getJavaClassInfoName() |
110 | |
+ getJavaClassInfoName() + "Constants"; |
111 | |
} |
112 | |
|
113 | |
public String getFullyQualifiedJavaClassConstantsName() { |
114 | 0 | return orchestrationPackagePath + "." + getJavaClassConstantsName(); |
115 | |
} |
116 | |
|
117 | |
public String getJavaClassMetadataName() { |
118 | 0 | if (inlineField == null) { |
119 | 0 | return getJavaClassInfoName() + "Metadata"; |
120 | |
} |
121 | 0 | return inlineField.getParent().getJavaClassInfoName() |
122 | |
+ getJavaClassInfoName() + "Metadata"; |
123 | |
} |
124 | |
|
125 | |
public String getFullyQualifiedJavaClassMetadataName() { |
126 | 0 | return orchestrationPackagePath + "." + getJavaClassMetadataName(); |
127 | |
} |
128 | |
|
129 | |
public String getJavaClassAssemblerName() { |
130 | 0 | if (inlineField == null) { |
131 | 0 | return getJavaClassInfoName() + "Assembler"; |
132 | |
} |
133 | 0 | return inlineField.getParent().getJavaClassInfoName() |
134 | |
+ getJavaClassInfoName() + "Assembler"; |
135 | |
} |
136 | |
|
137 | |
public String getFullyQualifiedJavaClassAssemblerName() { |
138 | 0 | return orchestrationPackagePath + ".assembler." + getJavaClassAssemblerName(); |
139 | |
} |
140 | |
private Source source; |
141 | |
|
142 | |
public Source getSource() { |
143 | 0 | return source; |
144 | |
} |
145 | |
|
146 | |
public void setSource(Source source) { |
147 | 0 | this.source = source; |
148 | 0 | } |
149 | |
} |