This release is a major refactor to extract some elements which can actually stand alone from Krail itself - I18N, Option and Application Configuration. All have an API and an implementation project. EventBus and Service packages have their APIs extracted into separate projects, but the implementation is still in the Krail core.
The aim is to prepare for upgrade to Vaadin 8, and then assess the possibility of moving to Eclipse Vert.x
Vaadin 8 will follow shortly, but a Vaadin 7 branch will be maintained for a while.
All the major components have been updated to their latest version - Guice, Shiro and Vaadin 7, along with a number of smaller compile and tsestCompile dependencies.
Unfortunately there are a LOT of changes which will affect existing Krail apps. Many are limited to package changes, but some code changes were needed to achieve effective separation of concerns
A number of packages now contain Mocks and test support classes - this is to avoid recreating Mocks individually within a wide range of tests. This approach is still fairly ad-hoc, but it worth checking to see if there is a 'test' package before setting up mocks.
UserModule.bindUserHierarchies()moved toOptionModuleas a more relevant location- binding of
SimpleHierarchymoved toKrailOptionModule, overriding a binding to newDefaultUserHierarchy, which removes dependency on Shiro I18NModulesplit into newI18NModulein i18n andVaadinI18NModulein the core. The latter overrides binding methods to use Vaadin related scopesDefaultTranslateupdated to use "strictness" provided byMessageFormat2. Existing code will behave as before.- Scope of
DefaultOptionCacheis set inOptionModuleinstead of by annotation uk.q3c.krail.option.OptionPermissionVerifierused inOptionBaseto separate Shiro fromOption.OptionPermissionis therefore only used with ShiroOptionPermissionusesOptionEditAction.OptionPermission.Action is removedOptionModulebinding ofOptionCachescope removed to remove dependency on VaadinOptionContext.getOption()changed toOptionContext.optionInstance()OptionContextis parameterised to enable response to different change event types.VaadinOptionContextextendsOptionContextand replaces most existing uses ofOptionContextOptionSourceandDefaultOptionSourcehave getContainer() method moved toVaadinOptionSourceandDefaultOptionSource, to remove dependency on VaadinVaadinContainerProvideris paramterised and moved touk.q3c.krail.persistin krail-persist-api
-
There were some annotations with names beginning with '@Default', which can cause a name clash, as most implementations are 'Defaultxxx'. The following annotations changed:
@DefaultUserHierarchyrenamed to@UserHierarchyDefault@DefaultActiveOptionSourcerenamed to@ActiveOptionSourceDefault@DefaultLocalerenamed to@LocaleDefault
-
uk.q3c.krail.i18n.I18NHostClassIdentifieris nowuk.q3c.util.clazz.UnenhancedClassIdentifier -
AnnotationOptionListhad nothing to do withOption. RenamedAnnotationListand moved touk.q3c.util.collectionin q3c-util -
AnnotationOptionListConverter, renamedAnnotationListConverterand moved touk.q3c.util.collection -
OptionElementConverterrenamedDataConverterand moved touk.q3c.util.data.DataConvertersupports custom data item converters through Guice MapBinder -
DefaultOptionElementConverterrenamedDefaultDataConverterand moved touk.q3c.util.data -
OptionConverterrenamedDataItemConverterand moved touk.q3c.util.data- it is used byOptionbut not specific to it -
KrailPersistenceUnitsplit intoI18NPersistenceEnablerandOptionPersistenceEnabler -
KrailPersistenceUnitHelpersplit intoI18NPersistenceHelperandOptionPersistenceHelper -
ServicesClassGraphbecomesServiceClassGraph -
ServicesGraphbecomesServiceGraph -
ServicesInstanceGraphbecomesServiceInstanceGraph -
ServicesModelbecomesServiceModel -
ServicesMonitorbecomesServiceMonitor -
DefaultServicesMonitorbecomesDefaultServiceMonitor -
AbstractServicesGraphbecomesAbstractServiceGraph -
DefaultServicesClassGraphbecomesDefaultServiceClassGraph -
DefaultServicesInstanceGraphbecomesDefaultServiceInstanceGraph -
DefaultServicesModelbecomesDefaultServiceModel -
RelatedServicesExecutorbecomesRelatedServiceExecutor
BigDecimalConverterdeleted. Conversion is already handled byDataConverterand is therefore redundantTestByteEnhancementModule(in test folder) - useuk.q3c.util.test.AOPTestModuleinsteadOptionListremoved, useuk.q3c.util.data.collection.DataListinsteadCoreDao- never usedOptionCollectionremoved, useuk.q3c.util.data.collection.DataListinsteadOptionPermission.Actionremoved, useOptionEditActioninstead
MessageFormat. Its replacement is no longer a static utility, but an interfaceuk.q3c.util.text.MessageFormat2with implementationuk.q3c.util.text.DefaultMessageFormat. -Translate(andDefaultMessageFormatif used directly) offers 3 levels of strictness when handling mis-matches between arguments and parameters, STRICT, STRICT_EXCEPTION and LENIENT. The default, STRICT, behaves the same way as the previous version.ReflectionUtils.org.reflectionsshould be used insteadOptionList&OptionListConverter- this is not practical for anything except in memory store
These can be dealt with by the usual method of deleting failed import statements and letting the IDE find the new location.
projects: i18n, i18n-api
Generic I18N classes moved from uk.q3c.krail.core.i18n to uk.q3c.krail.i18n and sub-packages. Some (mostly Vaadin specific) classes remain in uk.q3c.krail.core.i18n
uk.q3c.krail.core.testutil.i18nmoved touk.q3c.krail.i18n.test(in src folder)MockTranslateprovided inuk.q3c.krail.i18n.test(in src folder) with more complete response (includes locale and arguments) and a bit more functionality as a Mock- bindings for
I18NProcessorandI18NFieldScannermoved fromI18NModuletoVaadinI18NModule DefaultPatternUtilityremains in core with binding inVaadinI18NModule(see open issue)- relevant
LabelKeyandDescriptionKeyconstants moved to I18n and renamedPatternLabelKeyandPatternDescriptionKey(used primarily inOptionKeydefinitions) - Use
KrailI18NModuleinstead ofI18NModule. The latter is for use outside Krail
projects: option, option-api
All classes relating to the provision of In Memory "persistence", are within option and option-api, primarily for use in testing
OptionContainerProvidermoves touk.q3c.krail.option.persist.OptionContainerProvideruk.q3c.krail.core.testutil.optionmoved touk.q3c.krail.option.testuk.q3c.krail.option.test.MockOptionPermissionVerifieraddedSimpleUserHierarchymoved touk.q3c.krail.core.option.hierarchy.SimpleUserHierarchy- new
DefaultUserHierarchy, removes dependency on Shiro - Use
KrailOptionModuleinstead ofOptionModule. The latter is for use outside Krail
uk.q3c.krail.core.datamoved touk.q3c.krail.persistexcept:uk.q3c.krail.core.data.DataModulemoved touk.q3c.krail.core.vaadin.DataModuleuk.q3c.krail.core.data.I18NKeyConvertermoved touk.q3c.krail.i18n.I18NKeyConverteruk.q3c.krail.core.data.Selectmoved touk.q3c.krail.i18n.jpa.Select
- added
PersistenceConfigurationException - "InMemory" storage for both Option and I18N patterns are in the krail-option project
TestPersistenceModulebecomesTestPersistenceModuleVaadin
Moved to krail-config-api and krail-config
Previous versions defaulted to looking for an optional 'krail.ini' file in WEB-INF. From version 0.10.0.0, that is no longer true, and all ini files must be specified
- root package becomes
serviceinstead ofservices, and most of the classes also becomeServicexxxxinstead ofServicesxxxx
Project q3c-util contains all of the uk.q3c.util package
Moved from uk.q3c.util to uk.q3c.krail.core.vaadin
IDSourceTreeWrapper_VaadinTreeTargetTreeWrapper_MenuBarTargetTreeWrapper_VaadinTreeUserSitemapNodeCaption
These all moved from uk.q3c.util to uk.q3c.util.forest in q3c-util:
BasicForestCaptionReaderDefaultNodeModifierNodeFilterNodeModifierSourceTreeWrapperSourceTreeWrapper_BasicForestTargetTreeWrapperTargetTreeWrapper_BasicForestTargetTreeWrapperBaseTreeCopyTreeCopyExceptionTreeCopyExtension
Others:
GuavaCacheConfigurationmoved fromuk.q3c.krail.core.persist.cache.commontouk.q3c.util.guavaReflectionUtilsmoved fromuk.q3c.utiltouk.q3c.util.reflect
The following moved into a new package uk.q3c.util.test, to make test helper classes generally available
-
AOPTestModulefromuk.q3c.util -
new
EnhancedClass -
NotOnWeekendsfromuk.q3c.util -
WeekendBlockerfromuk.q3c.util- was in test folder, now in src -
new
UtilModulefor Guice bindings
The 'Getting Started' section of the Tutorial has been amended, and the Tutorial itself is functional at this point. The remaining sections have still to be reviewed, but should be subject to very little, if any, change