Skyve 9.4.0 released

This release of Skyve includes a number of new features and improvements, such as router merging changes, audit archiving, module query imports, and enhancements to both the desktop and responsive renderers. Additionally, there are numerous performance and security improvements.

Router Merging Changes

When merging routers, routes are no longer merged by name. Instead, any routes from a more specific router (i.e. a module router) are added to the front of the existing router. This allows you to override routes in the base application by defining a route with the same path in your module.

Audit Archiving

Skyve 9.4.0 introduces audit archiving to help manage the size of the audit tables in the database by offloading old audits to disk. This can be enabled in the application's json configuration file. A commented out example is provided in the Skyve repository json file here.

A number of configuration options are available, such as the directory within the content directory to write archives to, the age at which audits should be archived, and the frequency of the archiving job.

Only archiving of the admin module's Audit document is supported out of the box. Additional documents can be archived by implementing the ArchiveableBean interface. And you will also need to write a DocumentConverter to convert the document to and from a serializable form for writing to disk. See AuditDocumentConverter for an example.

Collapsible Forms and VBox changes

Collapsible forms and vboxes now require a pixelHeight to be specified to assist Skyve in calculating the height of the collapsed component. The collapsible attribute can be set to open or closed to specify the initial state of the component.

<form border="true" borderTitle="Collapsed Form" collapsible="closed" pixelHeight="200">
<vbox border="true" borderTitle="Collapsed Vbox" collapsible="closed" pixelHeight="200">

Module Query Import

Previously, documents could be imported from other modules using the import attribute on the document element. Now, queries can also be imported from other modules using the queryImport, bizqlImport and sqlImport elements in the queries stanza.

<queries>
    <queryImport module="otherModule" name="SomeQuery"/>
    <bizqlImport module="otherModule" name="SomeBizQLQuery"/>
    <sqlImport module="otherModule" name="SomeSQLQuery"/>
</queries>

New Skyve Maven Plugin Behaviours

There are two new goals in the Skyve Maven Plugin:

  • systemDocumentation: This will generate a PDF of your application system documentation from the Skyve metadata in your project. Run mvn skyve:systemDocumentation to generate the system documentation PDF into the target directory. A comma separated list of excludedModules can be provided to exclude modules from the documentation.
  • newService: Creates a service class for an existing document with helper methods for retrieving single and multiple instances. Run mvn skyve:newService to create the new service class. This takes a moduleName and documentName parameter similar to the other Skyve Maven Plugin goals.

Inverse Many Ordering

Inverse many associations can now specify an ordering using the orderBy attribute, similar to collections.

<inverseMany name="contacts">
    <displayName>Contacts</displayName>
    <documentName>Contact</documentName>
    <referenceName>customer</referenceName>
    <ordering>
        <order sort="ascending" by="name"/>
    </ordering>
</inverseMany>

Equals, HashCode and CompareTo methods made final

The generated equals(), hashCode() and compareTo() methods in Skyve domain objects are now final. This is to ensure that the equals method is consistent and not overridden in subclasses, which could lead to unexpected behaviour when comparing objects.

Unfortunately, this will cause compilation issues after upgrading, as previously generated domain classes will contain an equals() method from older versions of Skyve. These will need to be manually removed before you can generate domain classes again.

Add requiredMessage to Field, Association and FormItem

A requiredMessage attribute has been added to the field, association and formItem elements in the metadata. This allows you to specify a custom message to be displayed when a required field is not filled in. This can be specified against the document attribute, or also defined within in a view, so that a different message can be specified for different views of the same document, e.g. based on visibility conditions or UXUI.

<item required="true" requiredMessage="A name is required">
    <default binding="name" />
</item>

Responsive Renderer

  • Ensure HarnessView and LocalisableView are injectable (no final methods allows for proxies).
  • Implement push messages as a dialog, not a JavaScript alert.
  • Rejig menu output to cater for Ultima theme state restore.
  • Fix text alignment of labels and blurbs.
  • Fix text alignment in form labels to match label alignment.
  • Fix content upload overlay in Ultima theme by upgrading PrimeFaces.
  • Fix styling in PrimeFaces 13.
  • Remove glass pane from Skyve PF UIs as PrimeFaces 13 blocks command buttons from double click, and fires browser events in the right order, and Faces 2 serialises AJAX requests by default.
  • Ensure the sidebar widget is not added with same faces ID twice as it breaks in Wildfly 35.
  • If the PF data grid “action” column would only contain the "add" control, the column wasn’t being added to the grid.
  • VueListGrid improvements
  • Ensure MenuView.resetState() is thread-safe.
  • Rename FacesUtil.getManagedBean() to FacesUtil.getNamed().
  • Remove PhoneMenu component from Skyve Faces tag library.

Desktop Renderer

  • Add support for exact/equals/notEqual criteria operators in ListGrid filter line generated request parameter criteria in SmartClient.
  • Fix BizCollapsible to handle tab pane layouts, resizing and lazy grid refreshing on expand.
  • Defend against transient and incomplete beans in ListModel rows for SmartClientListServlet.
  • Remove the erroneous query when toggling to advanced filtering in list grids.
  • Fix a few list grid export shortcomings.
  • Handle labels in StaticImage form rendering.
  • Set the zoomed in form binding before scattering the form so components have the right binding at their disposal.
  • Allow the SmartClient ListGrid summary function to be populated when the user cannot flag.
  • Ensure anonymous formats (_0, _1 ...) are in sync between SmartClientViewRenderer and ViewJSONManipulator.
  • Fix blur event processing.
  • Drop lookup description cache when a pick list item value is edited or added.
  • Allow Tag and Flag to be hidden in list grids.

MetaData/Repository

  • Add cache control to DynamicImage.
  • Move getImplementingType() to Attribute and always use the generated enum class for non-dynamic attributes.
  • Add Skyve documentation maven mojo.
  • Add MetaDataQuery grouping and ordering elements.
  • Add requiredMessage to Field, Association and FormItem.
  • Add properties decoration across the metadata.
  • Do not merge routes when merging routers - insert them at the front.
  • Remove ProvidedRepositoryDelegate interface from Skyve.
  • Remove repository reference from DomainGenerator.validate().
  • Validation for non-persistent ListGrid bindings now takes into account non-persistent relations.
  • Add ordering ability to inverseMany document attributes.
  • Add FluentAttribute.defaultWidget() methods.
  • Override all Hibernate Unique Delegate creation points to ensure SQLServer continues to make null tolerant unique indexes.
  • Fix transient compound binding in projected query column check.
  • Make Fluent Generation API public all the way down to be more polymorphic in use.
  • Add module query references (imports).
  • Complete FluentListGrid and add JAXBFixingVisitor cleanup.

Behaviour

  • Split BeanVisitor into NullableBeanVisitor and remove the visitNulls constructor parameter to be statically null-safe.
  • Remove MD5 password encoding.
  • Unify equals(), hashCode(), compareTo() and toString() for domain objects.
  • Add HTML colour NEX to Java Color utilities to Skve Util.
  • Add EXT.isWebRequest().
  • Exclude Xerces to allow PDF content text extraction.
  • Revert to using DeltaSpike for CDI field injection as it works around non-standard class-loading issues in Wildfly JAX-WS handlers.
  • Audit Archiving bug fixes and improvements
  • Fix sleep in seconds application in AbstractSkyveJob.
  • Add member of filter functions to DocumentFilter.
  • Use slf4j for Skyve logging and deprecate Util/UtilImpl’s LOGGER.
  • Add parameter processing to ListRepeater and SC/PF parameter processing as follows
  • Association parameter name bindings load the bean.
  • Other parameter name as valid bindings assume the target type.
  • Arbitrary parameters names (not valid bindings) are Strings.
  • Rollback on error in potentially read-only services
  • Throw on startup when DevLoginFilter is used in prod.
  • Fix Google Maps geolocation javascript function.
  • Allow MessageExceptions to be Serialized.
  • Update AbstractDataFileLoader to log missing cell values in debug mode only
  • Allow caching to support blue/green deployments on the same volumne by creating multiple random caching folders.
  • Update json and ds.xml templates with pool connection checking.
  • Scope Unique Constraint checking within extension hierarchies.
  • Uplift tika, poi and h2gis to resolve commons-compress version problems and add a text extraction unit test to content project.
  • Remove Unique Constraint Persistence state post delete.
  • Throttle metadata reload checks per metadata item for 5 seconds in Skyve dev mode.
  • Keep spring-test dependency in lock-step with spring version.
  • Split Customisations.determineDefaultTextAlignment() into Widgets and Columns.
  • Add Invoke and InvokeStatic behaviour metadata.
  • Update NewScaffoldedDocumentMojo to add javadoc for the generated methods
  • Chunk Servlet responses to stop truncation in rare circumstances.
  • Persist cancelled/failed jobs regardless of persistJobExecutionOnSuccess()
  • Include constraint name in key for UniqueConstraintViolationException
  • Cancel any running jobs before shutting down the Skyve Job Scheduler.
  • Add backup event callbacks to Skyve Observers.
  • Stop and reload jobs on restore
  • Improve memory usage handling content.
  • Add tagged projection to InMemoryListModel.
  • Cater for reused list model rows when tagging.
  • Add NewServiceMojo to create a new service class for an existing document
  • Update optimistic lock on update exception message slightly.
  • Fix compound binding usage in BindUtil.orderByMetaData().

Security

  • Uplift commons-io and spring-security.
  • Update Captcha usage in password reset.
  • Refine change password session invalidation.
  • Add Permissions-Policy response header to web.xml.
  • Add extra CSP directives to batten down the hatches.
  • Updated sensitivity obfuscation to handle short strings
  • Deny access to inactive Skyve users even if OAuth successful
  • Fix CSRF in UI Switcher by adding an element ID to the csrf hidden.
  • Bump commons-beanutils:commons-beanutils from 1.9.4 to 1.11.0
  • Bump org.apache.commons:commons-lang3 from 3.12.0 to 3.18.0
  • Remove commons-fileupload as it is unused by PF13.
  • Update so that captcha failures notify the user in reset password.

Admin

  • Remove admin.Audit.SourceVersionChanged action.
  • Simple Import/Export bug fixes
  • Clean up RDBMSAuditInterceptor.
  • Update SendPasswordChangeNotificationJob to define the communication templates send to with a binding instead of fixed email.
  • Enable configuration of SecurityLog email notifications.
  • Added Drop Indexing function to content manager to delete the persistent indexing.

Testing

  • Add MockJobScheduler for testing.
  • SAIL uplift to Selenide/Selenium.
  • Enhance DataBuilder to apply fixture configurations.
  • Stop recursive factory builds.
  • Force non-persistent EH Caching during testing.

Notes for Upgrading

To upgrade your Skyve project to this version, change the Skyve version in your pom.xml to 9.4.0 and perform an assemble.

If you are upgrading from a version older than 9.2.0, please see the previous release notes and also apply those changes.

See the complete upgrade instructions on GitHub.

If your application contains MD5 passwords, you will need to run a SQL script to remove these passwords from your database. Please run the appropriate script for your database, MSSQL or MySQL. This will force users with MD5 passwords to reset their passwords on next login.

Generated domain classes will need to be manually edited to remove any existing equals() methods, as the generated equals() method is now final.

Dependency changes:

The SAIL testing framework has been replaced with Selenide. If you have any Selenium SAIL test dependencies in your pom.xml, please remove them and add the following dependency instead:

<!-- Selenide -->
<dependency>
    <groupId>com.codeborne</groupId>
    <artifactId>selenide</artifactId>
    <version>7.9.1</version>
    <scope>test</scope>
</dependency>
releasesBen PetitoComment