Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-4269

Provide a way to filter out elements which will be generated by exporter.

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Obsolete
    • Icon: Blocker Blocker
    • 3.3.x
    • 3.1.0.M1
    • hibernate
    • None

      Now exporter uses Configuration object to get for example pojo's for generation.
      After this it calls generation for each of them.
      We need to add some filter for this.

      First place for such injection is ArtifactCollector as developer can easily specify subclass of this class and set it to exporter.
      Also TemplateProducer which used for files generating always gets ArtifactCollector object in constructor from exporter and has access to it.
      I' going to add methods filter(Map context), setFilter(Filter) to ArtifactCollector class and call it when necessary in template producer.
      Method 'filter' by default will not filter out anything. Non default realizations should use context map to get any objects which is passed to template producer.

      Second variant is to add Filter field to Generic exporter and call for filtering in GenericExporter.exportPOJO() method(or in each realization of ModelIterator.process()).

      I prefer first way.

            manderse@redhat.com Max Andersen
            dgeraskov Dmitry Geraskov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: