org.kuali.student.contract.model.util
Class KradDictionaryCreator
java.lang.Object
org.kuali.student.contract.model.util.KradDictionaryCreator
public class KradDictionaryCreator
- extends Object
- Author:
- nwright
Method Summary |
private void |
addValue(String value)
|
private String |
calcBaseKualiType(MessageStructure ms)
|
private String |
calcBeanName(String name)
|
private String |
calcChildEntryName(MessageStructure ms)
|
private String |
calcDescription(MessageStructure ms)
|
private String |
calcLabel(MessageStructure ms)
|
private String |
calcName(String parentName,
MessageStructure ms)
|
private String |
calcObjectLabel()
|
private String |
calcParents(Stack<String> stack)
|
private List<String> |
calcPrimaryKeys()
|
private boolean |
calcReadOnly(MessageStructure ms)
|
private String |
calcRequired(MessageStructure ms)
|
private String |
calcShortLabel(MessageStructure ms)
|
private String |
calcSummary(MessageStructure ms)
|
private String |
calcTitleAttribute()
|
private String |
escapeHtml(String str)
|
private MessageStructure |
findMessageStructure(String shortName)
|
private MessageStructure |
findMessageStructureEndsWith(String shortNameEndsWith)
|
private MessageStructure |
getMessageStructure(String shortName)
|
private static String |
initLower(String str)
|
private static String |
initUpper(String str)
|
private void |
initXmlWriters()
|
private String |
replaceDoubleQuotes(String str)
|
private boolean |
shouldWriteDetails(MessageStructure ms)
|
private static String |
splitCamelCase(String s)
|
private String |
stripListOffEnd(String name)
|
void |
write()
|
private void |
writeGeneratedAttributeDefinition(String currentClassName,
String parentName,
MessageStructure ms,
XmlWriter out)
|
private void |
writeGeneratedAttributeDefinitions(String currentClassName,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
|
private void |
writeGeneratedAttributeRefBeans(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
|
private void |
writeGeneratedImports(XmlWriter out)
|
private void |
writeGeneratedObjectStructure(XmlWriter out)
|
private void |
writeManualAttributeDefinition(String currentClass,
String parentName,
MessageStructure ms,
XmlWriter out)
|
private void |
writeManualAttributeDefinitions(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
|
private void |
writeManualImports(XmlWriter out)
|
private void |
writeManualObjectStructure(XmlWriter out)
|
private void |
writeNote(XmlWriter out)
|
private void |
writeProperty(String propertyName,
String propertyValue,
XmlWriter out)
|
private void |
writePropertyValue(String propertyName,
String propertyValue,
XmlWriter out)
|
private void |
writeReadOnlyAttributeSecurity(XmlWriter out)
|
private void |
writeSpringHeaderClose(XmlWriter out)
|
private void |
writeSpringHeaderOpen(XmlWriter out)
|
private void |
writeSubStructures(XmlType type,
Stack<String> stack)
|
private void |
writeWarning(XmlWriter out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
private ServiceContractModel model
finder
private ModelFinder finder
directory
private String directory
className
private String className
xmlType
private XmlType xmlType
gwriter
private XmlWriter gwriter
mwriter
private XmlWriter mwriter
messageStructures
private List<MessageStructure> messageStructures
writeManual
private boolean writeManual
writeGenerated
private boolean writeGenerated
predefinedFieldMap
private static Map<String,String> predefinedFieldMap
- list of predefined fields that should map to entries in ks-base-dictionary.xml
endsWithMap
private static Map<String,String> endsWithMap
- list of fields that if they end with the key the should be based on the entry
in ks-base-dictionary.xml
typeMap
private static Map<String,String> typeMap
- list of types that if the type matches this key then
it should be based on that type entry as defined in the
ks-base-dictionary.xml
KradDictionaryCreator
public KradDictionaryCreator(String directory,
ServiceContractModel model,
String className,
boolean writeManual,
boolean writeGenerated)
write
public void write()
initXmlWriters
private void initXmlWriters()
initLower
private static String initLower(String str)
initUpper
private static String initUpper(String str)
writeSpringHeaderClose
private void writeSpringHeaderClose(XmlWriter out)
writeSpringHeaderOpen
private void writeSpringHeaderOpen(XmlWriter out)
writeWarning
private void writeWarning(XmlWriter out)
writeNote
private void writeNote(XmlWriter out)
writeGeneratedImports
private void writeGeneratedImports(XmlWriter out)
writeManualImports
private void writeManualImports(XmlWriter out)
stripListOffEnd
private String stripListOffEnd(String name)
writeSubStructures
private void writeSubStructures(XmlType type,
Stack<String> stack)
calcParents
private String calcParents(Stack<String> stack)
writeGeneratedObjectStructure
private void writeGeneratedObjectStructure(XmlWriter out)
addValue
private void addValue(String value)
calcObjectLabel
private String calcObjectLabel()
splitCamelCase
private static String splitCamelCase(String s)
writeGeneratedAttributeRefBeans
private void writeGeneratedAttributeRefBeans(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
writeGeneratedAttributeDefinitions
private void writeGeneratedAttributeDefinitions(String currentClassName,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
shouldWriteDetails
private boolean shouldWriteDetails(MessageStructure ms)
writeGeneratedAttributeDefinition
private void writeGeneratedAttributeDefinition(String currentClassName,
String parentName,
MessageStructure ms,
XmlWriter out)
calcBeanName
private String calcBeanName(String name)
calcName
private String calcName(String parentName,
MessageStructure ms)
calcChildEntryName
private String calcChildEntryName(MessageStructure ms)
calcReadOnly
private boolean calcReadOnly(MessageStructure ms)
writeReadOnlyAttributeSecurity
private void writeReadOnlyAttributeSecurity(XmlWriter out)
calcShortLabel
private String calcShortLabel(MessageStructure ms)
calcLabel
private String calcLabel(MessageStructure ms)
calcSummary
private String calcSummary(MessageStructure ms)
calcDescription
private String calcDescription(MessageStructure ms)
calcRequired
private String calcRequired(MessageStructure ms)
writeManualObjectStructure
private void writeManualObjectStructure(XmlWriter out)
writeManualAttributeDefinitions
private void writeManualAttributeDefinitions(String currentClass,
String parentName,
Stack<String> parents,
List<MessageStructure> fields,
XmlWriter out)
writeManualAttributeDefinition
private void writeManualAttributeDefinition(String currentClass,
String parentName,
MessageStructure ms,
XmlWriter out)
calcBaseKualiType
private String calcBaseKualiType(MessageStructure ms)
calcTitleAttribute
private String calcTitleAttribute()
findMessageStructureEndsWith
private MessageStructure findMessageStructureEndsWith(String shortNameEndsWith)
findMessageStructure
private MessageStructure findMessageStructure(String shortName)
getMessageStructure
private MessageStructure getMessageStructure(String shortName)
calcPrimaryKeys
private List<String> calcPrimaryKeys()
writeProperty
private void writeProperty(String propertyName,
String propertyValue,
XmlWriter out)
writePropertyValue
private void writePropertyValue(String propertyName,
String propertyValue,
XmlWriter out)
escapeHtml
private String escapeHtml(String str)
replaceDoubleQuotes
private String replaceDoubleQuotes(String str)
Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.