Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.1.M1
-
None
Description
Cayenne need flexible project XML extensions mechanism to allow attach some meta information to project, that will not affect runtime.
Use cases can be following:
- General comments for entities, attributes and relationships
- Reverse engineering config
- Cgen config
- ER and Class diagram
Possible linked tasks CAY-400 and CAY-56
Here is main API for project extensions:
public interface ProjectExtension { /** * @return delegate that handle loading phase of XML processing */ LoaderDelegate createLoaderDelegate(); /** * @return delegate that handle saving phase of XML processing */ SaverDelegate createSaverDelegate(); } public interface LoaderDelegate { /** * @return target namespace that this extension is using */ String getTargetNamespace(); /** * Create handler that will handle parsing process further. */ NamespaceAwareNestedTagHandler createHandler(NamespaceAwareNestedTagHandler parent, String tag); } public interface SaverDelegate extends ConfigurationNodeVisitor<Void> { /** * @param encoder provided by caller */ void setXMLEncoder(XMLEncoder encoder); void setParentDelegate(SaverDelegate parentDelegate); SaverDelegate getParentDelegate(); }
Extension can be contributed via ProjectModule.contributeExtensions(Binder) method.
Attachments
Issue Links
- incorporates
-
CAY-2493 Save cgen configuration with datamap XML
- Closed
There are no Sub-Tasks for this issue.