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 toOptionModule
as a more relevant location- binding of
SimpleHierarchy
moved toKrailOptionModule
, overriding a binding to newDefaultUserHierarchy
, which removes dependency on Shiro I18NModule
split into newI18NModule
in i18n andVaadinI18NModule
in the core. The latter overrides binding methods to use Vaadin related scopesDefaultTranslate
updated to use "strictness" provided byMessageFormat2
. Existing code will behave as before.- Scope of
DefaultOptionCache
is set inOptionModule
instead of by annotation uk.q3c.krail.option.OptionPermissionVerifier
used inOptionBase
to separate Shiro fromOption
.OptionPermission
is therefore only used with ShiroOptionPermission
usesOptionEditAction
.OptionPermission.Action is removed
OptionModule
binding ofOptionCache
scope removed to remove dependency on VaadinOptionContext.getOption()
changed toOptionContext.optionInstance()
OptionContext
is parameterised to enable response to different change event types.VaadinOptionContext
extendsOptionContext
and replaces most existing uses ofOptionContext
OptionSource
andDefaultOptionSource
have getContainer() method moved toVaadinOptionSource
andDefaultOptionSource
, to remove dependency on VaadinVaadinContainerProvider
is paramterised and moved touk.q3c.krail.persist
in 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:
@DefaultUserHierarchy
renamed to@UserHierarchyDefault
@DefaultActiveOptionSource
renamed to@ActiveOptionSourceDefault
@DefaultLocale
renamed to@LocaleDefault
-
uk.q3c.krail.i18n.I18NHostClassIdentifier
is nowuk.q3c.util.clazz.UnenhancedClassIdentifier
-
AnnotationOptionList
had nothing to do withOption
. RenamedAnnotationList
and moved touk.q3c.util.collection
in q3c-util -
AnnotationOptionListConverter
, renamedAnnotationListConverter
and moved touk.q3c.util.collection
-
OptionElementConverter
renamedDataConverter
and moved touk.q3c.util.data
.DataConverter
supports custom data item converters through Guice MapBinder -
DefaultOptionElementConverter
renamedDefaultDataConverter
and moved touk.q3c.util.data
-
OptionConverter
renamedDataItemConverter
and moved touk.q3c.util.data
- it is used byOption
but not specific to it -
KrailPersistenceUnit
split intoI18NPersistenceEnabler
andOptionPersistenceEnabler
-
KrailPersistenceUnitHelper
split intoI18NPersistenceHelper
andOptionPersistenceHelper
-
ServicesClassGraph
becomesServiceClassGraph
-
ServicesGraph
becomesServiceGraph
-
ServicesInstanceGraph
becomesServiceInstanceGraph
-
ServicesModel
becomesServiceModel
-
ServicesMonitor
becomesServiceMonitor
-
DefaultServicesMonitor
becomesDefaultServiceMonitor
-
AbstractServicesGraph
becomesAbstractServiceGraph
-
DefaultServicesClassGraph
becomesDefaultServiceClassGraph
-
DefaultServicesInstanceGraph
becomesDefaultServiceInstanceGraph
-
DefaultServicesModel
becomesDefaultServiceModel
-
RelatedServicesExecutor
becomesRelatedServiceExecutor
BigDecimalConverter
deleted. Conversion is already handled byDataConverter
and is therefore redundantTestByteEnhancementModule
(in test folder) - useuk.q3c.util.test.AOPTestModule
insteadOptionList
removed, useuk.q3c.util.data.collection.DataList
insteadCoreDao
- never usedOptionCollection
removed, useuk.q3c.util.data.collection.DataList
insteadOptionPermission.Action
removed, useOptionEditAction
instead
MessageFormat
. Its replacement is no longer a static utility, but an interfaceuk.q3c.util.text.MessageFormat2
with implementationuk.q3c.util.text.DefaultMessageFormat
. -Translate
(andDefaultMessageFormat
if 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.reflections
should 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.i18n
moved touk.q3c.krail.i18n.test
(in src folder)MockTranslate
provided 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
I18NProcessor
andI18NFieldScanner
moved fromI18NModule
toVaadinI18NModule
DefaultPatternUtility
remains in core with binding inVaadinI18NModule
(see open issue)- relevant
LabelKey
andDescriptionKey
constants moved to I18n and renamedPatternLabelKey
andPatternDescriptionKey
(used primarily inOptionKey
definitions) - Use
KrailI18NModule
instead 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
OptionContainerProvider
moves touk.q3c.krail.option.persist.OptionContainerProvider
uk.q3c.krail.core.testutil.option
moved touk.q3c.krail.option.test
uk.q3c.krail.option.test.MockOptionPermissionVerifier
addedSimpleUserHierarchy
moved touk.q3c.krail.core.option.hierarchy.SimpleUserHierarchy
- new
DefaultUserHierarchy
, removes dependency on Shiro - Use
KrailOptionModule
instead ofOptionModule
. The latter is for use outside Krail
uk.q3c.krail.core.data
moved touk.q3c.krail.persist
except:uk.q3c.krail.core.data.DataModule
moved touk.q3c.krail.core.vaadin.DataModule
uk.q3c.krail.core.data.I18NKeyConverter
moved touk.q3c.krail.i18n.I18NKeyConverter
uk.q3c.krail.core.data.Select
moved touk.q3c.krail.i18n.jpa.Select
- added
PersistenceConfigurationException
- "InMemory" storage for both Option and I18N patterns are in the krail-option project
TestPersistenceModule
becomesTestPersistenceModuleVaadin
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
service
instead ofservices
, and most of the classes also becomeServicexxxx
instead ofServicesxxxx
Project q3c-util contains all of the uk.q3c.util
package
Moved from uk.q3c.util
to uk.q3c.krail.core.vaadin
ID
SourceTreeWrapper_VaadinTree
TargetTreeWrapper_MenuBar
TargetTreeWrapper_VaadinTree
UserSitemapNodeCaption
These all moved from uk.q3c.util
to uk.q3c.util.forest
in q3c-util:
BasicForest
CaptionReader
DefaultNodeModifier
NodeFilter
NodeModifier
SourceTreeWrapper
SourceTreeWrapper_BasicForest
TargetTreeWrapper
TargetTreeWrapper_BasicForest
TargetTreeWrapperBase
TreeCopy
TreeCopyException
TreeCopyExtension
Others:
GuavaCacheConfiguration
moved fromuk.q3c.krail.core.persist.cache.common
touk.q3c.util.guava
ReflectionUtils
moved fromuk.q3c.util
touk.q3c.util.reflect
The following moved into a new package uk.q3c.util.test
, to make test helper classes generally available
-
AOPTestModule
fromuk.q3c.util
-
new
EnhancedClass
-
NotOnWeekends
fromuk.q3c.util
-
WeekendBlocker
fromuk.q3c.util
- was in test folder, now in src -
new
UtilModule
for 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