Commit 8579409
MAJOR ARCHITECTURAL REFACTORING: Service Provider Pattern + ValidationContext Elimination
Complete simplification of service provider architecture from overcomplicated Service classes
to direct delegation pattern with existing MetaData classes:
🗑️ **DELETED OVERCOMPLICATED ARCHITECTURE:**
• Deleted entire database-common module (incorrectly created)
• Deleted 7 Service classes (XSDGeneratorService, JsonSchemaGeneratorService, AIDocGeneratorService,
DatabaseService, WebService, ObjectCreationService, IOService)
• Removed all unnecessary service abstraction layers
✅ **SIMPLIFIED PROVIDER DELEGATION PATTERN:**
• CodeGenMetaDataProvider → delegates to MetaDataFileXSDGenerator, MetaDataFileJsonSchemaGenerator, MetaDataAIDocumentationGenerator
• CoreMetaDataProvider → delegates to XMLObjectWriter, XMLMetaDataWriter
• WebMetaDataProvider → delegates to WebView, TextView, DateView, TextAreaView
• CoreDBMetaDataProvider → moved to metadata module, contains common DB attributes for JPA + ObjectManagerDB
• CoreObjectsMetaDataProvider → added for DataObject/ValueObject extensions in core module
📋 **STATIC REGISTRATION METHODS ADDED:**
• MetaDataFileXSDGenerator.registerXSDAttributes() - XSD generation constants & attributes
• MetaDataFileJsonSchemaGenerator.registerJsonSchemaAttributes() - JSON Schema constants & attributes
• MetaDataAIDocumentationGenerator.registerAIDocAttributes() - AI documentation constants & attributes
• XMLObjectWriter.registerXMLObjectAttributes() - XML serialization constants & attributes
• XMLMetaDataWriter.registerXMLMetaDataAttributes() - XML metadata constants & attributes
• WebView.registerWebViewAttributes() - Base web view constants & attributes
• TextView.registerTextViewAttributes() - Text input constants & attributes
• DateView.registerDateViewAttributes() - Date picker constants & attributes
• TextAreaView.registerTextAreaViewAttributes() - Text area constants & attributes
🏗️ **CONSTANTS-BASED ARCHITECTURE:**
• All attribute constants live in the classes that actually use them
• XSD_NAMESPACE, XSD_ELEMENT_NAME, JSON_TITLE, JSON_FORMAT constants
• XML_ELEMENT_NAME, XML_NAMESPACE, WEB_LABEL, WEB_PLACEHOLDER constants
• DB_TABLE, DB_COLUMN, DB_NULLABLE, DB_PRIMARY_KEY constants
• TEXT_MAX_LENGTH, DATE_FORMAT, TEXTAREA_COLS constants
✅ **VERIFICATION:**
• Service discovery working: "Loading 2 MetaDataTypeProvider services"
• 35 total types registered with extended attributes
• StringField now supports: dbColumn, dbNullable, dbPrimaryKey, etc.
• Clean compilation across all modules
• All Provider classes delegate to existing classes successfully
**Architecture is now clean, maintainable, and follows correct service provider delegation patterns.**
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 911dfad commit 8579409
29 files changed
Lines changed: 539 additions & 2499 deletions
File tree
- codegen-base/src/main/java/com/draagon/meta/generator
- direct/metadata
- ai
- file
- json
- xsd
- service
- core/src/main
- java/com/draagon/meta
- core
- io
- object/xml
- service
- xml
- object/service
- resources/META-INF/services
- database-common
- src/main
- java/com/draagon/meta/database
- common
- service
- resources/META-INF/services
- metadata/src/main
- java/com/draagon/meta/database
- resources/META-INF/services
- web/src/main/java/com/draagon/meta/web
- service
- view
- html
Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
144 | 194 | | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
78 | 129 | | |
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
76 | 110 | | |
0 commit comments