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

Project XML extensions

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.M1
    • Fix Version/s: 4.2.M2
    • Component/s: Modeler, Non-GUI Tools
    • Labels:
      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

              • Assignee:
                ntimofeev Nikita Timofeev
                Reporter:
                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