Changelog

4.3.0

Added

  • [experimental] The field option defaultValue will provide a default field value for all new instances. E.g. add defaultValue: true to a Boolean field to set it to true by default or add defaultValue: 'new name' to a String field to provide ‘new name’ as initial value.

Changed

  • Expanders now require Java 8+
  • Struts Expanders now target either Struts 2.3 or Struts 2.5, with Struts 2.5 being the default
    • to use struts 2.3, add applicationInstanceOption struts.version with value 2.3
    • requires nsx-runtime, baseComponents, and prime-data 2020.5.0+
  • Soft delete on modify with disabled=yes is now opt-in behind applicationInstanceOption('cruds.softDeleteOnModify')

Fixed

  • Applicable layers, layer implementation technologies, and library technologies are now properly filtered when building POM dependency/dependencyManagement lists.

Removed

  • Removed Struts2View feature for unused Struts view layer

4.2.7

Added

  • New anchors in BeanExpander (CsvFeature):
    • anchor:custom-post-import
    • anchor:custom-post-export
    • anchor:custom-import-unsupported
    • anchor:custom-export-unsupported
  • New anchors in CsvExporterImplExpander:
    • anchor:custom-post-export
    • anchor:custom-map-instance
  • New anchors in CsvImporterImplExpander:
    • anchor:custom-post-import
    • anchor:custom-post-persist

Changed

  • Methods importFile() and export() in bean now define an importResult or exportResult, which is returned at the end of the method. This allows for new anchors. Though usual customisations should not be broken, it might be worthwhile to check whether the code may need to be cleaned up.

4.2.4

Added

  • custom-access-info-stack and custom-access-info-default-style-stack anchors added to account security stack in struts header xml.

Changed

  • Loosened encoding generated artifacts.

4.2.2

Changed

  • ioxml client expanders now use CliParser from nsx-runtime/nsx-shared-cli
  • Moved initialization of agent in CommandPerformer to prepare method to allow custom interceptors to provide an alternative UserContext.
  • Adjusted the encoding so that all templates are read as UTF-8 and all artifacts are generated to the same encoding.

Added

  • Struts field errors are now translated to CommandResult errors in the CommandPerformer action class.
    • Disable with applicationInstance option struts.disableStrutsErrorsToCommandResult.

4.2.1

Changed

  • If the field option generateUuid is given the value if_empty, the field will only be set with a new UUID (on create) if the field was empty.
  • Expanded EditorConfig now includes support for .html files.

4.2.0

Added

  • Added runExpansionStep() method to ExpanderTester and FeatureTester to run expansionSteps before testing. This can be useful if the expansionStep adds an option to the model or applies some other modification necessary for the test.
  • Projection pojo’s getDataRef() methods now return typed DataRef classes if functionalKey is defined
  • Otherwise, the getDataRef() methods return DataRefs with component, packageName and className filled in
  • EditorConfig file, which is applied to all gen (and gen_test) folders to ensure a consistent code formatting. This can be disabled using the ApplicationInstance option editorconfig.disabled. The rules can also be applied globally (also to ext and test) using the ApplicationInstance option editorconfig.global.
  • The field option generateUuid will inject code to generate a new UUID in the create-afterProjection feature anchor of the cruds create method. This will ensure that a new UUID is generated and stored for these fields when an instance of the DataElement is created. The option is applicable to fields with a String or byte[] storage type.
  • For all active technologies a gen_test folder will be expanded with java and resources subfolders to allow expanders to expand unit tests that can be harvested.

Changed

  • Struts Expanders now target Struts-2.5
    • requires baseComponents 2020.2.0+ and nsx-runtime 2020.2.0+
  • Behavior of suffix parameter for feature anchors is now the same as the behavior of the suffix parameter in inline feature anchors. This means that the suffix will now be placed only after the last feature injected. The separator parameter is now also available, which places the separator in between all features. The combination of the separator and suffix parameters will mimic the previous behavior suffix, where it was placed after every injected feature. A prefix parameter was also added just as it is available in inline feature anchors. The prefix is placed in front of the first feature. E.g. @anchor:featurename(suffix : ', ')' is now @anchor:featurename(separator : ', ', suffix : ', ')'.

Fixed

  • Fixed bug in ExpansionJobManager that in some occasions would skip additional tasks added by additionalExpansionStep.

4.1.1.1

Fixed

  • Fixed issue with manyToMany fields in old UI. The issue was caused by initializing the fields incorrectly in the <dataElement>-ko-mapper.js scripts.

4.1.1

Fixed

  • Fixed TaskElement Proxy using getTaskRemoteName for LOCAL-only lookup

4.1.0

Removed

  • Pre-rewrite (< v4.0.0) expander classes have been removed. If they are necessary nonetheless, add a expanders 3.2.1.7 or lower to the classpath

Added

  • Added before-harvest and after-harvest phases to the harvest runner.
  • Added ExpansionStepTester class to facilitate the implementation of tests of applicability conditions for additional expansion steps.
  • Added custom-annotations-getter-id and custom-annotations-setter-id anchors in Data class.

Changed

  • <Element>Cruds::project() now takes Context as input and only Data objects of the correct DataElement
  • Removed noCache result parameters from StrutsElementExpander. To reinsert them, use applicationInstance option struts.useNoCacheResult. These parameters have been removed because they overwrote the behaviour of the NoCachingInterceptor, which is more complete.
  • Value field type pojo comparison will now use identity comparison by default
  • Value field type pojo now provides a default hashcode function. Any custom implementation needs to be moved into the custom anchors. This can be disabled by adding componentOption valueFieldType.disableHashCodeMethod.
  • Table names are now escaped in the @Table annotations in the Data classes. This prevents collisions with reserved words in certain databases, such as User in SQL Server. This behavior can be disabled with the ApplicationInstanceOption db.schema.disableEscapeTableName.

Fixed

  • ValueFieldTypePojoExpander now only runs if valueFieldType.customTransportClass is false
  • Classes interacting with trees will now use the actual field name for children instead of the name of the child dataElement.
  • Fixed names for abbreviations in translation files (e.g. ‘ETB’ instead of ‘e t b’)
  • CALCULATED_FIELD with isRequired are no longer added to Projector’s checkRequired()
  • CALCULATED_FIELD with custom valueFieldType now correctly returns valueTypeClass in Cruds
  • @expanderComment in test STG templates is no longer tied to specific comment formats

4.0.9.1

Fixed

  • Added missing imports for FunctionalKeyDataRefExpander
  • Functional key dataRefs toString() methods now return "" when on errors
  • Functional key dataRefs toString() methods will null-check values before converting to avoid nullPointerExceptions and “null” strings

4.0.9

Added

  • Added expanderResource name to expanderComment
    • e.g. <!-- expanded with nsx-expanders:4.0.9-SNAPSHOT, expansionResource org.normalizedsystems:sand-castle-expanders:1.0-SNAPSHOT -->
  • [experimental] Updated java-mapped ArtifactPath
    • toggled by -Dexpanders.artifactPathBuilder.useJavaMapping=true|false (false by default)
  • [experimental] Updated mapping cache corrupting XML stacktrace (disabled in 4.0.7.2)
    • toggled by -Dexpanders.mappingReader|mappingFactory.useCache=true|false (both false by default)
  • [experimental] Stop expansion on first error instead of collecting all failures first
    • toggled by -Dexpanders.expansion.failFast=true|false (false by default)
  • Added basic test-template caching

Fixed

  • Expander/… Tester method lookup now searches for org.junit.Test or org.junit.jupiter.api.Test annotated method in stacktrace

4.0.8.2

Changed

  • Always use prime-data’s expansionResource.xml

4.0.8.1

Fixed

  • Fixed <elementTypeName>any</elementTypeName> failing type validation

4.0.8

Fixed

  • CompositeFinderExpander: removed exception for dataElements with a parent which does not have a reverse field and replaced it with a customizable method

Added

  • New anchors to StateTransitioner:

    • anchor:custom-interim-before
    • anchor:custom-interim-error
    • anchor:custom-interim-after
    • anchor:custom-failed-before
    • anchor:custom-failed-error
    • anchor:custom-failed-after
    • anchor:custom-end-before
    • anchor:custom-end-error
    • anchor:custom-end-after
    • anchor:custom-revert-before
    • anchor:custom-revert-error
    • anchor:custom-revert-after
  • New anchors to DataRefConverterExpander:

    • anchor:custom-formatX

Changed

  • Extracted creation and update of TaskStatus instances in StateTransioner to WorkflowTaskStatus feature

4.0.7.7

Changed

  • Updated dependencies

4.0.7.6

Fixed

  • Added encoding of the HTML document to artifacts generated by PageHtmlExpander and IoPageHtmlExpander
  • Fixed indent of PageHtmlExpander

Added

  • New anchors to PageHtmlExpander and IoPageHtmlExpander:

    • anchor:custom-head
    • anchor:custom-script

4.0.7.5

Added

  • Added SVG comment format

Fixed

  • Fixed expansion and harvest directories using applicationInstance.shortName instead of application.shortName
  • <Composite>ExpansionContext is now validated against <expanderComposite.elementTypeName>

4.0.7.4

Notes

  • version skipped

4.0.7.3

Added

  • Added artifactModifiers field to Expander which allows variables to be defined in ognl which can be used in the artifactName and Path

    Example of how to use it:

<expander name="...">
 <!--...-->
 <artifactModifiers>#{ 
  'postfix' : taskElement.getOption('useLocalInterfaceName').defined ? 'Local' : 'Remote' 
  }
 </artifactModifiers>
 <artifactName>$taskElement.name$$postfix$.java </artifactName>
</expander>
  • Field elements are now expandable

4.0.7.2

Fixed

  • Disabled caching of mapping files to prevent stacktrace from being corrupted

4.0.7.1

Added

  • DataExpander now adds length property for BigString
    • @Column(columnDefinition="varchar(X)") becomes @Column(columnDefinition="varchar(X)", length = X)

Removed

  • Obsoleted JaxRs struts features

4.0.7

Added

  • [testing] Added dependency on expanded onion specs
  • [testing] Use expanded ExpansionContext factories for tests setup

Changed

  • [testing] Default application and component expansion directories are C:/APPLICATION_ROOT and C:/COMPONENT_ROOT

4.0.6.3

Fixed

  • CommandFormHtmlExpander now correctly expands Ln03/Ln06 fields
  • CommandPojoExpander initializes collections fields to placate struts

4.0.6.2

Changed

  • Deprecated (original) hand-written onion specs

4.0.6.1

Added

  • Implemented disableExpansionTrace expansionOption to speed up expansion. This disables the gathering of meta-data, used by the codeImport, reporting and nsx-model-querying.

Changed

  • Errors in cruds are now logged at ERROR level instead of INFO.
    • To revert the behavior, use applicationInstanceOption logging.cruds.degradeErrorToInfo. Note that this option will be eventually removed.

4.0.6

Added

  • new anchors in net.democritus.expander.knockout.dataElement.SortingJsExpander:

    • anchor:custom-variables
    • anchor:custom-sorting-columns
    • anchor:custom-get-sort-fields
    • anchor:custom-after

4.0.5.3

Added

  • new anchor in net.democritus.expander.common.projection.DataRefProjectorExpander:

    • anchor:custom-toData-setters

4.0.5.2

Fixed

  • Remove duplicate anchor in CrudsExpander:

    • anchor:custom-variables

4.0.5.1

Fixed

  • Downgrade persistence.xml version for JOnAS server

4.0.5

Added

  • new anchor in net.democritus.expander.ejb3.serviceElement.EngineBeanExpander:

    • anchor:custom-after-loop
  • new anchors in net.democritus.expander.common.projection.ProjectorExpander:

    • anchor:custom-toData-setters
    • anchor:custom-project-setters
    • several feature anchors (used by expanders)
  • Added OpenJPA automatic schema updating that is enabled by default
  • Added applicationInstanceOption persistence.schemaUpdating to control automatic schema generation
    • none/empty or ‘update’ to enable, ‘none’ to disable
  • Added applicationInstanceOption experimental.cruds.failOnProjectionNotFound
    • return CrudsError when elements are not found via Cruds instead of CrudsSuccess(object-with-empty-fields)
  • Added ExpansionComposite to ExpansionConfigurationExpansionContext, which can be used in expanders to access meta information of the expansion (artifacts, custom insertions …).
  • Added expansion option exportTraceZip, which creates a zip which contains information on the expanded artifacts, custom insertions etc. This will replace the default expansion of artifacts.
  • Add expansion option skipPhase which lets you define which phases to skip during expansion (e.g overlay)
  • Added XML Schema to persistence.xml and updated version from 1.0 to 2.2

Changed

  • Using JDNI appName lookup (java:app/AppName) is now behind jndi.appName applicationInstanceOption
  • persistence.xml version updated to 2.2
  • ECLIPSELINK schema updating changed from create-tables to create-or-extend-tables
  • [struts] PerformerExpander now returns TaskResult.error() on perform failure

4.0.4

Added

  • Expansion option harvestBaseComponents will make sure the baseComponents are harvested, as they are ignored by default.

Fixed

  • Used application.shortName instead of applicationInstance.shortName during expansion
  • Removed dependencies on validationImplementation

4.0.2.8

Added

  • Component Option cascadeDelete will add cascading delete for all collection fields with option aggregate: composite

    This option requires the option enableComposites to work

4.0.2.6

Fixed

  • Fixed issues with xml tag and directory names for ioxml

4.0.2.5

Added

  • new anchors in net.democritus.expander.ejb3.flowElement.EngineBeanExpander

    • anchor:custom-orchestrate-before
    • anchor:custom-orchestrate-after
    • anchor:custom-batchDescription
    • anchor:custom-processBatch-before
    • anchor:custom-processBatch-after
    • anchor:custom-processTask-after
  • Expander for CompositeToTree (ioxml)

4.0.2.4

Fixed

  • Fixed default constructor of functional dataRefs to set componentName, packageName and elementName
  • Migrated latest changes to ioxml expanders to composite-based expanders

4.0.2.3

Fixed

  • Fixed target paths of both *-io-page-model.js and *-io-page.html file
  • Fixed error logs for import/export

4.0.2.2

Fixed

  • Fixed external meta-expanders being ignored (since 4.0.1.6)

4.0.2.1

Fixed

  • Fixed StringFile not sending the uploaded file to server

4.0.2

Added

  • ExpansionOptions excludeExpanders, excludeFeatures and excludeExpansionSteps to exclude expanders etc. from running.
  • ExpansionOptions includeExpanders to select specific expanders to run.
  • ExpansionOption hideAnchors to hide all non-custom anchors
  • AdditionalExpansionSteps can introduce new jobs to the ExpansionJobManager to make external expansionRunner possible

4.0.1.7

Fixed

  • Fixed issues with component-level overlay
  • Fixed issues with combination nameNotWanted + hasDisplayName not showing any names

4.0.1.3

Fixed

  • Fixed issues with fields with type CALCULATED_FIELD in ListHtmlExpander and InstanceViewHtmlExpander (UI2)

4.0.1.2

Added

  • Added missing dynamic DEPLOYMENT_NAME in ComponentMetaData for modern application servers

Fixed

  • Fixed nullPointerException in functionalKey dataRef to string method
  • Fixed issue with ValueFieldTypes in validators.xml

4.0.1.1

Fixed

  • Fixed issues with Service Element Expanders
  • Fixed noDataLayer option being ignored
  • Fixed issues with full import of a new application
  • Restored names of enums for DataState to be backwards compatible with some edge cases

4.0.1

Added

  • DataElements can define the option functionalKey
  • The flow option setBatchFinder will allow you to modify the finder used to find the next batch in your EngineBean
  • Finders can now use the Se (strictly equals) operator. In this case, only the = operator will be used in JPA and not, in case of a String, the LIKE operator.

    The Se operator can be used to e.g. findByStatusSe, which can then be used in the setBatchFinder option to avoid using a slow LIKE operator in your engineBean.

Changed

  • In previous versions, if a linkfield was set in the Cruds-class, any failure to find the linked instance would be ignored and the link would not be said. The setters have now been made stricter and will throw an exception should this occur. In order to avoid this behavior, use the application instance option disableStrictLinkMode.

    This will prevent the cruds layer from silently ignoring incorrect link fields during an import.

Fixed

  • A bug has been fixed where a Ln02 link field could not be set to null. This fix can be disabled with the application instance option disableFixNullableLn02.

4.0.0

Added

  • Option hasTranslation now works for name field and findByNameEq finder
  • Option hasTranslation on field will be used for the translation of the corresponding finders the translation properties for the English translation will now contain correct English translations the pom.xml files of different layers may contain new source and resource directories to be more consistent with the ANT build

Fixed

  • Options no*Layer are now correctly applied, mainly when added as component options. If any artifacts are missing, check for options

Changed

  • Rework of the expander framework. The features of the expanders have been kept the same as the previous versions. The biggest changes will be in the use and extension of the expansion. There might be some small variations/improvements to the previous versions.
  • The classes in the client layer have been changed to allow version transparency between changes of a dataElement
  • The order of harvested anchors may change. Therefore it is best to harvest and commit these changes before making any functional changes. For more information, see harvest sorting.
  • The expansion from the PR will now take the CustomRepository of your components in account when expanding the application. Which means that if this repository is different from the customRepository of the applicationInstance, the expanders might be looking in the wrong harvest directories. To fix this, make sure that there is only one directory named after the component in all used source bases.