- New features:
- A REST filter feature has been introduced in terrestris#216 which allows basic/simple filtering based on primitve fields of (arbitrary) entities.
- Changes:
- Connection pooling has been replaced by HikariCP. Beside that HikariCP outperforms c3p0 insofar as performance is concerned, the major advantage is that there are less (required) parameters to tweak which makes the configuration of the connection pooling much simpler. Please take care of differing
artifactIddepending on your Java version - The
HttpUtilnow offers the possibility to add custom HTTP headers to requests: terrestris#218 - The
Shogun2PermissionEvaluatorcan now be configured to use the plainPrincipalobject from the spring security context (instead of always fetching a full SHOGun2-database user object): terrestris#229
- Connection pooling has been replaced by HikariCP. Beside that HikariCP outperforms c3p0 insofar as performance is concerned, the major advantage is that there are less (required) parameters to tweak which makes the configuration of the connection pooling much simpler. Please take care of differing
- Upgrade notes to get projects based on v0.1.1 running with v0.1.2:
- Copy file hikari.properties from here to
src/main/resources/META-INF/in your existing project. - Replace the c3p0-based
shogun2DataSourcein the{{your-project}}-context-db.xmlfile (undersrc/main/resources/META-INF/spring/) by the one based on hikari as it is defined in the archetype. Make sure also to add the beanhikariConfigfrom the archetype.
- Copy file hikari.properties from here to
- New features:
- Some tree models have been introduced. See terrestris#208 for details.
HttpUtilmethods can now also be called with intances ofCredentialsinterface- A new web interface for the easy creation of ExtJS locale JSON files (based on CSV files) has been added. See this PR for details: terrestris#213
- Changes:
Permission.WRITEhas been renamed toPermission.UPDATE- A new permission
Permission.CREATEhas been introduced - The
saveOrUpdatemethod of theAbstractCrudServicenow has a more secure permission/authorization annotation. TheCREATEcase is currently not respected in the permission evaluators of SHOGun2 and should be handled in project specific implementations. - The
saveOrUpdatemethod of the services are now void. Existing projects that are using this method may need some simple adaptions like changes fromPersistentObject newObject = object.saveOrUpdate()toobject.saveOrUpdate() - The webapp-archetype has been extended to demonstrate how custom permission evaluators for project specific solutions can be used.
- All Response-interceptors from the package
de.terrestris.shogun2.util.interceptornow have a new parameterMutableHttpServletRequest request. This makes sense as the request object contains basic information that may be necessary in custom implementations of a response interceptor.
- New features:
- All
PersistentObjects now have a set of user and group permissions, i.e. all entities can be protected if needed. In this context, the permission evaluators have been overhauled. The database structure has changed here, which means that existing projects are affected by this change and would need a data migration if they can not boot in a vanilla state (withhibernate.hbm2ddl.auto=create). - An
AbstractPermissionAwareCrudServicehas been introduced. This service provides useful methods to add and remove permissions for certain objects.PermissionCollections will be persisted in the database when using these methods. All services should extend the abstract service mentioned above. There is only one exception: ThePermissionCollectionServicedoes NOT extend this service as theAbstractPermissionAwareCrudServicegets thePermissionCollectionServiceinjected, which would not work when thePermissionCollectionServicewould try to inject itself. On top of that it does not make sense to securePermissionCollections withPermissionCollections and so on...
- All
Existing projects (that were possibly created with an old version of the webapp archetype) need adaptions regarding the following points:
- Adapt the
pom.xmlof your existing SHOGun2 project- Remove the dependency with the artifactID
shogun2-web
- Remove the dependency with the artifactID
- Adapt the existing
{{your-project}}-context-initialize-beans.xmlfile (undersrc/main/resources/META-INF/spring/) according to the new structure as it is defined in the archetype - Adapt the existing
{{your-project}}-context.xmlfile (undersrc/main/resources/META-INF/spring/) according to the new structure as it is defined in the archetype - Add the missing
geoServerNameSpaces.propertiesfile tosrc/main/resources/META-INF/, like the one in the archetype - Remove all occurences of
<property name="type" value="Tile" />in the{{your-project}}-context-initialize-beans.xmlfile (undersrc/main/resources/META-INF/spring/) - Add
http.timeout=30000to the{{your-project}}.propertiesfile (undersrc/main/resources/META-INF/) - If there are already custom implementations of one of the response interceptors from the package
de.terrestris.shogun2.util.interceptorin your project, these methods need the new parameterMutableHttpServletRequest requestin their signature.
- All EXT-Direct related stuff has been removed. Existing projects (that were possibly created with an old version of the webapp archetype) need adaptions regarding the following points:
- Remove all annotations of type
ch.rasc.extclassgenerator.Model - In the file
src/main/resources/META-INF/spring/{{your-project}}-context.xml:- The package
ch.ralscha.extdirectspringcan be removed from the<context:component-scan>element. <bean id="modelPackageCandidates" class="java.util.ArrayList">can be removed
- The package
- In the file
src/main/webapp/WEB-INF/{{your-project}}-servlet.xml, the packagech.ralscha.extdirectspringcan be removed from the<component-scan>element. - In the file
src/main/webapp/WEB-INF/log4j.properties, the config forlog4j.logger.ch.ralscha.extdirectspringcan be removed - In the file
src/main/webapp/WEB-INF/web.xml, the<servlet-mapping>with<url-pattern>/action/*</url-pattern>can be removed
- Remove all annotations of type
- Existing projects should (once) boot with the
hibernate.hbm2ddl.autoproperty set toUPDATEorCREATEto make use of the new tablesABSTR_LAYERS_USERPERMISSIONSandABSTR_LAYERS_GROUPPERMISSIONS(#155).