├── .gitattributes ├── .gitignore ├── README.md ├── Release Notes.md ├── build.gradle ├── docs ├── Makefile ├── conf.py ├── devguide │ ├── devguide-bootstrap.rst │ ├── devguide-configuration-overview.rst │ ├── devguide-eventbus.rst │ ├── devguide-functional-test.rst │ ├── devguide-goals.rst │ ├── devguide-guice-scopes.rst │ ├── devguide-i18n.rst │ ├── devguide-introduction.rst │ ├── devguide-options-hierarchies.rst │ ├── devguide-pages-navigation.rst │ ├── devguide-persistence.rst │ ├── devguide-push.rst │ ├── devguide-serialisation.rst │ ├── devguide-services.rst │ ├── devguide-testing.rst │ ├── devguide-uac.rst │ ├── devguide-validation.rst │ ├── devguide-vertx.rst │ └── license.rst ├── glossary.rst ├── img │ ├── basic-screenshot.png │ └── basic-screenshot2.png ├── index.rst ├── styles │ └── website.scss ├── tutorial │ ├── convert.sh │ ├── convert2docbook.sh │ ├── tutorial-configuration-from-ini.rst │ ├── tutorial-create-hierarchy.rst │ ├── tutorial-eclipse.rst │ ├── tutorial-event-bus.rst │ ├── tutorial-functional-test.rst │ ├── tutorial-getting-started.rst │ ├── tutorial-guice-scopes.rst │ ├── tutorial-i18n-components-validation.rst │ ├── tutorial-i18n.rst │ ├── tutorial-intro.rst │ ├── tutorial-options.rst │ ├── tutorial-pages-navigation.rst │ ├── tutorial-persistence-jpa.rst │ ├── tutorial-push.rst │ ├── tutorial-services.rst │ ├── tutorial-uac.rst │ ├── tutorial-ui-theme.rst │ └── tutorial-user-notification.rst └── userguide │ ├── license.rst │ ├── userguide-bootstrap.rst │ ├── userguide-form.rst │ ├── userguide-injector-scope.rst │ ├── userguide-intro.rst │ └── userguide-serialisation.rst ├── gradle ├── spek.gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src ├── main ├── java │ ├── de │ │ └── steinwedel │ │ │ └── messagebox │ │ │ ├── ButtonOption.java │ │ │ ├── ButtonType.java │ │ │ ├── MessageBox.java │ │ │ ├── TransitionListener.java │ │ │ ├── i18n │ │ │ ├── ButtonCaptionFactory.java │ │ │ └── captions │ │ │ │ ├── ButtonCaptions.java │ │ │ │ ├── ButtonCaptions_ar.java │ │ │ │ ├── ButtonCaptions_bg.java │ │ │ │ ├── ButtonCaptions_bs.java │ │ │ │ ├── ButtonCaptions_ca.java │ │ │ │ ├── ButtonCaptions_cs.java │ │ │ │ ├── ButtonCaptions_da.java │ │ │ │ ├── ButtonCaptions_de.java │ │ │ │ ├── ButtonCaptions_el.java │ │ │ │ ├── ButtonCaptions_en.java │ │ │ │ ├── ButtonCaptions_eo.java │ │ │ │ ├── ButtonCaptions_es.java │ │ │ │ ├── ButtonCaptions_et.java │ │ │ │ ├── ButtonCaptions_eu.java │ │ │ │ ├── ButtonCaptions_fa.java │ │ │ │ ├── ButtonCaptions_fi.java │ │ │ │ ├── ButtonCaptions_fr.java │ │ │ │ ├── ButtonCaptions_ga.java │ │ │ │ ├── ButtonCaptions_gl.java │ │ │ │ ├── ButtonCaptions_hu.java │ │ │ │ ├── ButtonCaptions_it.java │ │ │ │ ├── ButtonCaptions_ja.java │ │ │ │ ├── ButtonCaptions_kk.java │ │ │ │ ├── ButtonCaptions_ko.java │ │ │ │ ├── ButtonCaptions_lt.java │ │ │ │ ├── ButtonCaptions_lv.java │ │ │ │ ├── ButtonCaptions_nb.java │ │ │ │ ├── ButtonCaptions_nl.java │ │ │ │ ├── ButtonCaptions_nn.java │ │ │ │ ├── ButtonCaptions_pa.java │ │ │ │ ├── ButtonCaptions_pl.java │ │ │ │ ├── ButtonCaptions_pt.java │ │ │ │ ├── ButtonCaptions_pt_BR.java │ │ │ │ ├── ButtonCaptions_ro.java │ │ │ │ ├── ButtonCaptions_ru.java │ │ │ │ ├── ButtonCaptions_sk.java │ │ │ │ ├── ButtonCaptions_sl.java │ │ │ │ ├── ButtonCaptions_sr.java │ │ │ │ ├── ButtonCaptions_sv.java │ │ │ │ ├── ButtonCaptions_th.java │ │ │ │ ├── ButtonCaptions_tr.java │ │ │ │ ├── ButtonCaptions_ug.java │ │ │ │ ├── ButtonCaptions_uk.java │ │ │ │ ├── ButtonCaptions_wa.java │ │ │ │ ├── ButtonCaptions_zh_CN.java │ │ │ │ └── ButtonCaptions_zh_TW.java │ │ │ └── icons │ │ │ ├── AbstractButtonIconFactory.java │ │ │ ├── AbstractDialogIconFactory.java │ │ │ ├── ButtonIconFactory.java │ │ │ ├── ClassicButtonIconFactory.java │ │ │ ├── ClassicDialogIconFactory.java │ │ │ ├── DialogIconFactory.java │ │ │ ├── FlatDialogIconFactory.java │ │ │ ├── FontAwesomeButtonIconFactory.java │ │ │ ├── FontAwesomeDialogIconFactory.java │ │ │ ├── VaadinButtonIconFactory.java │ │ │ └── VaadinDialogIconFactory.java │ └── uk │ │ └── q3c │ │ └── krail │ │ ├── core │ │ ├── Widget.java │ │ ├── config │ │ │ ├── KrailApplicationConfigurationModule.java │ │ │ └── KrailPathLocator.java │ │ ├── eventbus │ │ │ ├── BusProvider.java │ │ │ ├── DefaultEventBusConfigurationErrorHandler.java │ │ │ ├── DefaultEventBusErrorHandler.java │ │ │ ├── DefaultSessionBusProvider.java │ │ │ ├── DefaultUIBusProvider.java │ │ │ ├── SessionBus.java │ │ │ ├── SessionBusProvider.java │ │ │ ├── UIBus.java │ │ │ ├── UIBusProvider.java │ │ │ └── VaadinEventBusModule.java │ │ ├── guice │ │ │ ├── BaseServlet.java │ │ │ ├── BaseServletModule.java │ │ │ ├── CoreBindingsCollator.java │ │ │ ├── DefaultServletContextListener.java │ │ │ ├── InjectorHolder.java │ │ │ ├── threadscope │ │ │ │ ├── ThreadCache.java │ │ │ │ ├── ThreadScope.java │ │ │ │ ├── ThreadScopeModule.java │ │ │ │ └── ThreadScoped.java │ │ │ ├── uiscope │ │ │ │ ├── UIScope.java │ │ │ │ ├── UIScopeException.java │ │ │ │ ├── UIScopeModule.java │ │ │ │ ├── UIScopeProvider.java │ │ │ │ └── UIScoped.java │ │ │ └── vsscope │ │ │ │ ├── VaadinSessionScope.java │ │ │ │ ├── VaadinSessionScopeModule.java │ │ │ │ ├── VaadinSessionScopeProvider.java │ │ │ │ └── VaadinSessionScoped.java │ │ ├── i18n │ │ │ ├── AnnotationInfo.java │ │ │ ├── Caption.java │ │ │ ├── CommonLabels.java │ │ │ ├── CommonLabels_de.java │ │ │ ├── CommonLabels_de_CH.java │ │ │ ├── CommonLabels_it.java │ │ │ ├── DefaultI18NFieldScanner.java │ │ │ ├── DefaultI18NProcessor.java │ │ │ ├── Description.java │ │ │ ├── DescriptionKey.java │ │ │ ├── Descriptions.java │ │ │ ├── Descriptions_de.java │ │ │ ├── Descriptions_it.java │ │ │ ├── DrillDownExclusions.java │ │ │ ├── I18N.java │ │ │ ├── I18NFieldScanner.java │ │ │ ├── KrailI18NModule.java │ │ │ ├── LabelKey.java │ │ │ ├── Labels.java │ │ │ ├── Labels_de.java │ │ │ ├── Labels_de_CH.java │ │ │ ├── Labels_it.java │ │ │ ├── MessageKey.java │ │ │ ├── Messages.java │ │ │ ├── Messages_de.java │ │ │ ├── VaadinCurrentLocale.java │ │ │ └── Value.java │ │ ├── navigate │ │ │ ├── DefaultInvalidURIHandler.java │ │ │ ├── DefaultLoginNavigationRule.java │ │ │ ├── DefaultLogoutNavigationRule.java │ │ │ ├── DefaultNavigator.java │ │ │ ├── DefaultViewChangeRule.java │ │ │ ├── InvalidURIHandler.java │ │ │ ├── LabelKeyForName.java │ │ │ ├── LoginNavigationRule.java │ │ │ ├── LogoutNavigationRule.java │ │ │ ├── NavigationModule.java │ │ │ ├── NavigationState.java │ │ │ ├── NavigationStateException.java │ │ │ ├── Navigator.java │ │ │ ├── StandardPageMappingReader.java │ │ │ ├── StrictURIFragmentHandler.java │ │ │ ├── URIFragmentHandler.java │ │ │ ├── URITracker.java │ │ │ ├── ViewChangeRule.java │ │ │ └── sitemap │ │ │ │ ├── AnnotationSitemapEntry.java │ │ │ │ ├── AnnotationSitemapLoader.java │ │ │ │ ├── AnnotationSitemapModule.java │ │ │ │ ├── DefaultAnnotationSitemapLoader.java │ │ │ │ ├── DefaultDirectSitemapLoader.java │ │ │ │ ├── DefaultMasterSitemap.java │ │ │ │ ├── DefaultSitemapBase.java │ │ │ │ ├── DefaultUserSitemap.java │ │ │ │ ├── DirectSitemapLoader.java │ │ │ │ ├── DirectSitemapModule.kt │ │ │ │ ├── LoaderReportBuilder.java │ │ │ │ ├── MasterSitemap.java │ │ │ │ ├── PageRecord.java │ │ │ │ ├── RedirectFrom.java │ │ │ │ ├── SiteMapFormatException.java │ │ │ │ ├── SiteMapInvalidClassException.java │ │ │ │ ├── Sitemap.java │ │ │ │ ├── SitemapException.java │ │ │ │ ├── SitemapLoader.java │ │ │ │ ├── SitemapLoaderBase.java │ │ │ │ ├── SitemapLockedException.java │ │ │ │ ├── SitemapSourceType.java │ │ │ │ ├── StandardPageKey.java │ │ │ │ ├── StandardPageLabels.java │ │ │ │ ├── StandardPageLabels_de.java │ │ │ │ ├── StandardPageLabels_it.java │ │ │ │ ├── SystemAccountManagementPages.kt │ │ │ │ ├── UserSitemap.java │ │ │ │ ├── UserSitemapBuilder.java │ │ │ │ ├── UserSitemapCopyExtension.java │ │ │ │ ├── UserSitemapLabelChangeMessage.java │ │ │ │ ├── UserSitemapNodeModifier.java │ │ │ │ ├── UserSitemapStructureChangeMessage.java │ │ │ │ ├── View.java │ │ │ │ └── set │ │ │ │ ├── SitemapChangedMessage.java │ │ │ │ └── SitemapTimeoutException.java │ │ ├── option │ │ │ ├── DefaultOptionPopup.java │ │ │ ├── KrailOptionModule.java │ │ │ ├── KrailOptionPermissionVerifier.java │ │ │ ├── OptionPermission.java │ │ │ ├── OptionPopup.java │ │ │ ├── VaadinOptionContext.java │ │ │ └── hierarchy │ │ │ │ └── SimpleUserHierarchy.java │ │ ├── push │ │ │ ├── Broadcaster.java │ │ │ ├── DefaultBroadcaster.java │ │ │ ├── DefaultPushMessageRouter.java │ │ │ ├── PushMessage.java │ │ │ └── PushMessageRouter.java │ │ ├── shiro │ │ │ ├── AlwaysPasswordCredentialsMatcher.java │ │ │ ├── AuthorizingRealmBase.java │ │ │ ├── DefaultLoginAttemptLog.java │ │ │ ├── DefaultNotAGuestExceptionHandler.java │ │ │ ├── DefaultNotAUserExceptionHandler.java │ │ │ ├── DefaultRealm.java │ │ │ ├── DefaultShiroModule.java │ │ │ ├── DefaultSubjectIdentifier.java │ │ │ ├── DefaultUnauthenticatedExceptionHandler.java │ │ │ ├── DefaultUnauthorizedExceptionHandler.java │ │ │ ├── DefaultVaadinSessionProvider.java │ │ │ ├── KrailSecurityManager.java │ │ │ ├── LoginAttemptLog.java │ │ │ ├── NotAGuestExceptionHandler.kt │ │ │ ├── NotAUserExceptionHandler.kt │ │ │ ├── PageAccessControl.java │ │ │ ├── PageAccessController.java │ │ │ ├── PagePermission.java │ │ │ ├── ShiroVaadinModule.java │ │ │ ├── SubjectIdentifier.java │ │ │ ├── UnauthenticatedExceptionHandler.kt │ │ │ ├── UnauthorizedExceptionHandler.kt │ │ │ ├── VaadinSessionManager.java │ │ │ ├── VaadinSessionProvider.java │ │ │ └── aop │ │ │ │ ├── AnnotationResolver.java │ │ │ │ ├── AuthenticatedMethodInterceptor.java │ │ │ │ ├── DefaultAnnotationResolver.java │ │ │ │ ├── GuestMethodInterceptor.java │ │ │ │ ├── KrailShiroAopModule.java │ │ │ │ ├── NotAGuestException.java │ │ │ │ ├── NotAUserException.java │ │ │ │ ├── PermissionsMethodInterceptor.java │ │ │ │ ├── RolesMethodInterceptor.java │ │ │ │ ├── ShiroMethodInterceptor.java │ │ │ │ └── UserMethodInterceptor.java │ │ ├── sysadmin │ │ │ ├── I18NView.java │ │ │ ├── SitemapReportView.java │ │ │ ├── SystemAdminModule.java │ │ │ └── SystemAdminPages.java │ │ ├── ui │ │ │ ├── ApplicationTitle.java │ │ │ ├── BasicUI.java │ │ │ ├── BasicUIProvider.java │ │ │ ├── BrowserProvider.java │ │ │ ├── DataTypeModule.java │ │ │ ├── DataTypeToUI.java │ │ │ ├── DefaultApplicationUI.java │ │ │ ├── DefaultDataTypeToUI.java │ │ │ ├── DefaultUIModule.java │ │ │ ├── MethodReconfigured.java │ │ │ ├── ScopedUI.java │ │ │ ├── ScopedUIProvider.java │ │ │ └── UIProviderException.java │ │ ├── user │ │ │ ├── notify │ │ │ │ ├── DefaultUserNotifier.java │ │ │ │ ├── DefaultVaadinNotification.java │ │ │ │ ├── ErrorNotificationMessage.java │ │ │ │ ├── InformationNotificationMessage.java │ │ │ │ ├── NotificationMessage.java │ │ │ │ ├── VaadinNotification.java │ │ │ │ └── WarningNotificationMessage.java │ │ │ └── status │ │ │ │ ├── UserStatusBusMessage.java │ │ │ │ └── UserStatusChangeSource.java │ │ ├── vaadin │ │ │ ├── ID.java │ │ │ ├── MenuItemComparator.java │ │ │ ├── OptionBinder.java │ │ │ ├── OptionSetter.java │ │ │ ├── OptionValueProvider.java │ │ │ ├── SourceTreeWrapper_VaadinTree.java │ │ │ ├── TargetTreeWrapper_MenuBar.java │ │ │ ├── TargetTreeWrapper_VaadinTree.java │ │ │ └── UserSitemapNodeCaption.java │ │ ├── validation │ │ │ ├── JavaxValidationSubstitutes.java │ │ │ ├── KrailInterpolator.java │ │ │ ├── KrailValidationModule.java │ │ │ ├── ValidationKey.java │ │ │ ├── Validations.java │ │ │ ├── Validations_de.java │ │ │ ├── Validations_es.java │ │ │ └── Validations_it.java │ │ └── view │ │ │ ├── BeforeViewChangeBusMessage.java │ │ │ ├── DefaultErrorView.java │ │ │ ├── DefaultLogoutView.java │ │ │ ├── DefaultPrivateHomeView.java │ │ │ ├── DefaultPublicHomeView.kt │ │ │ ├── DefaultRequestSystemAccountCreateView.java │ │ │ ├── DefaultRequestSystemAccountEnableView.java │ │ │ ├── DefaultRequestSystemAccountRefreshView.java │ │ │ ├── DefaultRequestSystemAccountResetView.java │ │ │ ├── DefaultRequestSystemAccountUnlockView.java │ │ │ ├── DefaultSystemAccountView.java │ │ │ ├── DefaultViewFactory.kt │ │ │ ├── ErrorView.java │ │ │ ├── Grid3x3ViewBase.java │ │ │ ├── GridViewBase.java │ │ │ ├── KrailViewDisplay.java │ │ │ ├── KrailViewHolder.java │ │ │ ├── LogoutView.java │ │ │ ├── PrivateHomeView.java │ │ │ ├── PublicHomeView.java │ │ │ ├── RequestSystemAccountCreateView.java │ │ │ ├── RequestSystemAccountEnableView.java │ │ │ ├── RequestSystemAccountRefreshView.java │ │ │ ├── RequestSystemAccountResetView.java │ │ │ ├── RequestSystemAccountUnlockView.java │ │ │ ├── StandardPageViewBase.java │ │ │ ├── SystemAccountView.java │ │ │ ├── VerticalViewBase.java │ │ │ ├── ViewBase.java │ │ │ ├── ViewBuildException.java │ │ │ ├── ViewFactory.java │ │ │ ├── ViewModule.java │ │ │ └── component │ │ │ ├── AfterViewChangeBusMessage.java │ │ │ ├── ApplicationHeader.java │ │ │ ├── ApplicationLogo.java │ │ │ ├── BroadcastMessageLog.java │ │ │ ├── DefaultApplicationHeader.java │ │ │ ├── DefaultApplicationLogo.java │ │ │ ├── DefaultLocaleSelector.java │ │ │ ├── DefaultMessageBar.java │ │ │ ├── DefaultUserNavigationMenu.java │ │ │ ├── DefaultUserNavigationMenuBuilder.java │ │ │ ├── DefaultUserNavigationTree.java │ │ │ ├── DefaultUserNavigationTreeBuilder.java │ │ │ ├── LocaleSelector.java │ │ │ ├── LoginFormException.java │ │ │ ├── LogoutPageFilter.java │ │ │ ├── MenuBarNodeModifier.java │ │ │ ├── MessageBar.java │ │ │ ├── NoNavFilter.java │ │ │ ├── UserNavigationMenu.java │ │ │ ├── UserNavigationMenuBuilder.java │ │ │ ├── UserNavigationTree.java │ │ │ ├── UserNavigationTreeBuilder.java │ │ │ ├── UserNavigationTreeNodeModifier.java │ │ │ └── ViewChangeBusMessage.java │ │ ├── i18n │ │ └── util │ │ │ ├── DefaultPatternUtility.java │ │ │ └── I18NKeyFromSample.java │ │ ├── persist │ │ ├── inmemory │ │ │ └── entity │ │ │ │ └── PatternEntity.java │ │ └── jpa │ │ │ └── Select.java │ │ ├── testutil │ │ ├── dummy │ │ │ ├── DefaultDummy.java │ │ │ ├── Dummy.java │ │ │ └── DummyModule.java │ │ ├── eventbus │ │ │ ├── TestEventBusErrorHandler.java │ │ │ └── TestEventBusModule.java │ │ ├── guice │ │ │ ├── uiscope │ │ │ │ └── TestUIScopeModule.java │ │ │ └── vsscope │ │ │ │ └── TestVaadinSessionScopeModule.java │ │ └── ui │ │ │ └── TestUIModule.java │ │ └── util │ │ ├── DefaultResourceUtils.java │ │ ├── Experimental.java │ │ ├── ResourceUtils.java │ │ └── UtilsModule.java ├── kotlin │ └── uk │ │ └── q3c │ │ └── krail │ │ ├── core │ │ ├── ConfigurationException.kt │ │ ├── env │ │ │ ├── Bootstrap.kt │ │ │ ├── EnvironmentModules.kt │ │ │ └── RunningOn.kt │ │ ├── error │ │ │ ├── ErrorModule.kt │ │ │ └── SystemErrorNotification.kt │ │ ├── eventbus │ │ │ ├── Events.kt │ │ │ └── VaadinEventBusAutoSubscriber.kt │ │ ├── form │ │ │ ├── Binders.kt │ │ │ ├── ConverterFactory.kt │ │ │ ├── ConverterModule.kt │ │ │ ├── DataProviders.kt │ │ │ ├── EditSaveCancel.kt │ │ │ ├── Form.kt │ │ │ ├── FormBuilder.kt │ │ │ ├── FormConfiguration.kt │ │ │ ├── FormDSL.kt │ │ │ ├── FormDetailSection.kt │ │ │ ├── FormSectionConfiguration.kt │ │ │ ├── FormSupport.kt │ │ │ ├── FormTableSection.kt │ │ │ ├── MapDBBaseDao.kt │ │ │ ├── PropertyConfiguration.kt │ │ │ ├── SectionBuilder.kt │ │ │ └── Validator.kt │ │ ├── guice │ │ │ └── uiscope │ │ │ │ └── UIKey.kt │ │ ├── i18n │ │ │ ├── CommonLabelKey.kt │ │ │ ├── I18NProcessor.kt │ │ │ └── NullI18NKey.kt │ │ ├── monitor │ │ │ └── PageReady.kt │ │ ├── navigate │ │ │ └── sitemap │ │ │ │ ├── DefaultSitemapFinisher.kt │ │ │ │ ├── DefaultSitemapService.kt │ │ │ │ ├── DirectSitemapEntry.kt │ │ │ │ ├── EmptyView.kt │ │ │ │ ├── MasterSitemapNode.kt │ │ │ │ ├── NavigationCommand.kt │ │ │ │ ├── NavigatorProvider.kt │ │ │ │ ├── NodeRecord.kt │ │ │ │ ├── NodeVisitor.kt │ │ │ │ ├── RedirectEntry.kt │ │ │ │ ├── SitemapFinisher.kt │ │ │ │ ├── SitemapModule.kt │ │ │ │ ├── SitemapNode.kt │ │ │ │ ├── SitemapService.kt │ │ │ │ ├── StandardPagesModule.kt │ │ │ │ ├── UserSitemapNode.kt │ │ │ │ ├── UserSitemapNodeSorter.kt │ │ │ │ └── comparator │ │ │ │ ├── AlphabeticAscending.kt │ │ │ │ ├── AlphabeticDescending.kt │ │ │ │ ├── InsertionOrderAscending.kt │ │ │ │ ├── InsertionOrderDescending.kt │ │ │ │ ├── PositionIndexAscending.kt │ │ │ │ ├── PositionIndexDescending.kt │ │ │ │ ├── UserSitemapNodeComparator.kt │ │ │ │ └── UserSitemapSorters.kt │ │ ├── persist │ │ │ └── FormDaoModule.kt │ │ ├── push │ │ │ ├── PushConfiguration.kt │ │ │ └── PushModule.kt │ │ ├── shiro │ │ │ ├── DefaultJWTKeyProvider.kt │ │ │ ├── DefaultJWTProvider.kt │ │ │ ├── DefaultSubjectProvider.kt │ │ │ ├── JWTKeyProvider.kt │ │ │ ├── JWTProvider.kt │ │ │ ├── KrailErrorHandler.kt │ │ │ └── SubjectProvider.kt │ │ ├── sysadmin │ │ │ └── SystemAdminView.kt │ │ ├── ui │ │ │ ├── BootstrapUI.kt │ │ │ └── SimpleUI.kt │ │ ├── user │ │ │ ├── DefaultLoginView.kt │ │ │ ├── LoginCaption.kt │ │ │ ├── LoginDescriptionKey.kt │ │ │ ├── LoginDescriptions.kt │ │ │ ├── LoginDescriptions_de.kt │ │ │ ├── LoginDescriptions_it.kt │ │ │ ├── LoginLabelKey.kt │ │ │ ├── LoginLabels.kt │ │ │ ├── LoginLabels_de.kt │ │ │ ├── LoginLabels_de_CH.kt │ │ │ ├── LoginLabels_it.kt │ │ │ ├── LoginView.kt │ │ │ ├── User.kt │ │ │ ├── UserModule.kt │ │ │ ├── UserStatus.kt │ │ │ └── notify │ │ │ │ └── UserNotifier.kt │ │ ├── vaadin │ │ │ └── DefaultOptionBinder.kt │ │ └── view │ │ │ ├── KrailView.kt │ │ │ ├── NavigationStateExt.kt │ │ │ ├── NavigationView.kt │ │ │ ├── ViewConfiguration.kt │ │ │ └── component │ │ │ ├── ComponentIdGenerator.kt │ │ │ ├── DefaultComponentModule.kt │ │ │ ├── DefaultUserStatusPanel.kt │ │ │ ├── I18NLabel.kt │ │ │ ├── IconFactory.kt │ │ │ ├── LocaleContainer.kt │ │ │ ├── NavigationBar.kt │ │ │ ├── NavigationButton.kt │ │ │ ├── NavigationButtonPanel.kt │ │ │ ├── NavigationCommand.kt │ │ │ ├── PageNavigationButtonBuilder.kt │ │ │ ├── PageNavigationPanel.kt │ │ │ ├── TranslatableComponents.kt │ │ │ └── UserStatusPanel.kt │ │ ├── service │ │ └── monitor │ │ │ └── DefaultServiceMonitor.kt │ │ ├── startup │ │ └── Startup.kt │ │ └── testutil │ │ └── view │ │ └── ViewFieldChecker.kt └── resources │ └── de │ └── steinwedel │ └── messagebox │ └── icons │ ├── classic │ ├── button │ │ ├── arrow_refresh.png │ │ ├── cross.png │ │ ├── disk.png │ │ ├── door.png │ │ ├── lightbulb.png │ │ ├── lightning_go.png │ │ ├── readme.txt │ │ └── tick.png │ └── dialog │ │ ├── error.png │ │ ├── info.png │ │ ├── question.png │ │ └── warning.png │ └── flat │ └── dialog │ ├── error.svg │ ├── info.svg │ ├── question.svg │ └── warning.svg └── test ├── groovy └── uk │ └── q3c │ ├── krail │ ├── core │ │ ├── eventbus │ │ │ ├── DefaultSessionBusProviderTest.groovy │ │ │ └── DefaultUIBusProviderTest.groovy │ │ ├── guice │ │ │ ├── BaseServletTest.groovy │ │ │ ├── DefaultServletContextListenerBindingsTest.groovy │ │ │ ├── GuiceModuleTestBase.groovy │ │ │ └── uiscope │ │ │ │ └── UIScopeProviderTest.groovy │ │ ├── i18n │ │ │ └── I18NModuleTest.groovy │ │ ├── navigate │ │ │ ├── DefaultInvalidURIHandlerTest.groovy │ │ │ ├── NavigationStateTest.groovy │ │ │ └── sitemap │ │ │ │ ├── DefaultMasterSitemapTest2.groovy │ │ │ │ └── DefaultMasterSitemapTest_Lock.groovy │ │ ├── option │ │ │ ├── DefaultOptionPopupTest.groovy │ │ │ └── hierarchy │ │ │ │ └── SimpleUserHierarchyTest.java │ │ ├── persist │ │ │ ├── cache │ │ │ │ └── i18n │ │ │ │ │ └── DefaultPatternCacheLoaderTest.groovy │ │ │ ├── clazz │ │ │ │ └── i18n │ │ │ │ │ ├── DefaultClassPatternDaoTest.groovy │ │ │ │ │ └── EnumResourceBundleTest.groovy │ │ │ └── inmemory │ │ │ │ └── i18n │ │ │ │ └── PatternEntityTest.groovy │ │ ├── push │ │ │ ├── DefaultBroadcasterTest.groovy │ │ │ ├── PushMessageTest.groovy │ │ │ └── PushModuleTest.groovy │ │ ├── shiro │ │ │ ├── AlwaysPasswordCredentialsMatcherTest.groovy │ │ │ ├── DefaultRealmTest.groovy │ │ │ ├── DefaultShiroModuleTest.groovy │ │ │ ├── DefaultVaadinSessionProviderTest.groovy │ │ │ ├── KrailSecurityManagerTest.groovy │ │ │ ├── VaadinSessionManagerTest.groovy │ │ │ └── aop │ │ │ │ ├── AuthenticatedMethodInterceptorTest.groovy │ │ │ │ ├── DefaultAnnotationResolverTest.groovy │ │ │ │ ├── GuestMethodInterceptorTest.groovy │ │ │ │ ├── KrailShiroAopModuleTest.groovy │ │ │ │ ├── PermissionsMethodInterceptorTest.groovy │ │ │ │ ├── RolesMethodInterceptorTest.groovy │ │ │ │ └── UserMethodInterceptorTest.groovy │ │ ├── sysadmin │ │ │ ├── SitemapReportViewTest.groovy │ │ │ └── SystemAdminPagesTest.groovy │ │ ├── ui │ │ │ ├── BasicUIProviderTest.groovy │ │ │ ├── BrowserProviderTest.groovy │ │ │ └── ScopedUIProviderTest.groovy │ │ ├── user │ │ │ └── notify │ │ │ │ └── DefaultVaadinNotificationTest.groovy │ │ ├── validation │ │ │ ├── KrailInterpolatorTest.groovy │ │ │ ├── Validation_IntegrationTest.groovy │ │ │ └── ValidationsTest.groovy │ │ └── view │ │ │ ├── DefaultErrorViewTest.groovy │ │ │ ├── DefaultLogoutViewTest.groovy │ │ │ ├── DefaultPrivateHomeViewTest.groovy │ │ │ ├── DefaultPublicHomeViewTest.groovy │ │ │ ├── DefaultRequestSystemAccountCreateViewTest.groovy │ │ │ ├── DefaultRequestSystemAccountEnableViewTest.groovy │ │ │ ├── DefaultRequestSystemAccountRefreshViewTest.groovy │ │ │ ├── DefaultRequestSystemAccountResetViewTest.groovy │ │ │ ├── DefaultRequestSystemAccountUnlockViewTest.groovy │ │ │ ├── DefaultSystemAccountViewTest.groovy │ │ │ ├── GridViewBaseTest.groovy │ │ │ ├── ViewTest.groovy │ │ │ └── component │ │ │ ├── DefaultApplicationHeaderTest.groovy │ │ │ └── DefaultMessageBarTest.groovy │ ├── i18n │ │ └── util │ │ │ └── DefaultPatternUtilityTest.groovy │ ├── option │ │ └── option │ │ │ └── inmemory │ │ │ └── dao │ │ │ └── InMemoryOptionDaoDelegateTest.groovy │ ├── persist │ │ └── jpa │ │ │ └── SelectTest.java │ ├── service │ │ ├── ServiceExceptionTests.groovy │ │ ├── TestService0.groovy │ │ └── monitor │ │ │ └── DefaultServiceMonitorTest.groovy │ ├── testutil │ │ └── option │ │ │ └── OptionDaoTestBase.groovy │ └── util │ │ └── DefaultResourceUtilsTest.groovy │ └── util │ └── TreeCopyTest2.groovy ├── java ├── WEB-INF │ ├── icons │ │ └── flags_iso │ │ │ └── 48 │ │ │ ├── de.png │ │ │ ├── gb.png │ │ │ └── it.png │ ├── krail.ini │ └── test.krail.ini ├── fixture │ ├── KryoPattern.java │ ├── NonSerializableDependency.java │ ├── SerializableDependency.java │ └── TestConfigurationException.java ├── fixture1 │ ├── TestAnnotatedView.java │ ├── TestLbls3.java │ └── TestLbls3_en.java ├── sitemap.properties ├── test.shiro.ini ├── test1.krail.ini ├── test2.krail.ini ├── test3.krail.ini ├── test4.krail.ini ├── test5.krail.ini ├── test6.krail.ini ├── test7.krail.ini └── uk │ └── q3c │ └── krail │ ├── DefaultResourceUtilsTest.kt │ ├── core │ ├── config │ │ ├── config1.ini │ │ ├── config2.ini │ │ └── config3.ini │ ├── data │ │ ├── TestEntity.java │ │ └── TestEntity2.java │ ├── eventbus │ │ ├── SessionBusListener.java │ │ ├── VaadinEventBusAutoSubscriberTest.java │ │ ├── VaadinEventBusModuleTest_BusScopeAndNames.java │ │ └── VaadinEventBusModuleTest_binding.java │ ├── form │ │ └── FormConfigurationExample1.java │ ├── guice │ │ ├── AJavaClass.java │ │ └── threadscope │ │ │ ├── SomeClass.java │ │ │ └── ThreadScopeTest.java │ ├── i18n │ │ ├── CompositeComponent_with_Caption_Only.java │ │ ├── CompositeComponent_with_Caption_and_I18N.java │ │ ├── CompositeComponent_with_I18N_only.java │ │ ├── DefaultI18NFieldScannerTest.java │ │ ├── DefaultI18NHostClassIdentifierTest.java │ │ ├── DefaultI18NProcessorTest.java │ │ ├── DescriptionKeyTest.java │ │ ├── I18NKeyTest.java │ │ ├── I18NMonitoredButton.java │ │ ├── I18NTestClass.java │ │ ├── I18NTestClass2.java │ │ ├── I18NTestClass3.java │ │ ├── I18NTestClass4.java │ │ ├── I18NTestClass5.java │ │ ├── I18NTestClass5a.java │ │ ├── I18NTestClass7.java │ │ ├── I18NTestClass8.java │ │ ├── I18NTestClass9.java │ │ ├── I18NValueTest.java │ │ ├── KrailCaption.java │ │ ├── LabelKeyTest.java │ │ ├── TestCompositeComponent.java │ │ ├── TestCompositeComponentNested.java │ │ ├── TestCompositeComponent_componentNotConstructed.java │ │ ├── TestCompositeNonComponent.java │ │ ├── TestI18N.java │ │ ├── TestLabelKey2.java │ │ ├── TestLabelKey3.java │ │ ├── TestLabelKey_Invalid.java │ │ ├── VaadinCurrentLocaleTest.java │ │ └── i18nModule │ │ │ ├── TestPatternSource.java │ │ │ └── TestPatternSource1.java │ ├── navigate │ │ ├── LabelKeyForNameTest.java │ │ ├── StrictURIFragmentHandlerTest.java │ │ ├── URITrackerTest.java │ │ └── sitemap │ │ │ ├── AnnotationSitemapModuleTest.java │ │ │ ├── DeconstructPageMappingTest.java │ │ │ ├── DefaultAnnotationSitemapLoaderTest.java │ │ │ ├── DefaultDirectSitemapLoaderTest_none.java │ │ │ ├── DefaultMasterSitemapTest.java │ │ │ ├── DefaultSitemapFinisherTest.java │ │ │ ├── DefaultStandardPagesModuleTest.java │ │ │ ├── DefaultUserSitemapTest.java │ │ │ ├── DirectSitemapModuleTest.java │ │ │ ├── LoaderReportBuilderTest.java │ │ │ ├── MasterSitemapNodeTest.java │ │ │ ├── StandardPageKeyTest.java │ │ │ ├── SystemAccountManagementPagesTest.java │ │ │ ├── TestWithSitemap.java │ │ │ ├── UserSitemapBuilderTest.java │ │ │ └── comparator │ │ │ └── DefaultUserSitemapSortersTest.java │ ├── option │ │ ├── OptionDescriptorTest.java │ │ ├── Option_IntegrationTest.java │ │ └── cache │ │ │ ├── MockOptionDaoDelegate.java │ │ │ └── OptionPermissionTest.java │ ├── push │ │ └── DefaultPushMessageRouterTest.java │ ├── shiro │ │ ├── AbstractShiroTest.java │ │ ├── DefaultLoginAttemptLogTest.java │ │ ├── DefaultSubjectIdentifierTest.java │ │ ├── DefaultUnauthenticatedExceptionHandlerTest.java │ │ ├── DefaultUnauthorisedExceptionHandlerTest.java │ │ ├── PagePermissionTest.java │ │ ├── ShiroUnitTestBase.java │ │ ├── URIPermissionsTest.java │ │ └── aop │ │ │ └── InterceptorTestClass.java │ ├── ui │ │ ├── DefaultApplicationUITest.java │ │ ├── DefaultDataTypeToUITest.java │ │ └── ScopedUITest.java │ ├── user │ │ └── notify │ │ │ └── DefaultUserNotifierTest.java │ ├── vaadin │ │ ├── IDTest.java │ │ ├── IDTestInstance.java │ │ ├── JavaMockVaadinSession.java │ │ ├── MenuItemComparatorTest.java │ │ ├── SourceTreeWrapper_VaadinTreeTest.java │ │ ├── SourceTreeWrapper_VaadinTreeTest2.java │ │ ├── TargetTreeWrapper_MenuBarTest.java │ │ ├── TargetTreeWrapper_VaadinTreeTest.java │ │ └── TreeCopyTest.java │ ├── validation │ │ ├── Adult.java │ │ ├── AdultValidator.java │ │ ├── MalformedAnnotation.java │ │ ├── MalformedValidator.java │ │ ├── Max.java │ │ ├── MaxValidatorForNumber.java │ │ ├── SimpleContext.java │ │ ├── TestFieldNameKey.java │ │ ├── TestFieldNames.java │ │ ├── TestFieldNames_de.java │ │ ├── TestValidationKey.java │ │ └── TestValidations.java │ └── view │ │ ├── Grid3x3ViewBaseTest.java │ │ ├── ScopeAndInjectTest.java │ │ ├── TestView3.java │ │ ├── Thingy.java │ │ ├── ViewBaseTest.java │ │ ├── Widget.java │ │ ├── component │ │ ├── DefaultUserNavigationMenuBuilderTest.java │ │ ├── DefaultUserNavigationMenuTest.java │ │ ├── DefaultUserNavigationTreeBuilderTest.java │ │ └── DefaultUserNavigationTreeTest.kt │ │ └── testviews │ │ └── subview │ │ ├── MoneyInOutView.java │ │ ├── NotKrailView.java │ │ └── TransferView.java │ ├── service │ ├── TestServiceA.java │ ├── TestServiceB.java │ ├── TestServiceC.java │ ├── TestServiceD.java │ ├── TestServiceE.java │ └── test │ │ ├── MockService.java │ │ ├── MockServiceA.java │ │ ├── MockServiceB.java │ │ ├── MockServiceC.java │ │ ├── MockServiceD.java │ │ ├── MockServiceE.java │ │ ├── MockServiceF.java │ │ ├── MockServiceG.java │ │ └── MockServiceH.java │ └── testutil │ └── TestEventBusErrorHandlerTest.kt ├── kotlin ├── fixture │ ├── ReferenceUserSitemap.kt │ ├── TestViewChangeListener.kt │ └── testviews2 │ │ ├── My_AccountView.kt │ │ ├── OptionsView.kt │ │ ├── PrivateView.kt │ │ ├── TestAnnotatedView.kt │ │ ├── TestLoginView.kt │ │ ├── TestLogoutView.kt │ │ ├── TestPrivateHomeView.kt │ │ ├── TestPublicHomeView.kt │ │ ├── ViewA.kt │ │ ├── ViewA1.kt │ │ ├── ViewA11.kt │ │ ├── ViewA111.kt │ │ ├── ViewB.kt │ │ ├── ViewB1.kt │ │ ├── ViewB11.kt │ │ ├── ViewB12.kt │ │ ├── ViewB121.kt │ │ ├── ViewB122.kt │ │ └── WigglyHomeView.kt └── uk │ └── q3c │ └── krail │ └── core │ ├── form │ ├── BindersTest.kt │ ├── ConverterFactoryTest.kt │ ├── DataProvidersTest.kt │ ├── DefaultEditSaveCancelBuilderTest.kt │ ├── DefaultEditSaveCancelTest.kt │ ├── DefaultFormTest.kt │ ├── FormConfigurationTest_FluentJava.kt │ ├── FormDSLTest.kt │ ├── FormSupportTest.kt │ ├── MapDBBaseDaoTest.kt │ ├── PropertyConfigurationBuilderTest.kt │ ├── PropertyConfigurationMergeTest.kt │ ├── PropertyConfigurationTest.kt │ └── StandardFormSectionBuilderTest.kt │ ├── guice │ ├── BootstrapTest.kt │ ├── CoreBindingsCollatorTest.kt │ ├── DefaultSerializationSupportTest.kt │ ├── Experimental.kt │ ├── InjectorFactoryTest.kt │ └── uiscope │ │ └── UIScopeTest.kt │ ├── i18n │ ├── TestKrailI18NModule.kt │ ├── TestKrailI18NModule2.kt │ └── util │ │ └── I18NKeyFromSampleTest.kt │ ├── navigate │ ├── DefaultLoginNavigationRuleTest.kt │ ├── DefaultNavigatorTest.kt │ └── sitemap │ │ ├── DefaultDirectSitemapLoaderTest.kt │ │ ├── DefaultSitemapServiceTest.kt │ │ ├── DefaultUserSitemapNodeSorterTest.kt │ │ └── TreeDataWalkerTest.kt │ ├── option │ └── beans │ │ └── DefaultOptionBinderTest.kt │ ├── shiro │ ├── JWTProviderTest.kt │ ├── KrailErrorHandlerTest.kt │ └── SubjectProviderTest.kt │ ├── sysadmin │ ├── I18NViewTest.kt │ └── SystemAdminViewTest.kt │ ├── ui │ ├── ScopedUITest2.kt │ └── UIModuleTest.kt │ ├── user │ └── DefaultLoginViewTest.kt │ ├── vaadin │ ├── DataModuleTest.kt │ ├── DefaultConverterFactoryTest.kt │ └── MockVaadinSession.kt │ └── view │ └── component │ ├── DefaultComponentIdGeneratorTest.kt │ ├── DefaultLocaleSelectorTest.kt │ ├── DefaultPageNavigationButtonBuilderTest.kt │ ├── DefaultTranslatableComponentsTest.kt │ ├── DefaultUserStatusComponentsTest.kt │ ├── DefaultUserStatusPanelTest.kt │ ├── LocaleContainerTest.kt │ ├── NavigationButtonTest.kt │ ├── NavigationCommandTest.kt │ └── TestViews.kt └── resources ├── Labels.properties ├── Labels.ref ├── Labels_de.ref ├── Labels_en_GB.ref ├── Labels_it.ref ├── Labels_it.ref_exc ├── NewBundle_it.ref_exc ├── TestLabels.properties ├── TestLabels_de.properties_ref ├── TestLabels_it.properties_ref ├── fixture1 ├── TestLabels.properties ├── TestLabels_it.properties └── TestLbls2.properties ├── logback.groovy └── uk └── q3c └── krail └── core ├── env ├── krail-bootstrap1.yml ├── krail-bootstrap2.yml └── krail-bootstrap3.yml ├── i18n ├── TestLabels.properties └── TestLabels_it.properties ├── navigate └── sitemap │ └── LoadReportBuilderTest.template └── view └── component ├── WEB-INF └── icons │ └── flags_iso │ └── 48 │ ├── de.png │ ├── gb.png │ └── it.png └── basedir-marker.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Handle line endings automatically for files detected as text 2 | # and leave all files detected as binary untouched. 3 | * text=auto 4 | 5 | # 6 | # The above will handle all files NOT found below 7 | # 8 | # These files are text and should be normalized (Convert crlf => lf) 9 | *.css text 10 | *.df text 11 | *.htm text 12 | *.html text 13 | *.java text 14 | *.js text 15 | *.json text 16 | *.jsp text 17 | *.jspf text 18 | *.properties text 19 | *.sh text 20 | *.svg text 21 | *.tld text 22 | *.txt text 23 | *.xml text 24 | 25 | # These files are binary and should be left untouched 26 | # (binary is a macro for -text -diff) 27 | *.class binary 28 | *.dll binary 29 | *.ear binary 30 | *.gif binary 31 | *.ico binary 32 | *.jar binary 33 | *.jpg binary 34 | *.jpeg binary 35 | *.png binary 36 | *.so binary 37 | *.war binary 38 | 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | .idea 3 | .settings 4 | bin 5 | build 6 | logs 7 | out 8 | docs/_build 9 | 10 | *.iml 11 | *.ipr 12 | *.iws 13 | .classpath 14 | .project 15 | 16 | _book 17 | 18 | deps.txt 19 | 20 | settings.gradle~ 21 | .gitattributes~ 22 | build.gradle~ 23 | .gitignore~ 24 | README.md~ 25 | 26 | *.properties~ 27 | 28 | 29 | 30 | node_modules -------------------------------------------------------------------------------- /Release Notes.md: -------------------------------------------------------------------------------- 1 | # Release notes for 0.16.13.0 2 | 3 | ## Overview 4 | 5 | A trivial release. Migrated BootstrapUI from test app.  Deleted LightweightUI - it was unused -------------------------------------------------------------------------------- /docs/devguide/devguide-introduction.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Introduction to the Developer Guide 3 | =================================== 4 | 5 | This guide is aimed at those who are developing Krail itself, or are 6 | just interested in the reasons behind some of the design choices made. 7 | 8 | Accuracy 9 | ======== 10 | 11 | Please note that some of this this guide is still a fairly random 12 | collection of notes, and has not kept up to date with releases. 13 | 14 | Up to date sections 15 | ------------------- 16 | 17 | These sections, however, are considered to be up to date: 18 | 19 | - :doc:`Goals <../devguide/devguide-goals>` 20 | 21 | - :doc:`Bootstrap <../devguide/devguide-bootstrap>` 22 | 23 | - :doc:`Push <../devguide/devguide-push>` 24 | 25 | - :doc:`Serialisation <../devguide/devguide-serialisation>` 26 | 27 | - :doc:`Vertx <../devguide/devguide-vertx>` 28 | -------------------------------------------------------------------------------- /docs/devguide/devguide-vertx.rst: -------------------------------------------------------------------------------- 1 | ===== 2 | Vertx 3 | ===== 4 | 5 | There are a couple of libraries on Github which provide Guice 6 | integration with Vert.x, but don’t meet Krail’s requirements. 7 | 8 | Injector scope 9 | ============== 10 | 11 | It would be entirely possible to have Singleton scope be equivalent to 12 | Vert.x instance scope. At first sight, this looks attractive, but it 13 | would promote data sharing in a distributed application. 14 | 15 | This would reduce the isolation / encapsulation between services and is 16 | therefore considered to be a "bad thing". 17 | 18 | The Krail implementation considers a Verticle as Singleton scope (the 19 | Injector is created in the Verticle), encouraging the use of 20 | asynchronous events rather than sharing data. 21 | -------------------------------------------------------------------------------- /docs/devguide/license.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | License 3 | ======= 4 | 5 | Krail is licensed under `Apache 2.0 `__ 6 | -------------------------------------------------------------------------------- /docs/img/basic-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/docs/img/basic-screenshot.png -------------------------------------------------------------------------------- /docs/img/basic-screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/docs/img/basic-screenshot2.png -------------------------------------------------------------------------------- /docs/styles/website.scss: -------------------------------------------------------------------------------- 1 | $primaryColor: #33cc33; 2 | 3 | #info { 4 | color: #000000; 5 | background: #c8ffe7; 6 | margin: 10%; 7 | border-style: solid; 8 | border-color: #3b3f54; 9 | border-width: 3px; 10 | 11 | } 12 | 13 | #warning { 14 | color: #0000fe; 15 | background: #ffc149; 16 | margin: 10%; 17 | } 18 | 19 | #javanote { 20 | color: #0000fe; 21 | background: #c9eeff; 22 | margin: 10%; 23 | } 24 | 25 | #kotlinnote { 26 | color: #0000fe; 27 | background: #d7c2d8; 28 | margin: 10%; 29 | } 30 | 31 | .wiggly { 32 | color: #c8ffe7; 33 | background: #9dbed8; 34 | margin: 20%; 35 | } -------------------------------------------------------------------------------- /docs/tutorial/convert.sh: -------------------------------------------------------------------------------- 1 | # This script was created to convert a directory full 2 | # of markdown files into rst equivalents. It uses 3 | # pandoc to do the conversion. 4 | # 5 | # 1. Install pandoc from http://johnmacfarlane.net/pandoc/ 6 | # 2. Copy this script into the directory containing the .md files 7 | # 3. Ensure that the script has execute permissions 8 | # 4. Run the script 9 | # 10 | # By default this will keep the original .md file 11 | 12 | FILES=*.xml 13 | for f in $FILES 14 | do 15 | # extension="${f##*.}" 16 | filename="${f%.*}" 17 | echo "Converting $f to $filename.rst" 18 | `pandoc $f -f docbook -t rst -o $filename.rst` 19 | # uncomment this line to delete the source file. 20 | # rm $f 21 | done 22 | -------------------------------------------------------------------------------- /docs/tutorial/convert2docbook.sh: -------------------------------------------------------------------------------- 1 | # This script was created to convert a directory full 2 | # of markdown files into rst equivalents. It uses 3 | # pandoc to do the conversion. 4 | # 5 | # 1. Install pandoc from http://johnmacfarlane.net/pandoc/ 6 | # 2. Copy this script into the directory containing the .md files 7 | # 3. Ensure that the script has execute permissions 8 | # 4. Run the script 9 | # 10 | # By default this will keep the original .md file 11 | 12 | FILES=*.adoc 13 | for f in $FILES 14 | do 15 | # extension="${f##*.}" 16 | filename="${f%.*}" 17 | echo "Converting $f to $filename.rst" 18 | `asciidoctor -b docbook $f` 19 | # uncomment this line to delete the source file. 20 | # rm $f 21 | done 22 | -------------------------------------------------------------------------------- /docs/tutorial/tutorial-create-hierarchy.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | Create a Hierarchy 3 | ================== 4 | 5 | 6 | to be written 7 | -------------------------------------------------------------------------------- /docs/tutorial/tutorial-functional-test.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | Functional Testing 3 | ================== 4 | 5 | 6 | Krail provides some support for Functional Testing out of the box. This 7 | is still in development, but there may be parts of it you may find 8 | useful. 9 | 10 | See :doc:`../devguide/devguide-functional-test` in the Developer Guide for more detail. 11 | -------------------------------------------------------------------------------- /docs/tutorial/tutorial-intro.rst: -------------------------------------------------------------------------------- 1 | ============================ 2 | Introduction to the Tutorial 3 | ============================ 4 | 5 | Welcome to the Krail Tutorial. It is definitely better to work through 6 | the Tutorial in sequence, but if you want to skip a step, you will find 7 | a link at the end of each chapter so that you can clone each stage from 8 | a GitHub repository. 9 | 10 | There is also a developers guide, but to be honest that is more like a 11 | collection of rough notes at the moment, until I can find time to write 12 | it properly. 13 | 14 | .. note:: This tutorial is based on the Vaadin 7 version of Krail - it should still be possible to follow it, but it will not be updated until the move to Eclipse Vert.x is done (or fails!) 15 | 16 | Please do give feedback, whether it is something you do like or 17 | something you do not like. 18 | 19 | Enjoy 20 | 21 | *David Sowerby* 22 | -------------------------------------------------------------------------------- /docs/userguide/license.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | License 3 | ======= 4 | 5 | 6 | Krail is licensed under `Apache 2.0 `__ 7 | -------------------------------------------------------------------------------- /docs/userguide/userguide-intro.rst: -------------------------------------------------------------------------------- 1 | ============================== 2 | Introduction to the User Guide 3 | ============================== 4 | 5 | This document aims to assist the Krail developer to understand how to develop an application based on Krail, by dipping in and out of features 6 | as required. 7 | 8 | A :doc:`Tutorial <../tutorial/tutorial-intro>` is available to walk through the process, step by step. 9 | 10 | If you are are interested in the reasons for some of the development decisions made in Krail, take a look at the :doc:`Developer Guide. <../devguide/devguide-introduction>`. -------------------------------------------------------------------------------- /gradle/spek.gradle: -------------------------------------------------------------------------------- 1 | ext.spekVersion = '1.2.1' 2 | ext.vintageEngineVersion='4.12.3' 3 | 4 | apply plugin: 'org.junit.platform.gradle.plugin' 5 | 6 | junitPlatform { 7 | platformVersion = junit_platform_version 8 | filters { 9 | engines { 10 | include 'spek', 'junit-vintage' 11 | } 12 | } 13 | } 14 | 15 | dependencies { 16 | testCompile "org.junit.platform:junit-platform-engine:$junit_platform_version" 17 | testCompile "org.junit.platform:junit-platform-runner:$junit_platform_version" 18 | testCompile "org.junit.platform:junit-platform-launcher:$junit_platform_version" 19 | 20 | testCompile "org.junit.vintage:junit-vintage-engine:$vintageEngineVersion" 21 | 22 | testCompile "org.jetbrains.spek:spek-api:$spekVersion" 23 | testCompile "org.jetbrains.spek:spek-subject-extension:$spekVersion" 24 | testCompile "org.jetbrains.spek:spek-junit-platform-engine:$spekVersion" 25 | 26 | testCompile "io.mockk:mockk:1.8.6" 27 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jul 19 08:50:54 BST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip 7 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/settings.gradle -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/ButtonType.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox; 2 | 3 | /** 4 | * An enumeration of button types. The value affects the displayed button icon and caption. 5 | * 6 | * @author Dieter Steinwedel 7 | */ 8 | public enum ButtonType { 9 | 10 | /** 11 | * Self-explaining. 12 | */ 13 | OK, 14 | 15 | /** 16 | * Self-explaining. 17 | */ 18 | ABORT, 19 | 20 | /** 21 | * Self-explaining. 22 | */ 23 | CANCEL, 24 | 25 | /** 26 | * Self-explaining. 27 | */ 28 | YES, 29 | 30 | /** 31 | * Self-explaining. 32 | */ 33 | NO, 34 | 35 | /** 36 | * Self-explaining. 37 | */ 38 | CLOSE, 39 | 40 | /** 41 | * Self-explaining. 42 | */ 43 | SAVE, 44 | 45 | /** 46 | * Self-explaining. 47 | */ 48 | RETRY, 49 | 50 | /** 51 | * Self-explaining. 52 | */ 53 | IGNORE, 54 | 55 | /** 56 | * Self-explaining. Keep in mind, that the dialog will not be closed, if the corresponding button is pressed! 57 | */ 58 | HELP; 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/TransitionListener.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Intercepts the displaying and closing of the MessageBox. Can be used to create transitions for the MessageBox 7 | * like fade in or out. 8 | * 9 | * @author Dieter Steinwedel 10 | */ 11 | public interface TransitionListener extends Serializable { 12 | 13 | /** 14 | * Intercepts the displaying of the dialog. 15 | * 16 | * @param messageBox The MessageBox instance to be displayed 17 | * @return Returns false, if the method implementation opens the MessageBox window itself. Otherwise returns true. 18 | */ 19 | public boolean show(MessageBox messageBox); 20 | 21 | /** 22 | * Intercepts the closing of the dialog. 23 | * 24 | * @param messageBox The MessageBox instance to be closed 25 | * @return Returns false, if the method implementation closes the MessageBox window itself. Otherwise returns true. 26 | */ 27 | public boolean close(MessageBox messageBox); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | public class ButtonCaptions extends ButtonCaptions_en { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_ar.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'ar'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_ar extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "موافق"}, 21 | {ButtonType.ABORT.name(), "أجهض"}, 22 | {ButtonType.CANCEL.name(), "ألغ"}, 23 | {ButtonType.YES.name(), "نعم"}, 24 | {ButtonType.NO.name(), "لا"}, 25 | {ButtonType.CLOSE.name(), "أغلق"}, 26 | {ButtonType.SAVE.name(), "احفظ"}, 27 | {ButtonType.RETRY.name(), "أعِد المحاولة"}, 28 | {ButtonType.IGNORE.name(), "تجاهل"}, 29 | {ButtonType.HELP.name(), "مساعدة"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_ca.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'ca'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_ca extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "D'acord"}, 21 | {ButtonType.ABORT.name(), "Interromp"}, 22 | {ButtonType.CANCEL.name(), "Cancel·la"}, 23 | {ButtonType.YES.name(), "Sí"}, 24 | {ButtonType.NO.name(), "No"}, 25 | {ButtonType.CLOSE.name(), "Tanca"}, 26 | {ButtonType.SAVE.name(), "Desa"}, 27 | {ButtonType.RETRY.name(), "Reintenta"}, 28 | {ButtonType.IGNORE.name(), "Ignora"}, 29 | {ButtonType.HELP.name(), "Ajuda"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_cs.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'cs'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_cs extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Přerušit"}, 22 | {ButtonType.CANCEL.name(), "Zrušit"}, 23 | {ButtonType.YES.name(), "Ano"}, 24 | {ButtonType.NO.name(), "Ne"}, 25 | {ButtonType.CLOSE.name(), "Zavřít"}, 26 | {ButtonType.SAVE.name(), "Uložit"}, 27 | {ButtonType.RETRY.name(), "Zkusit znovu"}, 28 | {ButtonType.IGNORE.name(), "Ignorovat"}, 29 | {ButtonType.HELP.name(), "Nápověda"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_da.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'da'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_da extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "O.k."}, 21 | {ButtonType.ABORT.name(), "Afbryd"}, 22 | {ButtonType.CANCEL.name(), "Annullér"}, 23 | {ButtonType.YES.name(), "Ja"}, 24 | {ButtonType.NO.name(), "Nej"}, 25 | {ButtonType.CLOSE.name(), "Luk"}, 26 | {ButtonType.SAVE.name(), "Gem"}, 27 | {ButtonType.RETRY.name(), "Forsøg igen"}, 28 | {ButtonType.IGNORE.name(), "Ignorér"}, 29 | {ButtonType.HELP.name(), "Hjælp"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_en.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'en'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_en extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Abort"}, 22 | {ButtonType.CANCEL.name(), "Cancel"}, 23 | {ButtonType.YES.name(), "Yes"}, 24 | {ButtonType.NO.name(), "No"}, 25 | {ButtonType.CLOSE.name(), "Close"}, 26 | {ButtonType.SAVE.name(), "Save"}, 27 | {ButtonType.RETRY.name(), "Retry"}, 28 | {ButtonType.IGNORE.name(), "Ignore"}, 29 | {ButtonType.HELP.name(), "Help"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_et.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'et'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_et extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Katkesta"}, 22 | {ButtonType.CANCEL.name(), "Loobu"}, 23 | {ButtonType.YES.name(), "Jah"}, 24 | {ButtonType.NO.name(), "Ei"}, 25 | {ButtonType.CLOSE.name(), "Sulge"}, 26 | {ButtonType.SAVE.name(), "Salvesta"}, 27 | {ButtonType.RETRY.name(), "Proovi uuesti"}, 28 | {ButtonType.IGNORE.name(), "Eira"}, 29 | {ButtonType.HELP.name(), "Abi"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_fa.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'fa'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_fa extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "تأیید"}, 21 | {ButtonType.ABORT.name(), "ساقط کردن"}, 22 | {ButtonType.CANCEL.name(), "لغو"}, 23 | {ButtonType.YES.name(), "بله"}, 24 | {ButtonType.NO.name(), "نه"}, 25 | {ButtonType.CLOSE.name(), "بستن"}, 26 | {ButtonType.SAVE.name(), "ذخیره"}, 27 | {ButtonType.RETRY.name(), "تلاش دوباره"}, 28 | {ButtonType.IGNORE.name(), "چشم‌پوشی"}, 29 | {ButtonType.HELP.name(), "کمک"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_fi.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'fi'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_fi extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Keskeytä"}, 22 | {ButtonType.CANCEL.name(), "Peru"}, 23 | {ButtonType.YES.name(), "Kyllä"}, 24 | {ButtonType.NO.name(), "Ei"}, 25 | {ButtonType.CLOSE.name(), "Sulje"}, 26 | {ButtonType.SAVE.name(), "Tallenna"}, 27 | {ButtonType.RETRY.name(), "Yritä uudelleen"}, 28 | {ButtonType.IGNORE.name(), "Ohita"}, 29 | {ButtonType.HELP.name(), "Ohje"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_fr.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'fr'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_fr extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "Ok"}, 21 | {ButtonType.ABORT.name(), "Interrompre"}, 22 | {ButtonType.CANCEL.name(), "Annuler"}, 23 | {ButtonType.YES.name(), "Oui"}, 24 | {ButtonType.NO.name(), "Non"}, 25 | {ButtonType.CLOSE.name(), "Fermer"}, 26 | {ButtonType.SAVE.name(), "Enregistrer"}, 27 | {ButtonType.RETRY.name(), "Réessayer"}, 28 | {ButtonType.IGNORE.name(), "Ignorer"}, 29 | {ButtonType.HELP.name(), "Aide"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_it.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'it'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_it extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Interrompi"}, 22 | {ButtonType.CANCEL.name(), "Annulla"}, 23 | {ButtonType.YES.name(), "Sì"}, 24 | {ButtonType.NO.name(), "No"}, 25 | {ButtonType.CLOSE.name(), "Chiudi"}, 26 | {ButtonType.SAVE.name(), "Salva"}, 27 | {ButtonType.RETRY.name(), "Riprova"}, 28 | {ButtonType.IGNORE.name(), "Ignora"}, 29 | {ButtonType.HELP.name(), "Aiuto"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_ja.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'ja'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_ja extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "中止"}, 22 | {ButtonType.CANCEL.name(), "キャンセル"}, 23 | {ButtonType.YES.name(), "はい"}, 24 | {ButtonType.NO.name(), "いいえ"}, 25 | {ButtonType.CLOSE.name(), "閉じる"}, 26 | {ButtonType.SAVE.name(), "保存"}, 27 | {ButtonType.RETRY.name(), "再試行"}, 28 | {ButtonType.IGNORE.name(), "無視"}, 29 | {ButtonType.HELP.toString(), "ヘルプ"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_kk.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'kk'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_kk extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "ОК"}, 21 | {ButtonType.ABORT.name(), "Доғару"}, 22 | {ButtonType.CANCEL.name(), "Қайту"}, 23 | {ButtonType.YES.name(), "Иә"}, 24 | {ButtonType.NO.name(), "Жоқ"}, 25 | {ButtonType.CLOSE.name(), "Жабу"}, 26 | {ButtonType.SAVE.name(), "Сақтау"}, 27 | {ButtonType.RETRY.name(), "Қайталау"}, 28 | {ButtonType.IGNORE.name(), "Елемеу"}, 29 | {ButtonType.HELP.name(), "Анықтама"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_ko.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'ko'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_ko extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "확인"}, 21 | {ButtonType.ABORT.name(), "중단"}, 22 | {ButtonType.CANCEL.name(), "취소"}, 23 | {ButtonType.YES.name(), "예"}, 24 | {ButtonType.NO.name(), "아니오"}, 25 | {ButtonType.CLOSE.name(), "닫기"}, 26 | {ButtonType.SAVE.name(), "저장"}, 27 | {ButtonType.RETRY.name(), "다시 시도"}, 28 | {ButtonType.IGNORE.name(), "무시"}, 29 | {ButtonType.HELP.name(), "도움말"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_nb.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'nb'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_nb extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Avbryt"}, 22 | {ButtonType.CANCEL.name(), "Avbryt"}, 23 | {ButtonType.YES.name(), "Ja"}, 24 | {ButtonType.NO.name(), "Nei"}, 25 | {ButtonType.CLOSE.name(), "Lukk"}, 26 | {ButtonType.SAVE.name(), "Lagre"}, 27 | {ButtonType.RETRY.name(), "Prøv igjen"}, 28 | {ButtonType.IGNORE.name(), "Ignorer"}, 29 | {ButtonType.HELP.name(), "Hjelp"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_nl.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'nl'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_nl extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Afbreken"}, 22 | {ButtonType.CANCEL.name(), "Annuleren"}, 23 | {ButtonType.YES.name(), "Ja"}, 24 | {ButtonType.NO.name(), "Nee"}, 25 | {ButtonType.CLOSE.name(), "Sluiten"}, 26 | {ButtonType.SAVE.name(), "Opslaan"}, 27 | {ButtonType.RETRY.name(), "Opnieuw"}, 28 | {ButtonType.IGNORE.name(), "Negeren"}, 29 | {ButtonType.HELP.name(), "Help"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_nn.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'nn'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_nn extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Avbryt"}, 22 | {ButtonType.CANCEL.name(), "Avbryt"}, 23 | {ButtonType.YES.name(), "Ja"}, 24 | {ButtonType.NO.name(), "Nei"}, 25 | {ButtonType.CLOSE.name(), "Lukk"}, 26 | {ButtonType.SAVE.name(), "Lagra"}, 27 | {ButtonType.RETRY.name(), "Prøv på nytt"}, 28 | {ButtonType.IGNORE.name(), "Ignorer"}, 29 | {ButtonType.HELP.name(), "Hjelp"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_pl.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'pl'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_pl extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Przerwij"}, 22 | {ButtonType.CANCEL.name(), "Anuluj"}, 23 | {ButtonType.YES.name(), "Tak"}, 24 | {ButtonType.NO.name(), "Nie"}, 25 | {ButtonType.CLOSE.name(), "Zamknij"}, 26 | {ButtonType.SAVE.name(), "Zapisz"}, 27 | {ButtonType.RETRY.name(), "Powtórz"}, 28 | {ButtonType.IGNORE.name(), "Pomiń"}, 29 | {ButtonType.HELP.name(), "Pomoc"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_pt.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'pt'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_pt extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Interromper"}, 22 | {ButtonType.CANCEL.name(), "Cancelar"}, 23 | {ButtonType.YES.name(), "Sim"}, 24 | {ButtonType.NO.name(), "Não"}, 25 | {ButtonType.CLOSE.name(), "Fechar"}, 26 | {ButtonType.SAVE.name(), "Gravar"}, 27 | {ButtonType.RETRY.name(), "Repetir"}, 28 | {ButtonType.IGNORE.name(), "Ignorar"}, 29 | {ButtonType.HELP.name(), "Ajuda"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_ro.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'ro'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_ro extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "OK"}, 21 | {ButtonType.ABORT.name(), "Anulare"}, 22 | {ButtonType.CANCEL.name(), "Renunță"}, 23 | {ButtonType.YES.name(), "Da"}, 24 | {ButtonType.NO.name(), "Nu"}, 25 | {ButtonType.CLOSE.name(), "Închide"}, 26 | {ButtonType.SAVE.name(), "Salvează"}, 27 | {ButtonType.RETRY.name(), "Reîncercare"}, 28 | {ButtonType.IGNORE.name(), "Ignoră"}, 29 | {ButtonType.HELP.name(), "Ajutor"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_sv.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'sv'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_sv extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "Ok"}, 21 | {ButtonType.ABORT.name(), "Avbryt"}, 22 | {ButtonType.CANCEL.name(), "Avbryt"}, 23 | {ButtonType.YES.name(), "Ja"}, 24 | {ButtonType.NO.name(), "Nej"}, 25 | {ButtonType.CLOSE.name(), "Stäng"}, 26 | {ButtonType.SAVE.name(), "Spara"}, 27 | {ButtonType.RETRY.name(), "Försök igen"}, 28 | {ButtonType.IGNORE.name(), "Ignorera"}, 29 | {ButtonType.HELP.name(), "Hjälp"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_th.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'th'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_th extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "ตกลง"}, 21 | {ButtonType.ABORT.name(), "ยุติ"}, 22 | {ButtonType.CANCEL.name(), "ยกเลิก"}, 23 | {ButtonType.YES.name(), "ใช่"}, 24 | {ButtonType.NO.name(), "ไม่"}, 25 | {ButtonType.CLOSE.name(), "ปิด"}, 26 | {ButtonType.SAVE.name(), "บันทึก"}, 27 | {ButtonType.RETRY.name(), "ลองใหม่"}, 28 | {ButtonType.IGNORE.name(), "ไม่สนใจ"}, 29 | {ButtonType.HELP.name(), "ช่วยเหลือ"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_zh_CN.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'zh_CN'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_zh_CN extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "确定"}, 21 | {ButtonType.ABORT.name(), "放弃"}, 22 | {ButtonType.CANCEL.name(), "取消"}, 23 | {ButtonType.YES.name(), "是"}, 24 | {ButtonType.NO.name(), "否"}, 25 | {ButtonType.CLOSE.name(), "关闭"}, 26 | {ButtonType.SAVE.name(), "保存"}, 27 | {ButtonType.RETRY.name(), "重试"}, 28 | {ButtonType.IGNORE.name(), "忽略"}, 29 | {ButtonType.HELP.name(), "帮助"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/i18n/captions/ButtonCaptions_zh_TW.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.i18n.captions; 2 | 3 | import de.steinwedel.messagebox.ButtonType; 4 | 5 | import java.util.ListResourceBundle; 6 | 7 | /** 8 | * I18n for the button captions. This class contains the translations for language code 'zh_TW'. 9 | * 10 | * @author Dieter Steinwedel 11 | */ 12 | public class ButtonCaptions_zh_TW extends ListResourceBundle { 13 | 14 | /** 15 | * See {@link ListResourceBundle#getContents()} 16 | */ 17 | @Override 18 | protected Object[][] getContents() { 19 | return new Object[][]{ 20 | {ButtonType.OK.name(), "確定"}, 21 | {ButtonType.ABORT.name(), "中止"}, 22 | {ButtonType.CANCEL.name(), "取消"}, 23 | {ButtonType.YES.name(), "是"}, 24 | {ButtonType.NO.name(), "否"}, 25 | {ButtonType.CLOSE.name(), "關閉"}, 26 | {ButtonType.SAVE.name(), "儲存"}, 27 | {ButtonType.RETRY.name(), "重試"}, 28 | {ButtonType.IGNORE.name(), "忽略"}, 29 | {ButtonType.HELP.name(), "說明"}, 30 | }; 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/icons/ButtonIconFactory.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.icons; 2 | 3 | import com.vaadin.server.Resource; 4 | import de.steinwedel.messagebox.ButtonType; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * This interface defines the essential methods for a ButtonIconFactory 10 | * 11 | * @author Dieter Steinwedel 12 | */ 13 | public interface ButtonIconFactory extends Serializable { 14 | 15 | /** 16 | * Loads the resource for the given buttonType. 17 | * 18 | * @param buttonType The ButtonType 19 | * @return The resource 20 | */ 21 | public Resource getIcon(ButtonType buttonType); 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/icons/ClassicButtonIconFactory.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.icons; 2 | 3 | /** 4 | * Loads the classic icon set. 5 | * 6 | * @author Dieter Steinwedel 7 | */ 8 | public class ClassicButtonIconFactory extends AbstractButtonIconFactory { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | /** 13 | * Default constructor. 14 | */ 15 | public ClassicButtonIconFactory() { 16 | super(ClassicButtonIconFactory.class, "classic/button", "png"); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/icons/ClassicDialogIconFactory.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.icons; 2 | 3 | /** 4 | * Loads the classic icon set. 5 | * 6 | * @author Dieter Steinwedel 7 | */ 8 | public class ClassicDialogIconFactory extends AbstractDialogIconFactory { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | /** 13 | * Default constructor. 14 | */ 15 | public ClassicDialogIconFactory() { 16 | super(ClassicDialogIconFactory.class, "classic/dialog", "png"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/icons/DialogIconFactory.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.icons; 2 | 3 | import com.vaadin.ui.Component; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * This interface implements the default behavior for loading icons for the dialog. You can 9 | * override this class to apply an own icon set. 10 | * 11 | * @author Dieter Steinwedel 12 | */ 13 | public interface DialogIconFactory extends Serializable { 14 | 15 | /** 16 | * Returns the question icon. 17 | * 18 | * @return question icon 19 | */ 20 | public Component getQuestionIcon(); 21 | 22 | /** 23 | * Returns the info icon. 24 | * 25 | * @return info icon 26 | */ 27 | public Component getInfoIcon(); 28 | 29 | /** 30 | * Returns the warning icon. 31 | * 32 | * @return warning icon 33 | */ 34 | public Component getWarningIcon(); 35 | 36 | /** 37 | * Returns the error icon. 38 | * 39 | * @return error icon 40 | */ 41 | public Component getErrorIcon(); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/de/steinwedel/messagebox/icons/FlatDialogIconFactory.java: -------------------------------------------------------------------------------- 1 | package de.steinwedel.messagebox.icons; 2 | 3 | /** 4 | * Loads the flat icon set. 5 | * 6 | * @author Dieter Steinwedel 7 | */ 8 | public class FlatDialogIconFactory extends AbstractDialogIconFactory { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | /** 13 | * Default constructor. 14 | */ 15 | public FlatDialogIconFactory() { 16 | super(FlatDialogIconFactory.class, "flat/dialog", "svg"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/Widget.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by David Sowerby on 19 Mar 2018 7 | */ 8 | public interface Widget extends Serializable { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/config/KrailApplicationConfigurationModule.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.config; 2 | 3 | import uk.q3c.krail.config.PathLocator; 4 | import uk.q3c.krail.config.bind.ApplicationConfigurationModule; 5 | 6 | /** 7 | * Created by David Sowerby on 22 Aug 2017 8 | */ 9 | public class KrailApplicationConfigurationModule extends ApplicationConfigurationModule { 10 | 11 | @Override 12 | protected void configure() { 13 | super.configure(); 14 | bindPathLocator(); 15 | } 16 | 17 | 18 | protected void bindPathLocator() { 19 | bind(PathLocator.class).to(KrailPathLocator.class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/config/KrailPathLocator.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.config; 2 | 3 | import com.google.inject.Inject; 4 | import uk.q3c.krail.config.PathLocator; 5 | import uk.q3c.krail.util.ResourceUtils; 6 | 7 | import java.io.File; 8 | 9 | /** 10 | * Created by David Sowerby on 22 Aug 2017 11 | */ 12 | public class KrailPathLocator implements PathLocator { 13 | 14 | private ResourceUtils resourceUtils; 15 | 16 | @Inject 17 | protected KrailPathLocator(ResourceUtils resourceUtils) { 18 | this.resourceUtils = resourceUtils; 19 | } 20 | 21 | @Override 22 | public File configurationDirectory() { 23 | return resourceUtils.configurationDirectory(); 24 | } 25 | 26 | @Override 27 | public File applicationDirectory() { 28 | return resourceUtils.applicationBaseDirectory(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/eventbus/BusProvider.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.eventbus; 2 | 3 | import net.engio.mbassy.bus.common.PubSubSupport; 4 | import uk.q3c.krail.eventbus.BusMessage; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by David Sowerby on 08 Jan 2018 10 | */ 11 | public interface BusProvider extends Serializable { 12 | PubSubSupport get(); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/eventbus/SessionBusProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.eventbus; 15 | 16 | /** 17 | * Equivalent to injecting PubSubSupport with @SessionBus annotation. Used to prevent accidental overloading with wrong 18 | * bus. 19 | *

20 | * Created by David Sowerby on 17/11/15. 21 | */ 22 | public interface SessionBusProvider extends BusProvider { 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/eventbus/UIBusProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.eventbus; 15 | 16 | /** 17 | * BusProvide specifically for the event bus annotated with {@link UIBus} 18 | * 19 | * Created by David Sowerby on 17/11/15. 20 | */ 21 | public interface UIBusProvider extends BusProvider { 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/guice/BaseServletModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.guice; 14 | 15 | import com.google.inject.servlet.ServletModule; 16 | 17 | public class BaseServletModule extends ServletModule { 18 | 19 | @Override 20 | protected void configureServlets() { 21 | serve("/*").with(BaseServlet.class); 22 | // removed when switching to non-web setup to enable push support 23 | // ShiroWebModule.bindGuiceFilter(binder()); 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/guice/InjectorHolder.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.guice; 2 | 3 | import com.google.inject.Injector; 4 | import uk.q3c.krail.core.ConfigurationException; 5 | 6 | /** 7 | * 8 | * Does nothing but keep a static reference to the Guice inject - used only when running in a Servlet environment 9 | * 10 | * Created by David Sowerby on 14 Mar 2018 11 | */ 12 | public class InjectorHolder { 13 | 14 | private static Injector injector; 15 | 16 | public static Injector getInjector() { 17 | if (injector == null) { 18 | throw new ConfigurationException("Injector should have been created before this method is called"); 19 | } 20 | return injector; 21 | } 22 | 23 | public static void setInjector(Injector injector) { 24 | InjectorHolder.injector = injector; 25 | } 26 | 27 | public static boolean hasInjector() { 28 | return injector != null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/guice/threadscope/ThreadScoped.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.guice.threadscope; 15 | 16 | import com.google.inject.ScopeAnnotation; 17 | 18 | import java.lang.annotation.Retention; 19 | import java.lang.annotation.Target; 20 | 21 | import static java.lang.annotation.ElementType.METHOD; 22 | import static java.lang.annotation.ElementType.TYPE; 23 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 24 | 25 | @Target({TYPE, METHOD}) 26 | @Retention(RUNTIME) 27 | @ScopeAnnotation 28 | public @interface ThreadScoped { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/guice/uiscope/UIScoped.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.guice.uiscope; 14 | 15 | import com.google.inject.ScopeAnnotation; 16 | 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.Target; 19 | 20 | import static java.lang.annotation.ElementType.METHOD; 21 | import static java.lang.annotation.ElementType.TYPE; 22 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 23 | 24 | @Target({TYPE, METHOD}) 25 | @Retention(RUNTIME) 26 | @ScopeAnnotation 27 | public @interface UIScoped { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/guice/vsscope/VaadinSessionScoped.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.guice.vsscope; 14 | 15 | import com.google.inject.ScopeAnnotation; 16 | 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.Target; 19 | 20 | import static java.lang.annotation.ElementType.METHOD; 21 | import static java.lang.annotation.ElementType.TYPE; 22 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 23 | 24 | @Target({TYPE, METHOD}) 25 | @Retention(RUNTIME) 26 | @ScopeAnnotation 27 | public @interface VaadinSessionScoped { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/i18n/CommonLabels_de_CH.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | /** 16 | * The base for the resource bundle of LoginLabels specifically for Locale de_CH. Not currently populated as it is used only 17 | * for testing 18 | * 19 | * @author David Sowerby 9 Feb 2013 20 | */ 21 | public class CommonLabels_de_CH extends Labels { 22 | 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/i18n/Descriptions_it.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | public class Descriptions_it extends Descriptions { 16 | 17 | 18 | @Override 19 | protected void loadMap() { 20 | put(DescriptionKey.Last_Name, "il cognome o il nome di famiglia"); 21 | put(DescriptionKey.Confirm_Ok, "Confermare questo valore è Ok"); 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/i18n/I18NFieldScanner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | import com.vaadin.ui.AbstractComponent; 17 | 18 | import java.util.List; 19 | import java.util.Map; 20 | 21 | /** 22 | * Created by David Sowerby on 10/05/15. 23 | */ 24 | public interface I18NFieldScanner { 25 | 26 | Map annotatedComponents(); 27 | 28 | 29 | void scan(Object target); 30 | 31 | List processedDrillDowns(); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/i18n/Labels_de_CH.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | /** 16 | * The base for the resource bundle of LoginLabels specifically for Locale de_CH. Not currently populated as it is used only 17 | * for testing 18 | * 19 | * @author David Sowerby 9 Feb 2013 20 | */ 21 | public class Labels_de_CH extends Labels { 22 | 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/InvalidURIHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.navigate; 14 | 15 | import java.io.Serializable; 16 | 17 | public interface InvalidURIHandler extends Serializable { 18 | 19 | void invoke(Navigator navigator, String targetUri); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/NavigationStateException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.navigate; 15 | 16 | /** 17 | * Created by David Sowerby on 11 Feb 2016 18 | */ 19 | public class NavigationStateException extends RuntimeException { 20 | public NavigationStateException(String msg) { 21 | super(msg); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/sitemap/AnnotationSitemapEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.navigate.sitemap; 14 | 15 | import uk.q3c.krail.i18n.I18NKey; 16 | 17 | import java.io.Serializable; 18 | 19 | public class AnnotationSitemapEntry implements Serializable { 20 | 21 | private I18NKey labelSample; 22 | 23 | public I18NKey getLabelSample() { 24 | return labelSample; 25 | } 26 | 27 | public void setLabelSample(I18NKey labelSample) { 28 | this.labelSample = labelSample; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/sitemap/SitemapLockedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.navigate.sitemap; 15 | 16 | /** 17 | * Created by David Sowerby on 06 Jan 2016 18 | */ 19 | public class SitemapLockedException extends RuntimeException { 20 | public SitemapLockedException(String msg) { 21 | super(msg); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/sitemap/SitemapSourceType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.navigate.sitemap; 14 | 15 | public enum SitemapSourceType { 16 | ANNOTATION, DIRECT 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/sitemap/StandardPageLabels_it.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.navigate.sitemap; 14 | 15 | /** 16 | * The base for the resource bundle of LoginLabels for Locale it. 17 | * 18 | * @author David Sowerby 9 Feb 2013 19 | */ 20 | public class StandardPageLabels_it extends StandardPageLabels { 21 | 22 | @Override 23 | protected void loadMap() { 24 | put(StandardPageKey.Public_Home, "Public Pagina"); 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/sitemap/UserSitemapLabelChangeMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.navigate.sitemap; 13 | 14 | import uk.q3c.krail.eventbus.BusMessage; 15 | 16 | /** 17 | * Published when only the labels have changed - this typically happens as a result of switching Locale. 18 | *

19 | *

20 | * Created by David Sowerby on 13/03/15. 21 | */ 22 | public class UserSitemapLabelChangeMessage implements BusMessage { 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/sitemap/set/SitemapChangedMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.navigate.sitemap.set; 15 | 16 | import uk.q3c.krail.eventbus.BusMessage; 17 | 18 | /** 19 | * Created by David Sowerby on 06 Jan 2016 20 | */ 21 | public class SitemapChangedMessage implements BusMessage { 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/navigate/sitemap/set/SitemapTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.navigate.sitemap.set; 15 | 16 | /** 17 | * Created by David Sowerby on 08 Jan 2016 18 | */ 19 | public class SitemapTimeoutException extends RuntimeException { 20 | public SitemapTimeoutException(String msg) { 21 | super(msg); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/option/VaadinOptionContext.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.option; 2 | 3 | import uk.q3c.krail.option.OptionContext; 4 | 5 | /** 6 | * Created by David Sowerby on 03 Aug 2017 7 | */ 8 | public interface VaadinOptionContext extends OptionContext { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/shiro/PageAccessControl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.shiro; 14 | 15 | /** 16 | * Represents Shiro access control constraints, equivalent to the Shiro annotations, with the addition of PUBLIC (the 17 | * equivalent of no annotations). See http://shiro.apache.org/java-annotations-list.html 18 | * 19 | * @author David Sowerby 20 | */ 21 | public enum PageAccessControl { 22 | AUTHENTICATION, GUEST, PERMISSION, PUBLIC, ROLES, USER 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/shiro/UnauthenticatedExceptionHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.shiro 13 | 14 | import java.io.Serializable 15 | 16 | interface UnauthenticatedExceptionHandler : Serializable { 17 | 18 | /** 19 | * invoke the handler 20 | * 21 | */ 22 | fun invoke() 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/shiro/UnauthorizedExceptionHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.shiro 15 | 16 | import java.io.Serializable 17 | 18 | 19 | interface UnauthorizedExceptionHandler : Serializable { 20 | /** 21 | * Returns true if exception is handled 22 | * 23 | * @return 24 | */ 25 | fun invoke() 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/shiro/aop/AnnotationResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.shiro.aop; 13 | 14 | import org.aopalliance.intercept.MethodInvocation; 15 | 16 | import java.lang.annotation.Annotation; 17 | 18 | /** 19 | * Created by David Sowerby on 10/06/15. 20 | */ 21 | public interface AnnotationResolver { 22 | A getAnnotation(MethodInvocation mi, Class clazz); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/shiro/aop/NotAGuestException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.shiro.aop; 13 | 14 | import org.apache.shiro.ShiroException; 15 | import org.apache.shiro.authz.annotation.RequiresGuest; 16 | import org.apache.shiro.subject.Subject; 17 | 18 | /** 19 | * Indicates current {@link Subject} is not a Guest in the sense of {@link RequiresGuest}. Only used by the Shiro annotations AOP 20 | *

21 | * Created by David Sowerby on 11/06/15. 22 | */ 23 | public class NotAGuestException extends ShiroException { 24 | 25 | public NotAGuestException() { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/shiro/aop/NotAUserException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.shiro.aop; 13 | 14 | import org.apache.shiro.ShiroException; 15 | import org.apache.shiro.authz.annotation.RequiresUser; 16 | import org.apache.shiro.subject.Subject; 17 | 18 | /** 19 | * Indicates current {@link Subject} is not a User in the sense of {@link RequiresUser}. Only used by the Shiro annotations AOP 20 | *

21 | * Created by David Sowerby on 11/06/15. 22 | */ 23 | public class NotAUserException extends ShiroException { 24 | 25 | public NotAUserException() { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/ui/BasicUIProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.ui; 14 | 15 | import com.vaadin.server.UIClassSelectionEvent; 16 | import com.vaadin.ui.UI; 17 | 18 | public class BasicUIProvider extends ScopedUIProvider { 19 | 20 | @Override 21 | public Class getUIClass(UIClassSelectionEvent event) { 22 | return BasicUI.class; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/ui/BrowserProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.ui; 14 | 15 | import com.google.inject.Provider; 16 | import com.vaadin.server.Page; 17 | import com.vaadin.server.WebBrowser; 18 | 19 | import java.io.Serializable; 20 | 21 | public class BrowserProvider implements Provider, Serializable { 22 | 23 | @Override 24 | public WebBrowser get() { 25 | Page page = Page.getCurrent(); 26 | return (page == null) ? null : page.getWebBrowser(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/ui/DataTypeModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.ui; 13 | 14 | import com.google.inject.AbstractModule; 15 | 16 | /** 17 | * Created by David Sowerby on 29/05/15. 18 | */ 19 | public class DataTypeModule extends AbstractModule { 20 | /** 21 | * {@inheritDoc} 22 | */ 23 | @Override 24 | protected void configure() { 25 | bindDataTypeToUi(); 26 | } 27 | 28 | 29 | protected void bindDataTypeToUi() { 30 | bind(DataTypeToUI.class).to(DefaultDataTypeToUI.class); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/ui/MethodReconfigured.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.ui; 15 | 16 | public class MethodReconfigured extends RuntimeException { 17 | 18 | public MethodReconfigured(String message) { 19 | super(message); 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/ui/UIProviderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.ui; 14 | 15 | public class UIProviderException extends RuntimeException { 16 | 17 | protected UIProviderException(String message) { 18 | super(message); 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/user/notify/ErrorNotificationMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.user.notify; 13 | 14 | /** 15 | * Created by David Sowerby on 26/05/15. 16 | */ 17 | public class ErrorNotificationMessage extends NotificationMessage { 18 | 19 | public ErrorNotificationMessage(String translatedMessage) { 20 | super(translatedMessage); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/user/notify/InformationNotificationMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.user.notify; 13 | 14 | /** 15 | * Created by David Sowerby on 26/05/15. 16 | */ 17 | public class InformationNotificationMessage extends NotificationMessage { 18 | 19 | public InformationNotificationMessage(String translatedMessage) { 20 | super(translatedMessage); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/user/notify/NotificationMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.user.notify; 13 | 14 | import uk.q3c.krail.eventbus.BusMessage; 15 | 16 | /** 17 | * Created by David Sowerby on 26/05/15. 18 | */ 19 | public class NotificationMessage implements BusMessage { 20 | private String translatedMessage; 21 | 22 | public NotificationMessage(String translatedMessage) { 23 | 24 | this.translatedMessage = translatedMessage; 25 | } 26 | 27 | public String getTranslatedMessage() { 28 | return translatedMessage; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/user/notify/VaadinNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.user.notify; 13 | 14 | import net.engio.mbassy.listener.Handler; 15 | 16 | import java.io.Serializable; 17 | 18 | /** 19 | * Created by David Sowerby on 26/05/15. 20 | */ 21 | public interface VaadinNotification extends Serializable { 22 | 23 | 24 | @Handler 25 | void errorMessage(ErrorNotificationMessage message); 26 | 27 | @Handler 28 | void warningMessage(WarningNotificationMessage message); 29 | 30 | @Handler 31 | void informationMessage(InformationNotificationMessage message); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/user/notify/WarningNotificationMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.user.notify; 13 | 14 | /** 15 | * Created by David Sowerby on 26/05/15. 16 | */ 17 | public class WarningNotificationMessage extends NotificationMessage { 18 | 19 | public WarningNotificationMessage(String translatedMessage) { 20 | super(translatedMessage); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/user/status/UserStatusChangeSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.user.status; 13 | 14 | 15 | /** 16 | * Used to identify the source of a login - usually a View implementation, component or possibly even a federated 17 | * source. Enables subscribers to {@link UserStatusBusMessage} to respond differently depending on the source of the change 18 | *

19 | * Created by David Sowerby on 08/02/15. 20 | */ 21 | public interface UserStatusChangeSource { 22 | 23 | default String identity() { 24 | return getClass().getSimpleName(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/vaadin/MenuItemComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.vaadin; 15 | 16 | import com.vaadin.ui.MenuBar.MenuItem; 17 | 18 | import java.io.Serializable; 19 | import java.util.Comparator; 20 | 21 | public class MenuItemComparator implements Comparator, Serializable { 22 | 23 | @Override 24 | public int compare(MenuItem arg0, MenuItem arg1) { 25 | return arg0.getText() 26 | .compareTo(arg1.getText()); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/vaadin/OptionBinder.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.vaadin; 2 | 3 | import com.vaadin.ui.AbstractField; 4 | import uk.q3c.krail.option.OptionKey; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by David Sowerby on 16 Oct 2017 10 | */ 11 | public interface OptionBinder extends Serializable { 12 | void bindOption(OptionKey optionKey, AbstractField

field); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/vaadin/OptionSetter.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.vaadin; 2 | 3 | import com.vaadin.server.Setter; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import uk.q3c.krail.option.Option; 7 | import uk.q3c.krail.option.OptionKey; 8 | 9 | /** 10 | * Created by David Sowerby on 14 Oct 2017 11 | */ 12 | public class OptionSetter implements Setter { 13 | private static Logger log = LoggerFactory.getLogger(OptionSetter.class); 14 | 15 | private OptionKey optionKey; 16 | private Option option; 17 | 18 | 19 | public OptionSetter(OptionKey optionKey, Option option) { 20 | this.optionKey = optionKey; 21 | this.option = option; 22 | } 23 | 24 | @Override 25 | public void accept(P p, M m) { 26 | log.info("option setter for " + optionKey.compositeKey() + " called with {} and {}", p, m); 27 | option.set(optionKey, m); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/vaadin/OptionValueProvider.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.vaadin; 2 | 3 | import com.vaadin.data.ValueProvider; 4 | import uk.q3c.krail.option.Option; 5 | import uk.q3c.krail.option.OptionKey; 6 | 7 | /** 8 | * Created by David Sowerby on 14 Oct 2017 9 | */ 10 | public class OptionValueProvider implements ValueProvider { 11 | 12 | 13 | private Option option; 14 | private OptionKey optionKey; 15 | 16 | public OptionValueProvider(Option option) { 17 | this.option = option; 18 | } 19 | 20 | @Override 21 | public TARGET apply(SOURCE source) { 22 | return option.get(optionKey); 23 | } 24 | 25 | public OptionKey getOptionKey() { 26 | return optionKey; 27 | } 28 | 29 | public void setOptionKey(OptionKey optionKey) { 30 | this.optionKey = optionKey; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/vaadin/UserSitemapNodeCaption.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.vaadin; 14 | 15 | import uk.q3c.krail.core.navigate.sitemap.UserSitemapNode; 16 | import uk.q3c.util.forest.CaptionReader; 17 | 18 | import java.io.Serializable; 19 | 20 | public class UserSitemapNodeCaption implements CaptionReader, Serializable { 21 | 22 | @Override 23 | public String getCaption(UserSitemapNode sourceNode) { 24 | return sourceNode.getLabel(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/DefaultPrivateHomeView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view; 15 | 16 | import com.google.inject.Inject; 17 | import uk.q3c.krail.i18n.Translate; 18 | import uk.q3c.util.guice.SerializationSupport; 19 | 20 | public class DefaultPrivateHomeView extends StandardPageViewBase implements PrivateHomeView { 21 | 22 | @Inject 23 | protected DefaultPrivateHomeView(Translate translate, SerializationSupport serializationSupport) { 24 | super(translate, serializationSupport); 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/DefaultPublicHomeView.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | 16 | import com.google.inject.Inject 17 | import uk.q3c.krail.core.i18n.CommonLabelKey 18 | import uk.q3c.krail.i18n.Translate 19 | import uk.q3c.util.guice.SerializationSupport 20 | 21 | class DefaultPublicHomeView @Inject 22 | constructor(translate: Translate, serializationSupport: SerializationSupport) : StandardPageViewBase(translate, serializationSupport), PublicHomeView { 23 | init { 24 | nameKey = CommonLabelKey.Home 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/DefaultSystemAccountView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view; 15 | 16 | import com.google.inject.Inject; 17 | import uk.q3c.krail.i18n.Translate; 18 | import uk.q3c.util.guice.SerializationSupport; 19 | 20 | public class DefaultSystemAccountView extends StandardPageViewBase implements SystemAccountView { 21 | 22 | @Inject 23 | protected DefaultSystemAccountView(Translate translate, SerializationSupport serializationSupport) { 24 | super(translate, serializationSupport); 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/ErrorView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.view; 15 | 16 | /** 17 | * Interface for ErrorViews. Binding to implementation can be changed in {@link ViewModule} 18 | * 19 | * @author david 20 | */ 21 | public interface ErrorView extends KrailView { 22 | 23 | void setError(Throwable throwable); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/KrailViewHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.view; 15 | 16 | public interface KrailViewHolder { 17 | 18 | void changeView(KrailView toView); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/LogoutView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.view; 15 | 16 | 17 | public interface LogoutView extends KrailView { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/PrivateHomeView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use as a home page for authenticated users. The default binding 17 | * is to {@link DefaultPrivateHomeView}. The binding is in StandardViewModule. To 18 | * bind this interface to your own implementation, sub-class 19 | * {@link ViewModule} and override the appropriate binding method. 20 | * 21 | * @author David Sowerby 1 Jan 2013 22 | */ 23 | public interface PrivateHomeView extends KrailView { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/PublicHomeView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use as a home page for authenticated users. The default binding 17 | * is to {@link DefaultPrivateHomeView}. The binding is in StandardViewModule. To 18 | * bind this interface to your own implementation, sub-class 19 | * {@link ViewModule} and override the appropriate binding method. 20 | * 21 | * @author David Sowerby 1 Jan 2013 22 | */ 23 | public interface PublicHomeView extends KrailView { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/RequestSystemAccountCreateView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use as a home page for authenticated users. The default binding 17 | * is to {@link DefaultRequestSystemAccountCreateView}. The binding is in 18 | * StandardViewModule. To bind this interface to your own implementation, 19 | * sub-class {@link ViewModule} and override the appropriate binding 20 | * method. 21 | * 22 | * @author David Sowerby 1 Jan 2013 23 | */ 24 | public interface RequestSystemAccountCreateView extends KrailView { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/RequestSystemAccountEnableView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use for a user to request that their system account is enabled. The default binding is to 17 | * {@link DefaultRequestSystemAccountEnableView}. The binding is in StandardViewModule. To bind this interface to your 18 | * own implementation, sub-class {@link ViewModule} and override the appropriate binding method. 19 | * 20 | * @author David Sowerby 1 Jan 2013 21 | */ 22 | public interface RequestSystemAccountEnableView extends KrailView { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/RequestSystemAccountRefreshView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use for a user to request that their system account is refreshed. The default binding is to 17 | * {@link DefaultRequestSystemAccountRefreshView}. The binding is in StandardViewModule. To bind this interface to your 18 | * own implementation, sub-class {@link ViewModule} and override the appropriate binding method. 19 | * 20 | * @author David Sowerby 1 Jan 2013 21 | */ 22 | public interface RequestSystemAccountRefreshView extends KrailView { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/RequestSystemAccountResetView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use for a user to request that their system account is reset. The default binding is to 17 | * {@link DefaultRequestSystemAccountResetView}. The binding is in StandardViewModule. To bind this interface to your 18 | * own implementation, sub-class {@link ViewModule} and override the appropriate binding method. 19 | * 20 | * @author David Sowerby 1 Jan 2013 21 | */ 22 | public interface RequestSystemAccountResetView extends KrailView { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/RequestSystemAccountUnlockView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use for a user to request that their system account is unlocked. The default binding is to 17 | * {@link DefaultRequestSystemAccountUnlockView}. The binding is in StandardViewModule. To bind this interface to your 18 | * own implementation, sub-class {@link ViewModule} and override the appropriate binding method. 19 | * 20 | * @author David Sowerby 1 Jan 2013 21 | */ 22 | public interface RequestSystemAccountUnlockView extends KrailView { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/SystemAccountView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | /** 16 | * The View to use as a parent page for all system account related pages. The default binding is to 17 | * {@link DefaultSystemAccountView}. The binding is in StandardViewModule. To bind this interface to your own 18 | * implementation, sub-class {@link ViewModule} and override the appropriate binding method. 19 | * 20 | * @author David Sowerby 1 Jan 2013 21 | */ 22 | public interface SystemAccountView extends KrailView { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/ViewBuildException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view; 15 | 16 | /** 17 | * Created by david on 28/09/14. 18 | */ 19 | public class ViewBuildException extends RuntimeException { 20 | 21 | public ViewBuildException(String message) { 22 | super(message); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/ViewFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.view; 14 | 15 | import uk.q3c.krail.core.guice.uiscope.UIScoped; 16 | 17 | import java.io.Serializable; 18 | 19 | /** 20 | * Implementation return an injected KrailView instance, scoped to {@link UIScoped}. The interface is provided 21 | * primarily 22 | * to 23 | * facilitate testing. 24 | * 25 | * @author David Sowerby 18 Apr 2014 26 | */ 27 | public interface ViewFactory extends Serializable { 28 | 29 | T get(Class viewClass); 30 | 31 | } -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/AfterViewChangeBusMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.view.component; 13 | 14 | import uk.q3c.krail.core.navigate.NavigationState; 15 | 16 | public class AfterViewChangeBusMessage extends ViewChangeBusMessage { 17 | 18 | public AfterViewChangeBusMessage(NavigationState fromState, NavigationState toState) { 19 | super(fromState, toState); 20 | } 21 | 22 | public AfterViewChangeBusMessage(ViewChangeBusMessage busMessage) { 23 | super(busMessage); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/ApplicationHeader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view.component; 14 | 15 | import com.vaadin.ui.Component; 16 | 17 | public interface ApplicationHeader extends Component { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/ApplicationLogo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view.component; 14 | 15 | import com.vaadin.ui.Component; 16 | 17 | public interface ApplicationLogo extends Component { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/DefaultApplicationLogo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view.component; 14 | 15 | import com.google.inject.Inject; 16 | import com.vaadin.ui.Image; 17 | 18 | public class DefaultApplicationLogo extends Image implements ApplicationLogo { 19 | 20 | @Inject 21 | protected DefaultApplicationLogo() { 22 | super(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/LocaleSelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | package uk.q3c.krail.core.view.component; 12 | 13 | import com.vaadin.ui.ComboBox; 14 | 15 | import java.util.Locale; 16 | 17 | public interface LocaleSelector { 18 | /** 19 | * Sets the visual component to be used to display the current locale 20 | */ 21 | void setCombo(ComboBox c); 22 | 23 | Locale selectedLocale(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/UserNavigationMenu.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view.component; 14 | 15 | import com.vaadin.ui.Component; 16 | import com.vaadin.ui.MenuBar; 17 | 18 | public interface UserNavigationMenu extends Component { 19 | 20 | MenuBar getMenuBar(); 21 | 22 | int getOptionMaxDepth(); 23 | 24 | void setOptionMaxDepth(int depth); 25 | 26 | void build(); 27 | 28 | void clear(); 29 | 30 | boolean isSorted(); 31 | 32 | void setSorted(boolean sorted); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/UserNavigationMenuBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.view.component; 15 | 16 | import java.io.Serializable; 17 | 18 | public interface UserNavigationMenuBuilder extends Serializable { 19 | 20 | void build(); 21 | 22 | UserNavigationMenu getUserNavigationMenu(); 23 | 24 | void setUserNavigationMenu(UserNavigationMenu userNavigationMenu); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/core/view/component/UserNavigationTreeBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.view.component; 15 | 16 | import java.io.Serializable; 17 | 18 | public interface UserNavigationTreeBuilder extends Serializable { 19 | 20 | void build(); 21 | 22 | UserNavigationTree getUserNavigationTree(); 23 | 24 | void setUserNavigationTree(UserNavigationTree userNavigationTree); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/testutil/dummy/DefaultDummy.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.testutil.dummy; 2 | 3 | /** 4 | * Created by David Sowerby on 03 Feb 2016 5 | */ 6 | public class DefaultDummy implements Dummy{ 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/testutil/dummy/Dummy.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.testutil.dummy; 2 | 3 | /** 4 | * Created by David Sowerby on 03 Feb 2016 5 | */ 6 | public interface Dummy { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/testutil/dummy/DummyModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.testutil.dummy; 15 | 16 | import com.google.inject.AbstractModule; 17 | 18 | public class DummyModule extends AbstractModule { 19 | 20 | private boolean moduleCalled = false; 21 | 22 | public boolean isModuleCalled() { 23 | return moduleCalled; 24 | } 25 | 26 | @Override 27 | protected void configure() { 28 | moduleCalled = true; 29 | bind(Dummy.class).to(DefaultDummy.class); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/uk/q3c/krail/testutil/ui/TestUIModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.testutil.ui; 14 | 15 | import uk.q3c.krail.core.ui.BasicUI; 16 | import uk.q3c.krail.core.ui.DefaultUIModule; 17 | 18 | /** 19 | * Extends the default UIModule to provide instances of TestUI 20 | * 21 | * @author David Sowerby 12 Jan 2013 22 | */ 23 | public class TestUIModule extends DefaultUIModule { 24 | 25 | 26 | /** 27 | * {@inheritDoc} 28 | */ 29 | @Override 30 | protected void define() { 31 | addUIBinding(BasicUI.class); 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/ConfigurationException.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core 2 | 3 | /** 4 | * Created by David Sowerby on 10 May 2018 5 | */ 6 | 7 | class ConfigurationException @JvmOverloads constructor(msg: String, e: Exception? = null) : RuntimeException(msg, e) -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/env/EnvironmentModules.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.env 2 | 3 | import com.google.inject.AbstractModule 4 | import org.slf4j.LoggerFactory 5 | import uk.q3c.util.guice.InjectorLocator 6 | 7 | /** 8 | * Created by David Sowerby on 23 Mar 2018 9 | */ 10 | class ServletEnvironmentModule : AbstractModule() { 11 | private val log = LoggerFactory.getLogger(this.javaClass.name) 12 | override fun configure() { 13 | log.debug("ServletEnvironmentModule configure()") 14 | bind(InjectorLocator::class.java).to(ServletInjectorLocator::class.java) 15 | bind(RuntimeEnvironment::class.java).annotatedWith(RunningOn::class.java).toInstance(RuntimeEnvironment.SERVLET) 16 | } 17 | } 18 | 19 | 20 | class VertxEnvironmentModule : AbstractModule() { 21 | override fun configure() { 22 | bind(InjectorLocator::class.java).to(VertxInjectorLocator::class.java) 23 | bind(RuntimeEnvironment::class.java).annotatedWith(RunningOn::class.java).toInstance(RuntimeEnvironment.VERTX) 24 | } 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/env/RunningOn.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.env 14 | 15 | import com.google.inject.BindingAnnotation 16 | 17 | /** 18 | * Annotation used to identify whether the application is running on Vertx - this is used to apply some configuration differences 19 | */ 20 | @Retention(AnnotationRetention.RUNTIME) 21 | @Target(AnnotationTarget.FIELD, AnnotationTarget.VALUE_PARAMETER) 22 | @BindingAnnotation 23 | annotation class RunningOn(val runtimeEnv: RuntimeEnvironment = RuntimeEnvironment.SERVLET) 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/error/ErrorModule.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.error 2 | 3 | import com.google.inject.AbstractModule 4 | import com.vaadin.server.ErrorHandler 5 | import uk.q3c.krail.core.shiro.KrailErrorHandler 6 | 7 | /** 8 | * Created by David Sowerby on 13 Aug 2018 9 | */ 10 | open class ErrorModule : AbstractModule() { 11 | override fun configure() { 12 | bindGroup() 13 | bindLog() 14 | bindUser() 15 | bindErrorHandler() 16 | } 17 | 18 | open fun bindGroup() { 19 | bind(SystemErrorNotificationGroup::class.java).to(DefaultSystemErrorNotificationGroup::class.java) 20 | } 21 | 22 | open fun bindLog() { 23 | bind(SystemErrorLogNotification::class.java).to(DefaultSystemErrorLogNotification::class.java) 24 | } 25 | 26 | open fun bindUser() { 27 | bind(SystemErrorUserNotification::class.java).to(DefaultSystemErrorUserNotification::class.java) 28 | } 29 | 30 | /** 31 | * error handler for the VaadinSession, handles Krail (and therefore Shiro) exceptions 32 | */ 33 | open fun bindErrorHandler() { 34 | bind(ErrorHandler::class.java).to(KrailErrorHandler::class.java) 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/eventbus/Events.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.eventbus 2 | 3 | import uk.q3c.krail.eventbus.BusMessage 4 | 5 | /** 6 | * 7 | * Common base interfaces for Commands and Events (CQRS style) 8 | * 9 | * Created by David Sowerby on 06 Mar 2018 10 | */ 11 | interface Command 12 | 13 | interface Event : BusMessage { 14 | val aggregateType: String 15 | val aggregateId: String 16 | } 17 | 18 | 19 | interface ExceptionEvent -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/form/DataProviders.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.form 2 | 3 | import com.google.inject.Inject 4 | import com.vaadin.data.provider.ListDataProvider 5 | import uk.q3c.krail.core.i18n.CommonLabelKey 6 | import uk.q3c.krail.i18n.Translate 7 | 8 | 9 | class YesNoDataProvider @Inject constructor(val translate: Translate) : ListDataProvider(setOf(CommonLabelKey.No, CommonLabelKey.Yes).map { k -> translate.from(k) }.toList()) 10 | class BeforeAfterDataProvider @Inject constructor(val translate: Translate) : ListDataProvider(setOf(CommonLabelKey.Before, CommonLabelKey.After).map { k -> translate.from(k) }.toList()) 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/form/FormTableSection.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.form 2 | 3 | import com.vaadin.event.selection.SelectionEvent 4 | import com.vaadin.event.selection.SelectionListener 5 | import com.vaadin.ui.Grid 6 | import uk.q3c.krail.i18n.CurrentLocale 7 | import uk.q3c.krail.i18n.Translate 8 | 9 | class FormTableSection(val form: Form, override val rootComponent: Grid, val dao: FormDao) : FormSection, SelectionListener { 10 | override fun translate(translate: Translate, currentLocale: CurrentLocale) { 11 | rootComponent.locale = currentLocale.locale 12 | } 13 | 14 | override var mode: EditMode = EditMode.READ_ONLY 15 | 16 | init { 17 | rootComponent.editor.isEnabled = false 18 | } 19 | 20 | override fun selectionChange(event: SelectionEvent) { 21 | val selectedItem = event.firstSelectedItem 22 | if (selectedItem.isPresent) { 23 | val bean = selectedItem.get() 24 | if (bean is Entity) { 25 | form.changeRoute(bean.id) 26 | } 27 | } 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/i18n/CommonLabelKey.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.i18n 2 | 3 | import uk.q3c.krail.i18n.I18NKey 4 | 5 | /** 6 | * Created by David Sowerby on 26 Aug 2018 7 | */ 8 | enum class CommonLabelKey : I18NKey { 9 | About, 10 | After, 11 | Before, 12 | Cancel, 13 | Edit, 14 | Error, 15 | Full_Screen, 16 | Help, 17 | Home, 18 | Large, 19 | Loading_, 20 | Menu, 21 | Notifications, 22 | No, 23 | _NullKey_, 24 | Ok, 25 | Push, 26 | Save, 27 | Saved, 28 | Settings, 29 | Small, 30 | Title, 31 | Warning, 32 | Yes 33 | } 34 | 35 | enum class UserStatusKey : I18NKey { 36 | Log_In, 37 | Log_Out 38 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/i18n/NullI18NKey.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.i18n 2 | 3 | import uk.q3c.krail.i18n.I18NKey 4 | 5 | /** 6 | * Used to represent a null I18NKey 7 | * 8 | * Created by David Sowerby on 05 Aug 2018 9 | */ 10 | enum class NullI18NKey : I18NKey { 11 | none 12 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/monitor/PageReady.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.monitor 2 | 3 | import uk.q3c.krail.core.guice.uiscope.UIKey 4 | import uk.q3c.krail.eventbus.BusMessage 5 | import java.time.OffsetDateTime 6 | 7 | /** 8 | * Created by David Sowerby on 01 Jun 2018 9 | */ 10 | class PageReadyMessage(val uiKey: UIKey, val uiNumber: Int) : TimedMessage() 11 | 12 | class PageLoadingMessage(val uiKey: UIKey, val uiNumber: Int) : TimedMessage() 13 | 14 | 15 | // TODO this should move to eventbus-api https://github.com/KrailOrg/eventbus-api/issues/6 16 | abstract class TimedMessage @JvmOverloads constructor(val timestamp: OffsetDateTime = OffsetDateTime.now()) : BusMessage -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/navigate/sitemap/EmptyView.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.navigate.sitemap 2 | 3 | import com.google.inject.Inject 4 | import com.vaadin.ui.Label 5 | import uk.q3c.krail.core.view.KrailView 6 | import uk.q3c.krail.core.view.ViewBase 7 | import uk.q3c.krail.i18n.Translate 8 | import uk.q3c.util.guice.SerializationSupport 9 | 10 | /** 11 | * An "empty" view is one where not intended to be any user content, but may contain navigation to the next level down in 12 | * the page hierarchy. For example, when displayed on a mobile, this page may be automatically populated with buttons 13 | * to navigate to its "child" pages. On a desktop device, maybe something else would be preferred. 14 | * 15 | * Guice binding is in [SitemapModule] 16 | * 17 | * Created by David Sowerby on 29 Apr 2018 18 | */ 19 | interface EmptyView : KrailView 20 | 21 | class DefaultEmptyView @Inject constructor(translate: Translate, serializationSupport: SerializationSupport) : ViewBase(translate, serializationSupport), EmptyView { 22 | 23 | override fun doBuild() { 24 | rootComponent = Label("empty view") 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/navigate/sitemap/NavigationCommand.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.navigate.sitemap 2 | 3 | import uk.q3c.krail.eventbus.BusMessage 4 | 5 | /** 6 | * Created by David Sowerby on 17 Jul 2018 7 | */ 8 | class NavigationCommand(val target: String) : BusMessage -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/navigate/sitemap/NavigatorProvider.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.navigate.sitemap 2 | 3 | import com.vaadin.ui.UI 4 | import uk.q3c.krail.core.navigate.Navigator 5 | import uk.q3c.krail.core.ui.ScopedUI 6 | 7 | /** 8 | * Created by David Sowerby on 11 Aug 2018 9 | */ 10 | class NavigatorProvider { 11 | 12 | fun get(): Navigator { 13 | return (UI.getCurrent() as ScopedUI).krailNavigator 14 | } 15 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/navigate/sitemap/RedirectEntry.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.navigate.sitemap 14 | 15 | import java.io.Serializable 16 | 17 | data class RedirectEntry(val redirectTarget: String) : Serializable 18 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/navigate/sitemap/SitemapService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.navigate.sitemap 14 | 15 | import uk.q3c.krail.service.Service 16 | 17 | interface SitemapService : Service { 18 | val sourceTypes: MutableList 19 | } 20 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/navigate/sitemap/comparator/UserSitemapNodeComparator.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.navigate.sitemap.comparator 15 | 16 | import uk.q3c.krail.core.navigate.sitemap.UserSitemapNode 17 | import uk.q3c.krail.i18n.I18NKey 18 | import java.io.Serializable 19 | import java.util.* 20 | 21 | interface UserSitemapNodeComparator : Comparator, Serializable { 22 | 23 | fun nameKey(): I18NKey 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/shiro/DefaultJWTKeyProvider.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.shiro 2 | 3 | /** 4 | * Created by David Sowerby on 05 Mar 2018 5 | */ 6 | class DefaultJWTKeyProvider : JWTKeyProvider { 7 | override val asString: String 8 | get() = "this should be a base64EncodedSecretKey" 9 | } 10 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/shiro/JWTKeyProvider.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.shiro 2 | 3 | import java.io.Serializable 4 | 5 | /** 6 | * Created by David Sowerby on 05 Mar 2018 7 | */ 8 | interface JWTKeyProvider : Serializable { 9 | val asString: String 10 | } 11 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/ui/BootstrapUI.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.ui 2 | 3 | import com.vaadin.server.VaadinRequest 4 | import com.vaadin.ui.Label 5 | import com.vaadin.ui.UI 6 | import com.vaadin.ui.VerticalLayout 7 | 8 | /** 9 | * Vaadin needs a parameterless constructor for the first UI it loads when using Vertx. This is it. It should never actually be seen! 10 | * 11 | * Created by David Sowerby on 18 Apr 2018 12 | */ 13 | class BootstrapUI : UI() { 14 | override fun init(request: VaadinRequest) { 15 | // Create the content root layout for the UI 16 | val content = VerticalLayout() 17 | setContent(content) 18 | 19 | content.addComponent(Label("Hello World, I'm surprised you can see me. I am only needed to get Krail started on Vertx")) 20 | content.addComponent((Label("One way to make me disappear is to have an entry in your BindingsCollator.uiModule() like 'return DefaultUIModule().uiClass(MyUI.class)'"))) 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/LoginDescriptionKey.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.user 2 | 3 | import uk.q3c.krail.i18n.I18NKey 4 | 5 | /** 6 | * Created by David Sowerby on 09 Mar 2018 7 | */ 8 | enum class LoginDescriptionKey : I18NKey { 9 | Account_Already_In_Use, 10 | Account_is_Disabled, 11 | Account_Expired, 12 | Account_Locked, 13 | Enter_Your_Password, 14 | Enter_your_user_name, 15 | Invalid_Login, 16 | Log_In, 17 | Please_log_in, 18 | Submit_Your_Login_Details, 19 | Too_Many_Login_Attempts, 20 | Unknown_Account, 21 | You_have_not_logged_in, 22 | Authentication_Failed 23 | } 24 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/LoginDescriptions_it.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.user 14 | 15 | class LoginDescriptions_it : LoginDescriptions() { 16 | 17 | 18 | override fun loadMap() { 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/LoginLabelKey.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.user 2 | 3 | import uk.q3c.krail.i18n.I18NKey 4 | 5 | /** 6 | * Created by David Sowerby on 09 Mar 2018 7 | */ 8 | enum class LoginLabelKey : I18NKey { 9 | Account_Already_In_Use, 10 | Account_is_Disabled, 11 | Account_Expired, 12 | Account_Locked, 13 | Authentication_Failed, 14 | Enter_your_user_name, 15 | Invalid_Login, 16 | Password, 17 | Please_log_in, 18 | Log_In, 19 | Log_Out, 20 | Submit, 21 | Too_Many_Login_Attempts, 22 | Unknown_Account, 23 | User_Name, 24 | You_have_not_logged_in, 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/LoginLabels_de.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2018. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.user 14 | 15 | 16 | class LoginLabels_de : LoginLabels() { 17 | 18 | 19 | override fun loadMap() { 20 | 21 | 22 | put(LoginLabelKey.Log_In, "Einloggen") 23 | put(LoginLabelKey.Log_Out, "Ausloggen") 24 | put(LoginLabelKey.User_Name, "Benutzername") 25 | put(LoginLabelKey.Password, "Passwort") 26 | put(LoginLabelKey.Submit, "Absenden") 27 | 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/LoginLabels_de_CH.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.user 14 | 15 | /** 16 | * The base for the resource bundle of LoginLabels specifically for Locale de_CH. Not currently populated as it is used only 17 | * for testing 18 | * 19 | * @author David Sowerby 9 Feb 2013 20 | */ 21 | class LoginLabels_de_CH : LoginLabels() 22 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/LoginLabels_it.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2018. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.user 14 | 15 | 16 | class LoginLabels_it : LoginLabels() { 17 | 18 | override fun loadMap() { 19 | put(LoginLabelKey.Log_In, "Log in") 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/User.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.user 2 | 3 | import java.io.Serializable 4 | 5 | /** 6 | * A read only DAO to obtain the details of a user from a unique user id 7 | * 8 | * Created by David Sowerby on 08 Mar 2018 9 | */ 10 | interface UserQueryDao : Serializable { 11 | 12 | fun user(id: String): User 13 | 14 | } 15 | 16 | /** 17 | * A placeholder implementation which simply returns a DefaultUserObject with 'knownAs' truncated from the id (assumes id is an email address) 18 | */ 19 | class DefaultUserQueryDao : UserQueryDao { 20 | override fun user(id: String): DefaultUser { 21 | return DefaultUser(id = id, knownAs = id.substringBefore(".")) 22 | } 23 | } 24 | 25 | 26 | interface User { 27 | /** 28 | * The unique identifier for the user, used as login name and Subject primary principal. 29 | */ 30 | val id: String 31 | /** 32 | * The (usually short) name typically displayed on screen to show who is logged in. 33 | */ 34 | val knownAs: String 35 | 36 | } 37 | 38 | data class DefaultUser(override val id: String, override val knownAs: String) : User 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/user/UserStatus.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.user 2 | 3 | import uk.q3c.krail.core.eventbus.Event 4 | import uk.q3c.krail.core.user.status.UserStatusChangeSource 5 | import uk.q3c.krail.eventbus.BusMessage 6 | 7 | /** 8 | * Created by David Sowerby on 06 Mar 2018 9 | */ 10 | 11 | data class UserHasLoggedIn @JvmOverloads constructor(override val aggregateType: String = "User", override val aggregateId: String, val knownAs: String, val source: UserStatusChangeSource) : Event 12 | 13 | data class UserHasLoggedOut @JvmOverloads constructor(override val aggregateType: String = "User", override val aggregateId: String, val knownAs: String, val source: UserStatusChangeSource) : Event 14 | data class UserLoginFailed @JvmOverloads constructor(override val aggregateType: String = "User", override val aggregateId: String, val label: LoginLabelKey, val description: LoginDescriptionKey) : Event 15 | data class UserSitemapRebuilt(val loggedIn: Boolean, val source: UserStatusChangeSource) : BusMessage -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/view/NavigationStateExt.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.view 2 | 3 | import uk.q3c.krail.core.navigate.NavigationState 4 | import uk.q3c.krail.core.navigate.sitemap.UserSitemapNode 5 | import java.io.Serializable 6 | 7 | /** 8 | * Created by David Sowerby on 12 Jun 2018 9 | */ 10 | data class NavigationStateExt(val from: NavigationState?, val to: NavigationState, val node: UserSitemapNode) : Serializable -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/view/NavigationView.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.view 2 | 3 | import com.google.inject.Inject 4 | import com.google.inject.Provider 5 | import uk.q3c.krail.core.navigate.sitemap.EmptyView 6 | import uk.q3c.krail.core.view.component.PageNavigationPanel 7 | import uk.q3c.krail.i18n.Translate 8 | import uk.q3c.util.guice.SerializationSupport 9 | 10 | /** 11 | * Presents a set of buttons for navigation to child pages 12 | * 13 | * Created by David Sowerby on 11 Aug 2018 14 | */ 15 | interface NavigationView : EmptyView 16 | 17 | class DefaultNavigationView @Inject constructor(serialisationSupport: SerializationSupport, translate: Translate, @field:Transient val navigationPanelProvider: Provider) : ViewBase(translate, serialisationSupport), NavigationView { 18 | 19 | 20 | override fun doBuild() { 21 | val navigationPanel = navigationPanelProvider.get() 22 | rootComponent = navigationPanel 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/view/ViewConfiguration.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.view 2 | 3 | import java.io.Serializable 4 | 5 | /** 6 | * Created by David Sowerby on 10 Jun 2018 7 | */ 8 | interface ViewConfiguration : Serializable 9 | 10 | class EmptyViewConfiguration : ViewConfiguration -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/view/component/I18NLabel.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.view.component 2 | 3 | import com.vaadin.ui.Label 4 | import uk.q3c.krail.i18n.I18NKey 5 | 6 | /** 7 | * A very simple extension to [Label], which uses [valueKey] in conjunction with [TranslatableComponents] to automatically 8 | * update when Locale changes. 9 | * 10 | * Created by David Sowerby on 04 Sep 2018 11 | */ 12 | 13 | class I18NLabel(val valueKey: I18NKey) : Label() 14 | 15 | class MutableI18NLabel(var valueKey: I18NKey) : Label() -------------------------------------------------------------------------------- /src/main/kotlin/uk/q3c/krail/core/view/component/NavigationCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view.component 14 | 15 | import com.vaadin.ui.MenuBar 16 | import com.vaadin.ui.MenuBar.MenuItem 17 | import uk.q3c.krail.core.navigate.Navigator 18 | import uk.q3c.krail.core.navigate.sitemap.UserSitemapNode 19 | 20 | class NavigationCommand(val navigator: Navigator, val node: UserSitemapNode) : MenuBar.Command { 21 | 22 | override fun menuSelected(selectedItem: MenuItem) { 23 | navigator.navigateTo(node) 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/arrow_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/button/arrow_refresh.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/button/cross.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/button/disk.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/door.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/button/door.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/lightbulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/button/lightbulb.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/lightning_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/button/lightning_go.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/readme.txt: -------------------------------------------------------------------------------- 1 | Silk icon set 1.3 2 | 3 | _________________________________________ 4 | Mark James 5 | http://www.famfamfam.com/lab/icons/silk/ 6 | _________________________________________ 7 | 8 | This work is licensed under a 9 | Creative Commons Attribution 2.5 License. 10 | [ http://creativecommons.org/licenses/by/2.5/ ] 11 | 12 | This means you may use it for any purpose, 13 | and make any changes you like. 14 | All I ask is that you include a link back 15 | to this page in your credits. 16 | 17 | Are you using this icon set? Send me an email 18 | (including a link or picture if available) to 19 | mjames@gmail.com 20 | 21 | Any other questions about this icon set please 22 | contact mjames@gmail.com -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/button/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/button/tick.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/error.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/info.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/question.png -------------------------------------------------------------------------------- /src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/main/resources/de/steinwedel/messagebox/icons/classic/dialog/warning.png -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/shiro/DefaultShiroModuleTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.shiro 15 | 16 | import spock.lang.Specification 17 | 18 | /** 19 | * Created by David Sowerby on 02 Jan 2016 20 | */ 21 | class DefaultShiroModuleTest extends Specification { 22 | 23 | def "Name"() { 24 | expect: true 25 | // throw new RuntimeException("Not yet implemented"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/shiro/KrailSecurityManagerTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.shiro 15 | 16 | import spock.lang.Specification 17 | 18 | /** 19 | * Created by David Sowerby on 02 Jan 2016 20 | */ 21 | class KrailSecurityManagerTest extends Specification { 22 | 23 | def "Name"() { 24 | expect: true 25 | 26 | // throw new RuntimeException("Not yet implemented"); 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/ui/BasicUIProviderTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.ui 15 | 16 | import spock.lang.Specification 17 | 18 | /** 19 | * Created by David Sowerby on 08 Feb 2016 20 | */ 21 | class BasicUIProviderTest extends Specification { 22 | 23 | BasicUIProvider provider 24 | 25 | def setup() { 26 | provider = new BasicUIProvider() 27 | } 28 | 29 | def "getUIClass"() { 30 | 31 | expect: 32 | provider.getUIClass(null) == BasicUI 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultPrivateHomeViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultPrivateHomeViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultPrivateHomeView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultPublicHomeViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultPublicHomeViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultPublicHomeView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultRequestSystemAccountCreateViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultRequestSystemAccountCreateViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultRequestSystemAccountCreateView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultRequestSystemAccountEnableViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultRequestSystemAccountEnableViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultRequestSystemAccountEnableView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultRequestSystemAccountRefreshViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultRequestSystemAccountRefreshViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultRequestSystemAccountRefreshView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultRequestSystemAccountResetViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultRequestSystemAccountResetViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultRequestSystemAccountResetView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultRequestSystemAccountUnlockViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultRequestSystemAccountUnlockViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultRequestSystemAccountUnlockView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/groovy/uk/q3c/krail/core/view/DefaultSystemAccountViewTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.view 15 | /** 16 | * Created by David Sowerby on 08 Feb 2016 17 | */ 18 | class DefaultSystemAccountViewTest extends ViewTest { 19 | 20 | def setup() { 21 | view = new DefaultSystemAccountView(translate, serializationSupport) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/WEB-INF/icons/flags_iso/48/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/test/java/WEB-INF/icons/flags_iso/48/de.png -------------------------------------------------------------------------------- /src/test/java/WEB-INF/icons/flags_iso/48/gb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/test/java/WEB-INF/icons/flags_iso/48/gb.png -------------------------------------------------------------------------------- /src/test/java/WEB-INF/icons/flags_iso/48/it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/test/java/WEB-INF/icons/flags_iso/48/it.png -------------------------------------------------------------------------------- /src/test/java/WEB-INF/krail.ini: -------------------------------------------------------------------------------- 1 | test = true 2 | dbUser = monty 3 | -------------------------------------------------------------------------------- /src/test/java/WEB-INF/test.krail.ini: -------------------------------------------------------------------------------- 1 | test = true 2 | dbUser = python 3 | -------------------------------------------------------------------------------- /src/test/java/fixture/KryoPattern.java: -------------------------------------------------------------------------------- 1 | package fixture; 2 | 3 | import java.io.IOException; 4 | import java.io.ObjectInputStream; 5 | 6 | /** 7 | * Created by David Sowerby on 28 Mar 2018 8 | */ 9 | public class KryoPattern { 10 | private SerializableDependency dependency1; 11 | private transient NonSerializableDependency dependency2; 12 | 13 | public KryoPattern(SerializableDependency dependency1, NonSerializableDependency dependency2) { 14 | this.dependency1 = dependency1; 15 | this.dependency2 = dependency2; 16 | } 17 | 18 | private KryoPattern() { // no-args constructor for Kryo Serialisation 19 | init(); 20 | } 21 | 22 | private void readObject(ObjectInputStream stream) 23 | throws IOException, ClassNotFoundException { 24 | stream.defaultReadObject(); 25 | init(); 26 | } 27 | 28 | // writeObject not needed 29 | 30 | /** 31 | * Needs a better name, init is used for many things 32 | */ 33 | private void init() { 34 | dependency2 = new NonSerializableDependency(); 35 | // or a call to SerializableSupport if used in a Guice environment 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/fixture/NonSerializableDependency.java: -------------------------------------------------------------------------------- 1 | package fixture; 2 | 3 | /** 4 | * Created by David Sowerby on 28 Mar 2018 5 | */ 6 | public class NonSerializableDependency { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/fixture/SerializableDependency.java: -------------------------------------------------------------------------------- 1 | package fixture; 2 | 3 | /** 4 | * Created by David Sowerby on 28 Mar 2018 5 | */ 6 | public class SerializableDependency { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/fixture1/TestLbls3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package fixture1; 15 | 16 | import uk.q3c.krail.core.i18n.TestLabelKey3; 17 | import uk.q3c.krail.i18n.EnumResourceBundle; 18 | 19 | /** 20 | * Created by David Sowerby on 10/12/14. 21 | */ 22 | public class TestLbls3 extends EnumResourceBundle { 23 | 24 | public TestLbls3() { 25 | super(); 26 | } 27 | 28 | @Override 29 | protected void loadMap() { 30 | put(TestLabelKey3.Key1, "key number 1"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/test/java/fixture1/TestLbls3_en.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package fixture1; 15 | 16 | import uk.q3c.krail.core.i18n.TestLabelKey3; 17 | 18 | /** 19 | * Created by David Sowerby on 10/12/14. 20 | */ 21 | public class TestLbls3_en extends TestLbls3 { 22 | 23 | public TestLbls3_en() { 24 | super(); 25 | } 26 | 27 | @Override 28 | protected void loadMap() { 29 | put(TestLabelKey3.Key1, "key number 1"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/test.shiro.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/test/java/test.shiro.ini -------------------------------------------------------------------------------- /src/test/java/test1.krail.ini: -------------------------------------------------------------------------------- 1 | #a test file with nothing in it -------------------------------------------------------------------------------- /src/test/java/test2.krail.ini: -------------------------------------------------------------------------------- 1 | #a test file with section only 2 | [pages] 3 | login = login 4 | 5 | -------------------------------------------------------------------------------- /src/test/java/test3.krail.ini: -------------------------------------------------------------------------------- 1 | #a test file with irrelevant section, and no options section 2 | [pages] 3 | login = logina 4 | logout = xxx 5 | [db] 6 | dbUrl = aaaaaaaaa 7 | dbuser = dddd 8 | dbPwd = asdasdasdas 9 | [extra] 10 | thingy = ??? 11 | 12 | -------------------------------------------------------------------------------- /src/test/java/test4.krail.ini: -------------------------------------------------------------------------------- 1 | #a test file with irrelevant section, and no options section 2 | [pages] 3 | login = logina 4 | logout = xxx 5 | [db] 6 | dbUrl = aaaaaaaaa 7 | dbuser = dddd 8 | dbPwd = asdasdasdas 9 | [options] 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/test/java/test5.krail.ini: -------------------------------------------------------------------------------- 1 | [db] 2 | dbUrl = aaaaaaaaa 3 | dbuser = dddd 4 | dbPwd = asdasdasdas 5 | [options] 6 | readSiteMap = true 7 | 8 | -------------------------------------------------------------------------------- /src/test/java/test6.krail.ini: -------------------------------------------------------------------------------- 1 | [db] 2 | dbUrl = aaaaaaaaa 3 | dbuser = dddd 4 | dbPwd = asdasdasdas 5 | [options] 6 | readSiteMap = false 7 | 8 | -------------------------------------------------------------------------------- /src/test/java/test7.krail.ini: -------------------------------------------------------------------------------- 1 | dbUrl = aaaaaaaaa 2 | dbUser = python 3 | dbPwd = asdasdasdas 4 | [options] 5 | readSiteMap = false 6 | 7 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/config/config1.ini: -------------------------------------------------------------------------------- 1 | [a] 2 | k1 = 1-1 3 | k2 = 1-2 -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/config/config2.ini: -------------------------------------------------------------------------------- 1 | [a] 2 | k1 = 2-1 3 | k2 = 2-2 -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/config/config3.ini: -------------------------------------------------------------------------------- 1 | [a] 2 | k1 = 3-1 3 | k2 = 3-2 -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/eventbus/SessionBusListener.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.eventbus; 2 | 3 | import net.engio.mbassy.listener.Handler; 4 | import uk.q3c.krail.eventbus.BusMessage; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by David Sowerby on 13 Mar 2018 11 | */ 12 | public class SessionBusListener { 13 | 14 | 15 | private List messages = new ArrayList<>(); 16 | private List> messagesClasses = new ArrayList<>(); 17 | 18 | 19 | @Handler 20 | public void messageHandler(BusMessage busMessage) { 21 | System.out.println("bus listener received a " + busMessage.getClass().getName()); 22 | messages.add(busMessage); 23 | messagesClasses.add(busMessage.getClass()); 24 | } 25 | 26 | public void clear() { 27 | messages.clear(); 28 | } 29 | 30 | public boolean contains(BusMessage busMessage) { 31 | return messages.contains(busMessage); 32 | } 33 | 34 | public boolean containsInstanceOf(Class busMessageClass) { 35 | return messagesClasses.contains(busMessageClass); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/guice/AJavaClass.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.guice; 2 | 3 | import com.google.inject.Inject; 4 | import com.google.inject.name.Named; 5 | 6 | /** 7 | * Created by David Sowerby on 24 Mar 2018 8 | */ 9 | public class AJavaClass 10 | 11 | { 12 | private Wiggly wigglyField; 13 | 14 | @Inject 15 | public AJavaClass(@Named("1") Wiggly wigglyInConstructor) { 16 | this.wigglyField = wigglyInConstructor; 17 | } 18 | 19 | public Wiggly getWigglyField() { 20 | return wigglyField; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/guice/threadscope/SomeClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance 5 | * with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for 11 | * the specific language governing permissions and limitations under the License. 12 | */ 13 | 14 | package uk.q3c.krail.core.guice.threadscope; 15 | 16 | import com.google.inject.Inject; 17 | 18 | @ThreadScoped 19 | public class SomeClass { 20 | 21 | @Inject 22 | public SomeClass() { 23 | super(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/CompositeComponent_with_I18N_only.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | import com.vaadin.ui.Label; 16 | import com.vaadin.ui.Panel; 17 | 18 | /** 19 | * Test class with I18N annotation 20 | */ 21 | @I18N 22 | public class CompositeComponent_with_I18N_only extends Panel { 23 | 24 | @Description(description = DescriptionKey.Confirm_Ok) 25 | private final Label labelInsideTcc = new Label(); 26 | 27 | public Label getLabelInsideTcc() { 28 | return labelInsideTcc; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/I18NMonitoredButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | import com.vaadin.ui.Button; 17 | 18 | /** 19 | * Created by David Sowerby on 16/05/15. 20 | */ 21 | public class I18NMonitoredButton extends Button { 22 | 23 | private int accessCount; 24 | 25 | public int getAccessCount() { 26 | return accessCount; 27 | } 28 | 29 | @Override 30 | public void setCaption(String caption) { 31 | super.setCaption(caption); 32 | accessCount++; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/I18NTestClass2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | import com.vaadin.ui.Button; 16 | 17 | public class I18NTestClass2 { 18 | 19 | // keep field as null make sure nothing breaks; 20 | @Caption(caption = LabelKey.Cancel, description = DescriptionKey.Field) 21 | private Button unconstructed; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/I18NTestClass3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | 16 | public class I18NTestClass3 { 17 | 18 | private final TestCompositeComponent_componentNotConstructed ccs_unconstructed = new 19 | TestCompositeComponent_componentNotConstructed(); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/I18NTestClass4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | import com.vaadin.ui.Button; 17 | import uk.q3c.util.test.NotOnWeekends; 18 | 19 | /** 20 | * Provides a byte-enhanced class using JPA @Transactional 21 | *

22 | * Created by David Sowerby on 11/05/15. 23 | */ 24 | public class I18NTestClass4 { 25 | 26 | @Caption(caption = LabelKey.Authentication, description = DescriptionKey.Confirm_Ok) 27 | Button tba; 28 | 29 | @NotOnWeekends 30 | public void pretendData() { 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/I18NTestClass7.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | /** 17 | * To support test cases of:

  1. field caption overriding class caption
  2. 18 | *

    19 | *

20 | */ 21 | public class I18NTestClass7 { 22 | 23 | @Caption(caption = LabelKey.Field, description = DescriptionKey.Confirm_Ok) 24 | CompositeComponent_with_Caption_and_I18N classWithCaptionAndI18N = new CompositeComponent_with_Caption_and_I18N(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/I18NTestClass8.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | /** 17 | * To support test cases of:
  1. class caption
  2. 18 | *

    19 | *

20 | */ 21 | public class I18NTestClass8 { 22 | 23 | CompositeComponent_with_Caption_and_I18N classWithCaptionAndI18N = new CompositeComponent_with_Caption_and_I18N(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/I18NTestClass9.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | /** 17 | * To support test cases of:
  1. field caption overriding class caption
  2. 18 | *

    19 | *

20 | */ 21 | public class I18NTestClass9 { 22 | 23 | @I18N(drillDown = false) 24 | CompositeComponent_with_Caption_and_I18N classWithCaptionAndI18N = new CompositeComponent_with_Caption_and_I18N(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/TestCompositeComponentNested.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | import com.vaadin.ui.Panel; 16 | 17 | public class TestCompositeComponentNested extends Panel { 18 | @Caption(caption = LabelKey.Nested, description = DescriptionKey.Field) 19 | private final TestCompositeComponent ccs = new TestCompositeComponent(); 20 | 21 | public TestCompositeComponent getCcs() { 22 | return ccs; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/TestCompositeNonComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | import com.vaadin.ui.Label; 16 | 17 | public class TestCompositeNonComponent { 18 | @Caption(caption = LabelKey.Cancel, description = DescriptionKey.Confirm_Ok) 19 | private final Label label = new Label(); 20 | 21 | public Label getLabel() { 22 | return label; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/TestLabelKey2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | import uk.q3c.krail.i18n.I18NKey; 17 | 18 | /** 19 | * Created by David Sowerby on 10/12/14. 20 | */ 21 | public enum TestLabelKey2 implements I18NKey { 22 | 23 | Key1, Key_2; 24 | 25 | 26 | @Override 27 | public String bundleName() { 28 | return "TestLbls2"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/TestLabelKey3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.i18n; 15 | 16 | import uk.q3c.krail.i18n.I18NKey; 17 | 18 | /** 19 | * Created by David Sowerby on 10/12/14. 20 | */ 21 | public enum TestLabelKey3 implements I18NKey { 22 | 23 | Key1, Key_2; 24 | 25 | 26 | @Override 27 | public String bundleName() { 28 | return "TestLbls3"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/i18n/TestLabelKey_Invalid.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | package uk.q3c.krail.core.i18n; 14 | 15 | 16 | public enum TestLabelKey_Invalid { 17 | 18 | home, 19 | transfers, 20 | login, 21 | moneyInOut, 22 | opt 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/vaadin/IDTestInstance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015. David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 8 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 9 | * specific language governing permissions and limitations under the License. 10 | */ 11 | 12 | package uk.q3c.krail.core.vaadin; 13 | 14 | import uk.q3c.util.test.NotOnWeekends; 15 | 16 | /** 17 | * Created by David Sowerby on 07/05/15. 18 | */ 19 | public class IDTestInstance { 20 | 21 | @NotOnWeekends 22 | public void justForAnnotation() { 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/vaadin/SourceTreeWrapper_VaadinTreeTest.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.vaadin; 2 | 3 | /** 4 | * Created by David Sowerby on 14 Aug 2017 5 | */ 6 | public class SourceTreeWrapper_VaadinTreeTest { 7 | 8 | SourceTreeWrapper_VaadinTree tree; 9 | 10 | } -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/validation/TestFieldNameKey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.validation; 15 | 16 | import uk.q3c.krail.i18n.I18NKey; 17 | 18 | /** 19 | * Created by David Sowerby on 06/02/15. 20 | */ 21 | public enum TestFieldNameKey implements I18NKey { 22 | height, weight, speed, age 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/validation/TestFieldNames.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.validation; 15 | 16 | import uk.q3c.krail.i18n.EnumResourceBundle; 17 | 18 | /** 19 | * Created by David Sowerby on 06/02/15. 20 | */ 21 | public class TestFieldNames extends EnumResourceBundle { 22 | @Override 23 | protected void loadMap() { 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/validation/TestFieldNames_de.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.validation; 15 | 16 | import uk.q3c.krail.i18n.EnumResourceBundle; 17 | 18 | /** 19 | * Created by David Sowerby on 06/02/15. 20 | */ 21 | public class TestFieldNames_de extends EnumResourceBundle { 22 | @Override 23 | protected void loadMap() { 24 | put(TestFieldNameKey.age, "de_age"); 25 | put(TestFieldNameKey.height, "de_height"); 26 | put(TestFieldNameKey.speed, "de_speed"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/validation/TestValidationKey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.validation; 15 | 16 | import uk.q3c.krail.i18n.I18NKey; 17 | 18 | /** 19 | * Created by David Sowerby on 06/02/15. 20 | */ 21 | public enum TestValidationKey implements I18NKey { 22 | Too_Big, Must_be_an_Adult 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/validation/TestValidations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * Copyright (c) 2016. David Sowerby 4 | * * 5 | * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | * * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | * * 8 | * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | * * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | * * specific language governing permissions and limitations under the License. 11 | * 12 | */ 13 | 14 | package uk.q3c.krail.core.validation; 15 | 16 | import uk.q3c.krail.i18n.EnumResourceBundle; 17 | 18 | /** 19 | * Created by David Sowerby on 06/02/15. 20 | */ 21 | public class TestValidations extends EnumResourceBundle { 22 | 23 | 24 | @Override 25 | protected void loadMap() { 26 | put(TestValidationKey.Too_Big, "is far too big, it should be less than {0}"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/view/Thingy.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.view; 2 | 3 | /** 4 | * Created by David Sowerby on 14 Mar 2018 5 | */ 6 | public class Thingy { 7 | private int value; 8 | 9 | public int getValue() { 10 | return value; 11 | } 12 | 13 | public void setValue(int value) { 14 | this.value = value; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/view/Widget.java: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.view; 2 | 3 | /** 4 | * Created by David Sowerby on 14 Mar 2018 5 | */ 6 | class Widget { 7 | private T value; 8 | 9 | public T getValue() { 10 | return value; 11 | } 12 | 13 | public void setValue(T value) { 14 | this.value = value; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/uk/q3c/krail/core/view/testviews/subview/NotKrailView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 David Sowerby 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package uk.q3c.krail.core.view.testviews.subview; 14 | 15 | 16 | public class NotKrailView { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/test/kotlin/uk/q3c/krail/core/form/FormDSLTest.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.form 2 | 3 | /** 4 | * Created by David Sowerby on 22 Jun 2018 5 | */ 6 | -------------------------------------------------------------------------------- /src/test/kotlin/uk/q3c/krail/core/i18n/TestKrailI18NModule.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.i18n 2 | 3 | import uk.q3c.krail.i18n.CurrentLocale 4 | import uk.q3c.krail.i18n.test.MockCurrentLocale 5 | import java.util.* 6 | 7 | /** 8 | * Created by David Sowerby on 16 Jan 2018 9 | */ 10 | class TestKrailI18NModule : KrailI18NModule() { 11 | 12 | var currentLocale = MockCurrentLocale() 13 | 14 | override fun bindCurrentLocale() { 15 | bind(CurrentLocale::class.java).toInstance(currentLocale) 16 | } 17 | 18 | 19 | override fun define() { 20 | super.define() 21 | supportedLocales(Locale.ITALY, Locale.UK, Locale.GERMANY) 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/test/kotlin/uk/q3c/krail/core/i18n/TestKrailI18NModule2.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.i18n 2 | 3 | import java.util.* 4 | 5 | /** 6 | * Created by David Sowerby on 16 Jan 2018 7 | */ 8 | class TestKrailI18NModule2 : KrailI18NModule() { 9 | 10 | 11 | override fun define() { 12 | super.define() 13 | supportedLocales(Locale.ITALY, Locale.UK, Locale.GERMANY) 14 | supportedLocales(Locale("de", "CH")) 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/test/kotlin/uk/q3c/krail/core/vaadin/MockVaadinSession.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.vaadin 2 | 3 | import com.vaadin.server.VaadinService 4 | import com.vaadin.server.VaadinSession 5 | import io.mockk.every 6 | import io.mockk.mockk 7 | import uk.q3c.krail.util.DefaultResourceUtils 8 | 9 | /** 10 | * Created by David Sowerby on 19 Mar 2018 11 | */ 12 | class MockVaadinSession(val vaadinService: VaadinService = mockk(relaxed = true)) : VaadinSession(vaadinService) { 13 | 14 | override fun hasLock(): Boolean { 15 | return true 16 | } 17 | 18 | fun clear() { 19 | VaadinSession.setCurrent(null) 20 | } 21 | 22 | } 23 | 24 | fun createMockVaadinSession(): MockVaadinSession { 25 | val vaadinService: VaadinService = mockk(relaxed = true) 26 | every { vaadinService.baseDirectory }.returns(DefaultResourceUtils().userTempDirectory()) 27 | val session = MockVaadinSession(vaadinService) 28 | VaadinSession.setCurrent(session) 29 | return session 30 | } 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/test/kotlin/uk/q3c/krail/core/view/component/NavigationButtonTest.kt: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.view.component 2 | 3 | import io.mockk.mockk 4 | import io.mockk.verify 5 | import org.jetbrains.spek.api.Spek 6 | import org.jetbrains.spek.api.dsl.given 7 | import org.jetbrains.spek.api.dsl.it 8 | import org.jetbrains.spek.api.dsl.on 9 | import uk.q3c.krail.core.navigate.Navigator 10 | import uk.q3c.krail.core.navigate.sitemap.UserSitemapNode 11 | 12 | /** 13 | * Created by David Sowerby on 10 Aug 2018 14 | */ 15 | object NavigationButtonTest : Spek({ 16 | 17 | given("a NavigationButton") { 18 | val navigator: Navigator = mockk(relaxed = true) 19 | val node: UserSitemapNode = mockk(relaxed = true) 20 | val button = NavigationButton(node, navigator) 21 | 22 | on("click") { 23 | button.click() 24 | 25 | it("calls navigator to navigate to node") { 26 | verify { navigator.navigateTo(node) } 27 | } 28 | } 29 | } 30 | }) -------------------------------------------------------------------------------- /src/test/resources/Labels.properties: -------------------------------------------------------------------------------- 1 | Yes=yes from properties -------------------------------------------------------------------------------- /src/test/resources/Labels_it.ref_exc: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.i18n; 2 | 3 | 4 | /** 5 | * Generated by Krail 14 December 2014 12:35:59 GMT 6 | * 7 | */ 8 | public class Labels_it extends EnumResourceBundle { 9 | 10 | @Override 11 | protected void loadMap() { 12 | put(LabelKey.Cancel, "Cancellare"); 13 | put(LabelKey.Enable_Account, "Abilita Account"); 14 | put(LabelKey.Error, "Errore"); 15 | put(LabelKey.First_Name, "Nome"); 16 | put(LabelKey.Guest, "Ospite"); 17 | put(LabelKey.Last_Name, "Cognome"); 18 | put(LabelKey.Log_In, "Log in"); 19 | put(LabelKey.Message_Box, "Scatola di Messaggio"); 20 | put(LabelKey.No, "No"); 21 | put(LabelKey.Notifications, "Notifiche"); 22 | put(LabelKey.Push, "Spinta"); 23 | put(LabelKey.Refresh_Account, "Aggiorna Conto"); 24 | put(LabelKey.Request_Account, "Richiesta Conto"); 25 | put(LabelKey.Reset_Account, "Ripristina Conto"); 26 | put(LabelKey.Small, "Piccolo"); 27 | put(LabelKey.System_Account, "Conto di Sistema"); 28 | put(LabelKey.Yes, "Sì"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/resources/NewBundle_it.ref_exc: -------------------------------------------------------------------------------- 1 | package uk.q3c.krail.core.i18n; 2 | 3 | 4 | /** 5 | * Generated by Krail 14 December 2014 12:40:50 GMT 6 | * 7 | */ 8 | public class NewBundle_it extends EnumResourceBundle { 9 | 10 | @Override 11 | protected void loadMap() { 12 | put(LabelKey.Cancel, "Cancellare"); 13 | put(LabelKey.Enable_Account, "Abilita Account"); 14 | put(LabelKey.Error, "Errore"); 15 | put(LabelKey.First_Name, "Nome"); 16 | put(LabelKey.Guest, "Ospite"); 17 | put(LabelKey.Last_Name, "Cognome"); 18 | put(LabelKey.Log_In, "Log in"); 19 | put(LabelKey.Message_Box, "Scatola di Messaggio"); 20 | put(LabelKey.No, "No"); 21 | put(LabelKey.Notifications, "Notifiche"); 22 | put(LabelKey.Push, "Spinta"); 23 | put(LabelKey.Refresh_Account, "Aggiorna Conto"); 24 | put(LabelKey.Request_Account, "Richiesta Conto"); 25 | put(LabelKey.Reset_Account, "Ripristina Conto"); 26 | put(LabelKey.Small, "Piccolo"); 27 | put(LabelKey.System_Account, "Conto di Sistema"); 28 | put(LabelKey.Yes, "Sì"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/resources/TestLabels.properties: -------------------------------------------------------------------------------- 1 | Blank=my mind first thing in the morning -------------------------------------------------------------------------------- /src/test/resources/TestLabels_de.properties_ref: -------------------------------------------------------------------------------- 1 | #created by PropertiesBundleWriter 2 | #Thu Feb 26 22:06:57 GMT 2015 3 | ViewB11=ViewB11 4 | View2=View2 5 | View1=View1 6 | Home=zu Hause 7 | pattern_with_embedded_key=Your {0} request has been refused 8 | Yes=Ja 9 | ViewA1=ViewA1 10 | No=Nein 11 | nullKey=nullKey 12 | Opt=option 13 | ViewA11=ViewA11 14 | ViewB1=ViewB1 15 | Blank=Blank 16 | MoneyInOut=MoneyInOut 17 | ViewB=DE_ViewB 18 | ViewA=DE_ViewA 19 | Private=Private 20 | Login=Login 21 | Public=Public 22 | My_Account=My Account 23 | key2=key2 24 | Transfers=transfers 25 | key1=key1 26 | -------------------------------------------------------------------------------- /src/test/resources/TestLabels_it.properties_ref: -------------------------------------------------------------------------------- 1 | #created by PropertiesBundleWriter 2 | #Thu Feb 26 22:06:57 GMT 2015 3 | ViewB11=ViewB11 4 | View2=View2 5 | View1=View1 6 | Home=it_Home 7 | pattern_with_embedded_key=Your {0} request has been refused 8 | Yes=it_Yes 9 | ViewA1=ViewA1 10 | No=it_No 11 | nullKey=nullKey 12 | Opt=option 13 | ViewA11=ViewA11 14 | ViewB1=ViewB1 15 | Blank= 16 | MoneyInOut=it_MoneyInOut 17 | ViewB=it_ViewB 18 | ViewA=it_ViewA 19 | Private=Private 20 | Login=Login 21 | Public=Public 22 | My_Account=My Account 23 | key2=key2 24 | Transfers=transfers 25 | key1=key1 26 | -------------------------------------------------------------------------------- /src/test/resources/fixture1/TestLabels.properties: -------------------------------------------------------------------------------- 1 | Yes=yes from properties -------------------------------------------------------------------------------- /src/test/resources/fixture1/TestLabels_it.properties: -------------------------------------------------------------------------------- 1 | Yes=italian yes from properties -------------------------------------------------------------------------------- /src/test/resources/fixture1/TestLbls2.properties: -------------------------------------------------------------------------------- 1 | Key1=key1 from properties -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/env/krail-bootstrap1.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | collator: uk.q3c.krail.core.guice.CoreBindingsCollator 3 | modules: 4 | - uk.q3c.krail.core.vaadin.DataModule 5 | servlet: 6 | modules: 7 | - uk.q3c.krail.core.env.ServletEnvironmentModule 8 | vertx: 9 | modules: 10 | - uk.q3c.krail.core.env.VertxEnvironmentModule -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/env/krail-bootstrap2.yml: -------------------------------------------------------------------------------- 1 | collator: uk.q3c.krail.core.guice.CoreBindingsCollator -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/env/krail-bootstrap3.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | collator: uk.q3c.krail.core.guice.CoreBindingsCollator 3 | modules: 4 | - uk.q3c.krail.core.vaadin.DataModule 5 | servlet: 6 | vertx: 7 | modules: 8 | -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/i18n/TestLabels.properties: -------------------------------------------------------------------------------- 1 | # 2 | # /* 3 | # * Copyright (c) 2016. David Sowerby 4 | # * 5 | # * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | # * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | # * 8 | # * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | # * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | # * specific language governing permissions and limitations under the License. 11 | # */ 12 | # 13 | 14 | Yes=yes from properties -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/i18n/TestLabels_it.properties: -------------------------------------------------------------------------------- 1 | # 2 | # /* 3 | # * Copyright (c) 2016. David Sowerby 4 | # * 5 | # * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 6 | # * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 7 | # * 8 | # * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 9 | # * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 10 | # * specific language governing permissions and limitations under the License. 11 | # */ 12 | # 13 | 14 | Yes=italian yes from properties -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/view/component/WEB-INF/icons/flags_iso/48/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/test/resources/uk/q3c/krail/core/view/component/WEB-INF/icons/flags_iso/48/de.png -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/view/component/WEB-INF/icons/flags_iso/48/gb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/test/resources/uk/q3c/krail/core/view/component/WEB-INF/icons/flags_iso/48/gb.png -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/view/component/WEB-INF/icons/flags_iso/48/it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrailOrg/krail/1a08f3f05a0b1fd5296e6b9c86c4ab679cb36a7e/src/test/resources/uk/q3c/krail/core/view/component/WEB-INF/icons/flags_iso/48/it.png -------------------------------------------------------------------------------- /src/test/resources/uk/q3c/krail/core/view/component/basedir-marker.txt: -------------------------------------------------------------------------------- 1 | Marker to allow finding directory from class resource --------------------------------------------------------------------------------