Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2333

Project XML extensions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.M1
    • 4.2.M2
    • Modeler, Non-GUI Tools
    • 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

          Activity

            People

              ntimofeev Nikita Timofeev
              ntimofeev Nikita Timofeev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m