├── .editorconfig ├── .gitignore ├── .travis.yml ├── AUTHORS ├── LICENSE ├── README.md ├── docker ├── Dockerfile ├── configuration-docker.properties ├── init_db.sh ├── log4j-docker.properties ├── postgres-start.sh ├── postgres-stop.sh ├── postgresql.sql ├── tomcat-start.sh └── tomcat-stop.sh ├── eclipse ├── processor all.launch ├── processor core.launch └── yuicompressor.launch ├── maven-artifact-notifier-core ├── bindgen.properties ├── pom.xml └── src │ ├── main │ ├── java │ │ └── fr │ │ │ └── openwide │ │ │ └── maven │ │ │ └── artifact │ │ │ └── notifier │ │ │ └── core │ │ │ ├── MavenArtifactNotifierCorePackage.java │ │ │ ├── business │ │ │ ├── MavenArtifactNotifierCoreCommonBusinessPackage.java │ │ │ ├── artifact │ │ │ │ ├── dao │ │ │ │ │ ├── ArtifactDaoImpl.java │ │ │ │ │ ├── ArtifactGroupDaoImpl.java │ │ │ │ │ ├── ArtifactNotificationRuleDaoImpl.java │ │ │ │ │ ├── ArtifactVersionDaoImpl.java │ │ │ │ │ ├── ArtifactVersionNotificationDaoImpl.java │ │ │ │ │ ├── FollowedArtifactDaoImpl.java │ │ │ │ │ ├── IArtifactDao.java │ │ │ │ │ ├── IArtifactGroupDao.java │ │ │ │ │ ├── IArtifactNotificationRuleDao.java │ │ │ │ │ ├── IArtifactVersionDao.java │ │ │ │ │ ├── IArtifactVersionNotificationDao.java │ │ │ │ │ └── IFollowedArtifactDao.java │ │ │ │ ├── model │ │ │ │ │ ├── Artifact.java │ │ │ │ │ ├── ArtifactDeprecationStatus.java │ │ │ │ │ ├── ArtifactGroup.java │ │ │ │ │ ├── ArtifactKey.java │ │ │ │ │ ├── ArtifactNotificationRule.java │ │ │ │ │ ├── ArtifactNotificationRuleType.java │ │ │ │ │ ├── ArtifactStatus.java │ │ │ │ │ ├── ArtifactVersion.java │ │ │ │ │ ├── ArtifactVersionNotification.java │ │ │ │ │ ├── ArtifactVersionNotificationStatus.java │ │ │ │ │ ├── FollowedArtifact.java │ │ │ │ │ ├── IArtifact.java │ │ │ │ │ └── IComparableVersion.java │ │ │ │ ├── service │ │ │ │ │ ├── ArtifactGroupServiceImpl.java │ │ │ │ │ ├── ArtifactNotificationRuleServiceImpl.java │ │ │ │ │ ├── ArtifactServiceImpl.java │ │ │ │ │ ├── ArtifactVersionNotificationServiceImpl.java │ │ │ │ │ ├── ArtifactVersionServiceImpl.java │ │ │ │ │ ├── BatchArtifactServiceImpl.java │ │ │ │ │ ├── FollowedArtifactServiceImpl.java │ │ │ │ │ ├── IArtifactGroupService.java │ │ │ │ │ ├── IArtifactNotificationRuleService.java │ │ │ │ │ ├── IArtifactService.java │ │ │ │ │ ├── IArtifactVersionNotificationService.java │ │ │ │ │ ├── IArtifactVersionService.java │ │ │ │ │ ├── IBatchArtifactService.java │ │ │ │ │ └── IFollowedArtifactService.java │ │ │ │ └── util │ │ │ │ │ ├── ArtifactVersionLastUpdateDateComparator.java │ │ │ │ │ ├── MavenCentralComparableVersion.java │ │ │ │ │ └── MavenCentralVersionComparator.java │ │ │ ├── audit │ │ │ │ ├── model │ │ │ │ │ └── AuditSummary.java │ │ │ │ └── service │ │ │ │ │ ├── AuditServiceImpl.java │ │ │ │ │ └── IAuditService.java │ │ │ ├── authority │ │ │ │ └── MavenArtifactNotifierAuthorityUtils.java │ │ │ ├── notification │ │ │ │ └── service │ │ │ │ │ ├── EmptyNotificationContentDescriptorFactoryImpl.java │ │ │ │ │ ├── EmptyNotificationPanelRendererServiceImpl.java │ │ │ │ │ ├── EmptyNotificationUrlBuilderServiceImpl.java │ │ │ │ │ ├── IArtifactNotifierNotificationContentDescriptorFactory.java │ │ │ │ │ ├── INotificationPanelRendererService.java │ │ │ │ │ ├── INotificationService.java │ │ │ │ │ ├── INotificationUrlBuilderService.java │ │ │ │ │ └── NotificationServiceImpl.java │ │ │ ├── project │ │ │ │ ├── dao │ │ │ │ │ ├── IProjectDao.java │ │ │ │ │ ├── IProjectLicenseDao.java │ │ │ │ │ ├── IProjectVersionDao.java │ │ │ │ │ ├── ProjectDaoImpl.java │ │ │ │ │ ├── ProjectLicenseDaoImpl.java │ │ │ │ │ └── ProjectVersionDaoImpl.java │ │ │ │ ├── model │ │ │ │ │ ├── ItemAdditionalInformation.java │ │ │ │ │ ├── Project.java │ │ │ │ │ ├── ProjectLicense.java │ │ │ │ │ ├── ProjectVersion.java │ │ │ │ │ ├── ProjectVersionStatus.java │ │ │ │ │ └── VersionAdditionalInformation.java │ │ │ │ └── service │ │ │ │ │ ├── IProjectLicenseService.java │ │ │ │ │ ├── IProjectService.java │ │ │ │ │ ├── IProjectVersionService.java │ │ │ │ │ ├── ProjectLicenseServiceImpl.java │ │ │ │ │ ├── ProjectServiceImpl.java │ │ │ │ │ └── ProjectVersionServiceImpl.java │ │ │ ├── search │ │ │ │ ├── model │ │ │ │ │ ├── ArtifactBean.java │ │ │ │ │ ├── ArtifactVersionBean.java │ │ │ │ │ └── PomBean.java │ │ │ │ ├── service │ │ │ │ │ ├── IMavenCentralSearchApiService.java │ │ │ │ │ ├── IMavenCentralSearchUrlService.java │ │ │ │ │ ├── IPomParserService.java │ │ │ │ │ ├── MavenCentralSearchApiServiceImpl.java │ │ │ │ │ ├── MavenCentralSearchUrlServiceImpl.java │ │ │ │ │ └── PomParserServiceImpl.java │ │ │ │ └── util │ │ │ │ │ └── MavenCentralSearchApiConstants.java │ │ │ ├── statistics │ │ │ │ ├── dao │ │ │ │ │ ├── IStatisticDao.java │ │ │ │ │ └── StatisticDaoImpl.java │ │ │ │ ├── model │ │ │ │ │ └── Statistic.java │ │ │ │ └── service │ │ │ │ │ ├── IStatisticService.java │ │ │ │ │ └── StatisticServiceImpl.java │ │ │ ├── sync │ │ │ │ └── service │ │ │ │ │ ├── IArtifactVersionProviderService.java │ │ │ │ │ ├── IMavenSynchronizationService.java │ │ │ │ │ ├── MavenCentralSearchApiArtifactVersionProviderServiceImpl.java │ │ │ │ │ ├── MavenRepositoryArtifactVersionProviderServiceImpl.java │ │ │ │ │ ├── MavenSynchronizationServiceImpl.java │ │ │ │ │ └── TestArtifactVersionProviderServiceImpl.java │ │ │ ├── task │ │ │ │ └── model │ │ │ │ │ └── MavenArtifactNotifierTaskQueueId.java │ │ │ ├── upgrade │ │ │ │ └── service │ │ │ │ │ └── DataUpgradeServiceImpl.java │ │ │ └── user │ │ │ │ ├── dao │ │ │ │ ├── EmailAddressDaoImpl.java │ │ │ │ ├── IEmailAddressDao.java │ │ │ │ ├── IUserDao.java │ │ │ │ ├── IUserGroupDao.java │ │ │ │ ├── UserDaoImpl.java │ │ │ │ └── UserGroupDaoImpl.java │ │ │ │ ├── exception │ │ │ │ ├── AlreadyAddedEmailException.java │ │ │ │ └── AlreadyFollowedArtifactException.java │ │ │ │ ├── model │ │ │ │ ├── AuthenticationType.java │ │ │ │ ├── EmailAddress.java │ │ │ │ ├── EmailStatus.java │ │ │ │ ├── User.java │ │ │ │ └── UserGroup.java │ │ │ │ └── service │ │ │ │ ├── EmailAddressServiceImpl.java │ │ │ │ ├── IEmailAddressService.java │ │ │ │ ├── IUserGroupService.java │ │ │ │ ├── IUserService.java │ │ │ │ ├── UserGroupServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ │ ├── config │ │ │ ├── application │ │ │ │ └── MavenArtifactNotifierConfigurer.java │ │ │ └── spring │ │ │ │ ├── MavenArtifactNotifierCoreCommonConfig.java │ │ │ │ ├── MavenArtifactNotifierCoreCommonJpaConfig.java │ │ │ │ ├── MavenArtifactNotifierCoreNotificationConfig.java │ │ │ │ ├── MavenArtifactNotifierCorePropertyConfig.java │ │ │ │ ├── MavenArtifactNotifierCoreSchedulingConfig.java │ │ │ │ ├── MavenArtifactNotifierCoreSecurityConfig.java │ │ │ │ ├── MavenArtifactNotifierCoreSolrConfig.java │ │ │ │ └── MavenArtifactNotifierCoreTaskManagementConfig.java │ │ │ ├── property │ │ │ └── MavenArtifactNotifierCorePropertyIds.java │ │ │ ├── security │ │ │ └── service │ │ │ │ └── MavenArtifactNotifierPermissionEvaluator.java │ │ │ └── util │ │ │ ├── binding │ │ │ └── Binding.java │ │ │ ├── init │ │ │ └── service │ │ │ │ ├── IProjectImportDataService.java │ │ │ │ ├── ImportDataServiceImpl.java │ │ │ │ └── ProjectImportDataServiceImpl.java │ │ │ └── monitoring │ │ │ └── DatabaseConsistencyCheckServiceImpl.java │ └── resources │ │ ├── configuration.properties │ │ ├── ehcache │ │ ├── ehcache-hibernate.xml │ │ └── ehcache.xsd │ │ └── log4j.properties │ └── test │ ├── java │ └── fr │ │ └── openwide │ │ └── maven │ │ └── artifact │ │ └── notifier │ │ └── core │ │ └── test │ │ ├── AbstractMavenArtifactNotifierTestCase.java │ │ ├── business │ │ ├── TestArtifactService.java │ │ ├── TestMavenSynchronizationService.java │ │ ├── TestUserService.java │ │ └── version │ │ │ └── util │ │ │ └── TestMavenCentralComparableVersion.java │ │ ├── config │ │ └── spring │ │ │ └── MavenArtifactNotifierCoreTestCommonConfig.java │ │ └── service │ │ ├── CoreTestNotificationPanelRendererServiceImpl.java │ │ └── CoreTestNotificationUrlBuilderServiceImpl.java │ └── resources │ ├── configuration-test.properties │ └── notification │ └── artifact_version_notification.ftl ├── maven-artifact-notifier-init ├── pom.xml └── src │ └── main │ ├── java │ └── fr │ │ └── openwide │ │ └── maven │ │ └── artifact │ │ └── notifier │ │ └── init │ │ ├── MavenArtifactNotifierInitFromExcelMain.java │ │ ├── MavenArtifactNotifierInitFromExcelProduction.java │ │ ├── MavenArtifactNotifierInitPackage.java │ │ ├── config │ │ └── spring │ │ │ └── MavenArtifactNotifierInitConfig.java │ │ ├── service │ │ ├── InitNotificationContentDescriptorFactoryImpl.java │ │ ├── InitNotificationPanelRendererServiceImpl.java │ │ └── InitNotificationUrlBuilderServiceImpl.java │ │ └── util │ │ └── SpringContextWrapper.java │ └── resources │ ├── configuration-init.properties │ ├── init │ ├── development │ │ ├── business_data.xls │ │ └── reference_data.xls │ └── production │ │ ├── business_data.xls │ │ └── reference_data.xls │ └── update │ ├── 2013-07-22-pac4j.sql │ ├── 2013-08-08-project-licenses.sql │ ├── 2014-08-23-upgrade-to-0-9.sql │ ├── 2014-11-28-change-notification-machinery.sql │ └── 20150504-google-oauth2.sql ├── maven-artifact-notifier-webapp ├── bindgen.properties ├── pom.xml └── src │ └── main │ ├── java │ └── fr │ │ └── openwide │ │ └── maven │ │ └── artifact │ │ └── notifier │ │ └── web │ │ └── application │ │ ├── MavenArtifactNotifierApplication.java │ │ ├── MavenArtifactNotifierApplication.utf8.properties │ │ ├── MavenArtifactNotifierApplication_fr.utf8.properties │ │ ├── MavenArtifactNotifierSession.java │ │ ├── administration │ │ ├── component │ │ │ ├── AdministrationArtifactSearchPanel.html │ │ │ ├── AdministrationArtifactSearchPanel.java │ │ │ ├── AdministrationUserSearchPanel.html │ │ │ ├── AdministrationUserSearchPanel.java │ │ │ ├── ArtifactFollowersPanel.html │ │ │ ├── ArtifactFollowersPanel.java │ │ │ ├── ArtifactPortfolioPanel.html │ │ │ ├── ArtifactPortfolioPanel.java │ │ │ ├── EmailStatusIcon.java │ │ │ ├── UserArtifactsPanel.html │ │ │ ├── UserArtifactsPanel.java │ │ │ ├── UserGroupDescriptionPanel.html │ │ │ ├── UserGroupDescriptionPanel.java │ │ │ ├── UserGroupMembersPanel.html │ │ │ ├── UserGroupMembersPanel.java │ │ │ ├── UserGroupPortfolioPanel.html │ │ │ ├── UserGroupPortfolioPanel.java │ │ │ ├── UserMembershipsPanel.html │ │ │ ├── UserMembershipsPanel.java │ │ │ ├── UserPortfolioPanel.html │ │ │ ├── UserPortfolioPanel.java │ │ │ ├── UserProfilPanel.html │ │ │ └── UserProfilPanel.java │ │ ├── form │ │ │ ├── ChangePasswordPopupPanel.html │ │ │ ├── ChangePasswordPopupPanel.java │ │ │ ├── UserFormPopupPanel.html │ │ │ ├── UserFormPopupPanel.java │ │ │ ├── UserGroupFormPopupPanel.html │ │ │ └── UserGroupFormPopupPanel.java │ │ ├── model │ │ │ ├── ArtifactDataProvider.java │ │ │ └── UserDataProvider.java │ │ ├── page │ │ │ ├── AdministrationArtifactDescriptionPage.html │ │ │ ├── AdministrationArtifactDescriptionPage.java │ │ │ ├── AdministrationArtifactPortfolioPage.html │ │ │ ├── AdministrationArtifactPortfolioPage.java │ │ │ ├── AdministrationUserDescriptionPage.html │ │ │ ├── AdministrationUserDescriptionPage.java │ │ │ ├── AdministrationUserGroupDescriptionPage.html │ │ │ ├── AdministrationUserGroupDescriptionPage.java │ │ │ ├── AdministrationUserGroupPortfolioPage.html │ │ │ ├── AdministrationUserGroupPortfolioPage.java │ │ │ ├── AdministrationUserPortfolioPage.html │ │ │ └── AdministrationUserPortfolioPage.java │ │ └── template │ │ │ └── AdministrationTemplate.java │ │ ├── artifact │ │ ├── component │ │ │ ├── AbstractArtifactVersionTagPanel.java │ │ │ ├── ArtifactBeanDataView.java │ │ │ ├── ArtifactDeprecationStatusDropDownChoice.java │ │ │ ├── ArtifactDescriptionPanel.html │ │ │ ├── ArtifactDescriptionPanel.java │ │ │ ├── ArtifactDropDownChoice.java │ │ │ ├── ArtifactFollowActionsPanel.html │ │ │ ├── ArtifactFollowActionsPanel.java │ │ │ ├── ArtifactNotificationRuleTypeDropDownChoice.java │ │ │ ├── ArtifactPomSearchResultsPanel.html │ │ │ ├── ArtifactPomSearchResultsPanel.java │ │ │ ├── ArtifactProjectPanel.html │ │ │ ├── ArtifactProjectPanel.java │ │ │ ├── ArtifactPublicPanel.html │ │ │ ├── ArtifactPublicPanel.java │ │ │ ├── ArtifactSearchResultsPanel.html │ │ │ ├── ArtifactSearchResultsPanel.java │ │ │ ├── ArtifactSelect2AjaxAdapter.java │ │ │ ├── ArtifactVersionLinksPanel.html │ │ │ ├── ArtifactVersionLinksPanel.java │ │ │ ├── ArtifactVersionTagPanel.html │ │ │ ├── ArtifactVersionTagPanel.java │ │ │ ├── DeprecatedArtifactPanel.html │ │ │ ├── DeprecatedArtifactPanel.java │ │ │ ├── FollowedArtifactNotificationRulesDemoPanel.html │ │ │ ├── FollowedArtifactNotificationRulesDemoPanel.java │ │ │ ├── FollowedArtifactNotificationRulesPanel.html │ │ │ ├── FollowedArtifactNotificationRulesPanel.java │ │ │ ├── RecommendedArtifactPortfolioPanel.html │ │ │ └── RecommendedArtifactPortfolioPanel.java │ │ ├── form │ │ │ ├── ArtifactDeprecationFormPopupPanel.html │ │ │ ├── ArtifactDeprecationFormPopupPanel.java │ │ │ ├── ArtifactNotificationRuleFormPopupPanel.html │ │ │ ├── ArtifactNotificationRuleFormPopupPanel.java │ │ │ ├── ArtifactPomSearchPanel.html │ │ │ ├── ArtifactPomSearchPanel.java │ │ │ ├── ArtifactSearchPanel.html │ │ │ ├── ArtifactSearchPanel.java │ │ │ ├── ArtifactVersionFormPopupPanel.html │ │ │ └── ArtifactVersionFormPopupPanel.java │ │ ├── model │ │ │ ├── AbstractArtifactPomSearchDataProvider.java │ │ │ ├── ArtifactBeanDataProvider.java │ │ │ ├── ArtifactLastVersionModel.java │ │ │ ├── ArtifactModel.java │ │ │ └── RecommendedArtifactDataProvider.java │ │ └── page │ │ │ ├── ArtifactDescriptionPage.html │ │ │ ├── ArtifactDescriptionPage.java │ │ │ ├── ArtifactPomSearchPage.html │ │ │ ├── ArtifactPomSearchPage.java │ │ │ ├── ArtifactSearchPage.html │ │ │ └── ArtifactSearchPage.java │ │ ├── auth │ │ └── pac4j │ │ │ ├── filter │ │ │ └── Pac4jExceptionFilter.java │ │ │ ├── service │ │ │ ├── Pac4jAuthenticationFailureHandler.java │ │ │ ├── Pac4jAuthenticationServiceImpl.java │ │ │ ├── Pac4jAuthenticationSuccessHandler.java │ │ │ └── Pac4jUserDetailsService.java │ │ │ └── util │ │ │ └── Pac4jAuthenticationUtils.java │ │ ├── common │ │ ├── behavior │ │ │ └── AuthenticatedOnlyBehavior.java │ │ ├── component │ │ │ ├── AuthenticatedOnlyButton.java │ │ │ ├── DateLabelWithPlaceholder.java │ │ │ ├── FooterPanel.html │ │ │ ├── FooterPanel.java │ │ │ ├── GenericSelect2DropDownMultipleChoice.java │ │ │ ├── IdentificationPopoverPanel.html │ │ │ ├── IdentificationPopoverPanel.java │ │ │ ├── LabelWithPlaceholder.java │ │ │ ├── LocaleDropDownChoice.java │ │ │ ├── ResponsiveIdentificationPanel.html │ │ │ ├── ResponsiveIdentificationPanel.java │ │ │ ├── StatisticsPanel.html │ │ │ ├── StatisticsPanel.java │ │ │ ├── StatisticsPanel2.html │ │ │ ├── StatisticsPanel2.java │ │ │ ├── UserAutocompleteAjaxComponent.java │ │ │ ├── UserGroupAutocompleteAjaxComponent.java │ │ │ └── navigation │ │ │ │ ├── DynamicBookmarkablePageLink.java │ │ │ │ ├── DynamicPageParameters.java │ │ │ │ ├── HideableBookmarkablePagingNavigator.java │ │ │ │ └── MavenArtifactNotifierBodyBreadCrumbPanel.java │ │ ├── converter │ │ │ └── LongIdEntityConverter.java │ │ ├── model │ │ │ ├── EitherModel.java │ │ │ ├── FollowingStats.java │ │ │ └── FollowingStatsModel.java │ │ └── template │ │ │ ├── MainTemplate.html │ │ │ ├── MainTemplate.java │ │ │ ├── icons │ │ │ ├── favicon.ico │ │ │ ├── github-icon.png │ │ │ ├── google-icon.png │ │ │ ├── smile-logo.svg │ │ │ └── twitter-icon.png │ │ │ ├── images │ │ │ └── screenshot-dashboard.png │ │ │ └── styles │ │ │ ├── StylesLessCssResourceReference.java │ │ │ ├── administration.less │ │ │ ├── artifact-search.less │ │ │ ├── base.less │ │ │ ├── common.less │ │ │ ├── content-text.less │ │ │ ├── dashboard.less │ │ │ ├── description.less │ │ │ ├── footer.less │ │ │ ├── forms.less │ │ │ ├── home.less │ │ │ ├── modals.less │ │ │ ├── nav.less │ │ │ ├── styles.less │ │ │ └── variables.less │ │ ├── config │ │ └── spring │ │ │ ├── MavenArtifactNotifierWebappCacheConfig.java │ │ │ ├── MavenArtifactNotifierWebappConfig.java │ │ │ └── MavenArtifactNotifierWebappSecurityConfig.java │ │ ├── console │ │ ├── importation │ │ │ ├── page │ │ │ │ ├── ConsoleImportProjectPage.html │ │ │ │ ├── ConsoleImportProjectPage.java │ │ │ │ └── resource │ │ │ │ │ ├── ProjectImportModelResourceReference.java │ │ │ │ │ └── project-import-model.xls │ │ │ └── template │ │ │ │ └── ConsoleImportTemplate.java │ │ └── notification │ │ │ ├── page │ │ │ ├── ConfirmEmailHtmlNotificationDemoPage.html │ │ │ ├── ConfirmEmailHtmlNotificationDemoPage.java │ │ │ ├── ConfirmRegistrationHtmlNotificationDemoPage.html │ │ │ ├── ConfirmRegistrationHtmlNotificationDemoPage.java │ │ │ ├── ConsoleNotificationIndexPage.html │ │ │ ├── ConsoleNotificationIndexPage.java │ │ │ ├── DeleteEmailHtmlNotificationDemoPage.html │ │ │ ├── DeleteEmailHtmlNotificationDemoPage.java │ │ │ ├── NewVersionsAdditionalEmailHtmlNotificationDemoPage.html │ │ │ ├── NewVersionsAdditionalEmailHtmlNotificationDemoPage.java │ │ │ ├── NewVersionsHtmlNotificationDemoPage.html │ │ │ ├── NewVersionsHtmlNotificationDemoPage.java │ │ │ ├── ResetPasswordHtmlNotificationDemoPage.html │ │ │ └── ResetPasswordHtmlNotificationDemoPage.java │ │ │ └── template │ │ │ ├── ConsoleNotificationTemplate.java │ │ │ ├── NotificationRendererTemplate.html │ │ │ └── NotificationRendererTemplate.java │ │ ├── navigation │ │ ├── component │ │ │ ├── DashboardArtifactPortfolioPanel.html │ │ │ ├── DashboardArtifactPortfolioPanel.java │ │ │ ├── DashboardNotificationListViewPanel.html │ │ │ ├── DashboardNotificationListViewPanel.java │ │ │ ├── UserNotificationManagementPanel.html │ │ │ └── UserNotificationManagementPanel.java │ │ ├── form │ │ │ ├── PasswordPatternValidator.java │ │ │ ├── RegisterFormPanel.html │ │ │ └── RegisterFormPanel.java │ │ ├── link │ │ │ ├── LinkFactory.java │ │ │ ├── convert │ │ │ │ └── converters │ │ │ │ │ ├── ArtifactKeyToArtifactSpringConverter.java │ │ │ │ │ ├── ArtifactToStringSpringConverter.java │ │ │ │ │ ├── ProjectToStringSpringConverter.java │ │ │ │ │ └── StringToProjectSpringConverter.java │ │ │ ├── parameter │ │ │ │ └── mapping │ │ │ │ │ └── ArtifactLinkParameterMappingEntry.java │ │ │ └── service │ │ │ │ └── MavenArtifactNotifierLinkParameterConversionService.java │ │ ├── model │ │ │ ├── ArtifactVersionLastUpdateDateModel.java │ │ │ ├── ExternalLinks.java │ │ │ └── NotificationsModel.java │ │ ├── page │ │ │ ├── AboutPage.html │ │ │ ├── AboutPage.java │ │ │ ├── AbstractLoginSuccessPage.java │ │ │ ├── AccessDeniedPage.java │ │ │ ├── DashboardPage.html │ │ │ ├── DashboardPage.java │ │ │ ├── ForgottenPasswordPage.html │ │ │ ├── ForgottenPasswordPage.java │ │ │ ├── HomePage.html │ │ │ ├── HomePage.java │ │ │ ├── LoginSuccessPage.java │ │ │ ├── Pac4jLoginSuccessPage.java │ │ │ ├── RegisterPage.html │ │ │ ├── RegisterPage.java │ │ │ ├── ViewProfilePage.html │ │ │ └── ViewProfilePage.java │ │ └── util │ │ │ └── LinkUtils.java │ │ ├── notification │ │ ├── behavior │ │ │ └── StyleAttributeAppender.java │ │ ├── component │ │ │ ├── AbstractHtmlNotificationPanel.html │ │ │ ├── AbstractHtmlNotificationPanel.java │ │ │ ├── AbstractRegisteredEmailHtmlNotificationPanel.html │ │ │ ├── AbstractRegisteredEmailHtmlNotificationPanel.java │ │ │ ├── ConfirmEmailHtmlNotificationPanel.html │ │ │ ├── ConfirmEmailHtmlNotificationPanel.java │ │ │ ├── ConfirmRegistrationHtmlNotificationPanel.html │ │ │ ├── ConfirmRegistrationHtmlNotificationPanel.java │ │ │ ├── CustomArtifactVersionTagPanel.html │ │ │ ├── CustomArtifactVersionTagPanel.java │ │ │ ├── CustomLabel.java │ │ │ ├── CustomWebMarkupContainer.java │ │ │ ├── DeleteEmailHtmlNotificationPanel.html │ │ │ ├── DeleteEmailHtmlNotificationPanel.java │ │ │ ├── NewVersionsHtmlNotificationPanel.html │ │ │ ├── NewVersionsHtmlNotificationPanel.java │ │ │ ├── ResetPasswordHtmlNotificationPanel.html │ │ │ └── ResetPasswordHtmlNotificationPanel.java │ │ ├── page │ │ │ ├── ConfirmEmailNotificationPage.html │ │ │ ├── ConfirmEmailNotificationPage.java │ │ │ ├── ConfirmRegistrationNotificationPage.html │ │ │ ├── ConfirmRegistrationNotificationPage.java │ │ │ ├── DeleteEmailNotificationPage.html │ │ │ ├── DeleteEmailNotificationPage.java │ │ │ ├── ResetPasswordNotificationPage.html │ │ │ └── ResetPasswordNotificationPage.java │ │ └── service │ │ │ ├── WebappNotificationPanelRendererServiceImpl.java │ │ │ └── WebappNotificationUrlBuilderServiceImpl.java │ │ ├── project │ │ ├── component │ │ │ ├── ItemAdditionalInformationPanel.html │ │ │ ├── ItemAdditionalInformationPanel.java │ │ │ ├── ProjectArtifactsPanel.html │ │ │ ├── ProjectArtifactsPanel.java │ │ │ ├── ProjectDescriptionPanel.html │ │ │ ├── ProjectDescriptionPanel.java │ │ │ ├── ProjectDropDownChoice.java │ │ │ ├── ProjectLicenseDropDownChoice.java │ │ │ ├── ProjectLinksPanel.html │ │ │ ├── ProjectLinksPanel.java │ │ │ ├── ProjectPortfolioPanel.html │ │ │ ├── ProjectPortfolioPanel.java │ │ │ ├── ProjectSearchPanel.html │ │ │ ├── ProjectSearchPanel.java │ │ │ └── ProjectSelect2AjaxAdapter.java │ │ ├── form │ │ │ ├── ProjectFormPopupPanel.html │ │ │ ├── ProjectFormPopupPanel.java │ │ │ ├── ProjectVersionFormPopupPanel.html │ │ │ ├── ProjectVersionFormPopupPanel.java │ │ │ ├── VersionAdditionalInformationFormComponentPanel.html │ │ │ └── VersionAdditionalInformationFormComponentPanel.java │ │ ├── model │ │ │ └── ProjectDataProvider.java │ │ └── page │ │ │ ├── ProjectDescriptionPage.html │ │ │ ├── ProjectDescriptionPage.java │ │ │ ├── ProjectListPage.html │ │ │ └── ProjectListPage.java │ │ └── url │ │ └── model │ │ └── ExternalLinkWrapperWrapModel.java │ ├── resources │ ├── ehcache │ │ └── ehcache-cache-web.xml │ ├── notification │ │ ├── artifact_version_notification.ftl │ │ ├── artifact_version_notification_fr.ftl │ │ ├── confirm_email_notification.ftl │ │ ├── confirm_email_notification_fr.ftl │ │ ├── confirm_registration_notification.ftl │ │ ├── confirm_registration_notification_fr.ftl │ │ ├── delete_email_notification.ftl │ │ ├── delete_email_notification_fr.ftl │ │ ├── reset_password_notification.ftl │ │ └── reset_password_notification_fr.ftl │ └── spring │ │ ├── cache-web-context.xml │ │ └── security-web-context.xml │ └── webapp │ └── WEB-INF │ └── web.xml ├── pom.xml └── travis └── postgresql.sql /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | charset = utf-8 11 | indent_style = tab 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .project 3 | .factorypath 4 | .settings/ 5 | target/ 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - openjdk8 4 | addons: 5 | postgresql: "9.4" 6 | apt: 7 | packages: 8 | - postfix 9 | cache: 10 | directories: 11 | - $HOME/.m2 12 | install: 13 | - mvn -v 14 | - mvn -U -B -q -Ptravis clean install -DskipTests=true 15 | before_script: 16 | - psql -U postgres -f travis/postgresql.sql 17 | script: mvn -U -Ptravis clean package 18 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | @ Smile 2 | 3 | - Stéphane Gleizes 4 | - Renaud Joly 5 | - Maxime Robert 6 | - Guillaume Smet 7 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:9.5 2 | 3 | COPY init_db.sh /docker-entrypoint-initdb.d 4 | COPY postgresql.sql /tmp -------------------------------------------------------------------------------- /docker/configuration-docker.properties: -------------------------------------------------------------------------------- 1 | version=docker 2 | 3 | ## 4 | ## configurationType : development/deployment 5 | ## 6 | configurationType=development 7 | 8 | db.jdbcUrl=jdbc:postgresql://maven-artifact-notifier-postgres:5432/maven_artifact_notifier?housekeeper.enabled=false 9 | db.user=maven_artifact_notifier 10 | db.password=maven_artifact_notifier 11 | 12 | ## 13 | ## Authentication 14 | ## 15 | authentication.callback.baseUrl=https://www.artifact-listener.org/ 16 | 17 | authentication.twitter.key=CoxUiYwQOSFDReZYdjigBA 18 | authentication.twitter.secret=2kAzunH5Btc4gRSaMr7D7MkyoJ5u1VzbOOzE8rBofs 19 | 20 | authentication.gitHub.key=06cf63ee4d5ba45dc8f0 21 | authentication.gitHub.secret=b15869fadbeb7c9f3efc303dc9f96f70045e20ab 22 | 23 | authentication.google.key=749821899692-drkq3u61ngq7rkmtpke0k24teh2o1vn3.apps.googleusercontent.com 24 | authentication.google.secret=AZfMyxWyzGQMDtz3fQ_ckq-m 25 | -------------------------------------------------------------------------------- /docker/init_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run initialization SQL 4 | psql -U postgres --file /tmp/postgresql.sql -------------------------------------------------------------------------------- /docker/log4j-docker.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/docker/log4j-docker.properties -------------------------------------------------------------------------------- /docker/postgres-start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Check to see if the Postgres container already exists 4 | cid=$(docker ps --all --quiet --filter "name=maven-artifact-notifier-postgres") 5 | 6 | if [ -n "$cid" ]; then 7 | echo "Starting existing docker container $cid" 8 | docker start $cid 9 | else 10 | # Build a docker image 11 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 12 | docker build --tag artifact-listener-postgres $DIR 13 | 14 | # Run an instance of Postgres with settings matching maven-artifact-notifier-core's development.properties 15 | echo "Running Postgres docker container, stop with 'docker-stop-postgres.sh'" 16 | docker run \ 17 | --name maven-artifact-notifier-postgres \ 18 | --env POSTGRES_USER=maven_artifact_notifier \ 19 | --env POSTGRES_PASSWORD=maven_artifact_notifier \ 20 | --env POSTGRES_DB=maven_artifact_notifier \ 21 | --publish 5432:5432 \ 22 | --detach \ 23 | artifact-listener-postgres 24 | fi 25 | 26 | echo "To tail Postgres logs, run 'docker logs --follow maven-artifact-notifier-postgres'" 27 | -------------------------------------------------------------------------------- /docker/postgres-stop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker stop maven-artifact-notifier-postgres 4 | -------------------------------------------------------------------------------- /docker/postgresql.sql: -------------------------------------------------------------------------------- 1 | CREATE USER maven_artifact_notifier WITH PASSWORD 'maven_artifact_notifier'; 2 | CREATE DATABASE maven_artifact_notifier WITH OWNER maven_artifact_notifier; 3 | 4 | CREATE USER maven_artifact_notifier_test WITH PASSWORD 'maven_artifact_notifier_test'; 5 | CREATE DATABASE maven_artifact_notifier_test WITH OWNER maven_artifact_notifier_test; 6 | -------------------------------------------------------------------------------- /docker/tomcat-start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Check to see if the Postgres container already exists 4 | cid=$(docker ps --all --quiet --filter "name=maven-artifact-notifier-tomcat") 5 | 6 | if [ -n "$cid" ]; then 7 | echo "Starting existing docker container $cid" 8 | docker start $cid 9 | else 10 | # Run an instance of Tomcat, mounting the WAR file to be deployed 11 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 12 | echo "Running Tomcat in a docker container, stop with 'docker-stop-tomcat.sh'" 13 | docker run \ 14 | --name maven-artifact-notifier-tomcat \ 15 | --detach \ 16 | -e JPDA_ADDRESS=8000 \ 17 | -e JPDA_TRANSPORT=dt_socket \ 18 | --publish 8080:8080 \ 19 | --publish 8000:8000 \ 20 | --link maven-artifact-notifier-postgres \ 21 | --volume $DIR/../maven-artifact-notifier-webapp/target/maven-artifact-notifier.war:/usr/local/tomcat/webapps/ROOT.war \ 22 | --volume $DIR/configuration-docker.properties:/etc/maven-artifact-notifier/configuration.properties \ 23 | --volume $DIR/log4j-docker.properties:/etc/maven-artifact-notifier/log4j.properties \ 24 | tomcat:7 \ 25 | /usr/local/tomcat/bin/catalina.sh jpda run 26 | fi 27 | 28 | echo "To tail Tomcat logs, run 'docker logs --follow maven-artifact-notifier-tomcat'" 29 | -------------------------------------------------------------------------------- /docker/tomcat-stop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker stop maven-artifact-notifier-tomcat 4 | -------------------------------------------------------------------------------- /eclipse/processor core.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /eclipse/yuicompressor.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/bindgen.properties: -------------------------------------------------------------------------------- 1 | scope=fr.openwide.maven.artifact.notifier.core,fr.openwide.core,java.util,java.lang 2 | skipBindKeyword=true -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/MavenArtifactNotifierCorePackage.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core; 2 | 3 | public final class MavenArtifactNotifierCorePackage { // NOSONAR 4 | 5 | private MavenArtifactNotifierCorePackage() { 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/MavenArtifactNotifierCoreCommonBusinessPackage.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business; 2 | 3 | public final class MavenArtifactNotifierCoreCommonBusinessPackage { // NOSONAR 4 | 5 | private MavenArtifactNotifierCoreCommonBusinessPackage() { 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/ArtifactGroupDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | import fr.openwide.core.jpa.business.generic.dao.GenericEntityDaoImpl; 6 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactGroup; 7 | 8 | @Repository("artifactGroupDao") 9 | public class ArtifactGroupDaoImpl extends GenericEntityDaoImpl implements IArtifactGroupDao { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/ArtifactNotificationRuleDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | import com.querydsl.jpa.impl.JPAQuery; 6 | 7 | import fr.openwide.core.jpa.business.generic.dao.GenericEntityDaoImpl; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactNotificationRule; 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.FollowedArtifact; 10 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.QArtifactNotificationRule; 11 | 12 | @Repository("artifactNotificationRuleDao") 13 | public class ArtifactNotificationRuleDaoImpl extends GenericEntityDaoImpl implements IArtifactNotificationRuleDao { 14 | 15 | private static final QArtifactNotificationRule qArtifactNotificationRule = QArtifactNotificationRule.artifactNotificationRule; 16 | 17 | @Override 18 | public ArtifactNotificationRule getByFollowedArtifactAndRegex(FollowedArtifact followedArtifact, String regex) { 19 | JPAQuery query = new JPAQuery<>(getEntityManager()); 20 | 21 | query 22 | .select(qArtifactNotificationRule) 23 | .from(qArtifactNotificationRule) 24 | .where(qArtifactNotificationRule.followedArtifact.eq(followedArtifact)) 25 | .where(qArtifactNotificationRule.regex.eq(regex)); 26 | 27 | return query.fetchOne(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/FollowedArtifactDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Repository; 6 | 7 | import com.querydsl.jpa.impl.JPAQuery; 8 | 9 | import fr.openwide.core.jpa.business.generic.dao.GenericEntityDaoImpl; 10 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 11 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.FollowedArtifact; 12 | import fr.openwide.maven.artifact.notifier.core.business.user.model.QUser; 13 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 14 | 15 | @Repository("followedArtifactDao") 16 | public class FollowedArtifactDaoImpl extends GenericEntityDaoImpl implements IFollowedArtifactDao { 17 | 18 | private static final QUser qUser = QUser.user; 19 | 20 | @Override 21 | public List listFollowers(Artifact artifact) { 22 | JPAQuery query = new JPAQuery<>(getEntityManager()); 23 | 24 | query 25 | .select(qUser) 26 | .from(qUser) 27 | .where(qUser.followedArtifacts.any().artifact.eq(artifact)); 28 | 29 | return query.fetch(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/IArtifactGroupDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 4 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactGroup; 5 | 6 | public interface IArtifactGroupDao extends IGenericEntityDao { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/IArtifactNotificationRuleDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 4 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactNotificationRule; 5 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.FollowedArtifact; 6 | 7 | public interface IArtifactNotificationRuleDao extends IGenericEntityDao { 8 | 9 | ArtifactNotificationRule getByFollowedArtifactAndRegex(FollowedArtifact followedArtifact, String regex); 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/IArtifactVersionDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 6 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersion; 8 | 9 | public interface IArtifactVersionDao extends IGenericEntityDao { 10 | 11 | ArtifactVersion getByArtifactAndVersion(Artifact artifact, String version); 12 | 13 | List listRecentReleases(int limit); 14 | } 15 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/IArtifactVersionNotificationDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersionNotification; 9 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 10 | 11 | public interface IArtifactVersionNotificationDao extends IGenericEntityDao { 12 | 13 | List listByArtifact(Artifact artifact); 14 | 15 | Map> listNotificationsToSend(); 16 | } 17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/dao/IFollowedArtifactDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.dao; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 6 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.FollowedArtifact; 8 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 9 | 10 | public interface IFollowedArtifactDao extends IGenericEntityDao { 11 | 12 | List listFollowers(Artifact artifact); 13 | } 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/model/ArtifactDeprecationStatus.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.model; 2 | 3 | public enum ArtifactDeprecationStatus { 4 | 5 | NORMAL, 6 | 7 | DEPRECATED 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/model/ArtifactNotificationRuleType.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.model; 2 | 3 | public enum ArtifactNotificationRuleType { 4 | 5 | COMPLY, 6 | 7 | IGNORE 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/model/ArtifactStatus.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.model; 2 | 3 | public enum ArtifactStatus { 4 | 5 | NOT_INITIALIZED, 6 | 7 | INITIALIZED 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/model/ArtifactVersionNotificationStatus.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.model; 2 | 3 | public enum ArtifactVersionNotificationStatus { 4 | 5 | PENDING, 6 | SENT 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/model/IArtifact.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.model; 2 | 3 | public interface IArtifact { 4 | 5 | ArtifactKey getArtifactKey(); 6 | } 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/model/IComparableVersion.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.model; 2 | 3 | import java.util.Date; 4 | 5 | public interface IComparableVersion { 6 | 7 | String getVersion(); 8 | 9 | Date getLastUpdateDate(); 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/service/ArtifactGroupServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.service; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import fr.openwide.core.jpa.business.generic.service.GenericEntityServiceImpl; 7 | import fr.openwide.core.jpa.exception.SecurityServiceException; 8 | import fr.openwide.core.jpa.exception.ServiceException; 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.dao.IArtifactGroupDao; 10 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactGroup; 11 | 12 | @Service("artifactGroupService") 13 | public class ArtifactGroupServiceImpl extends GenericEntityServiceImpl implements IArtifactGroupService { 14 | 15 | @Autowired 16 | public ArtifactGroupServiceImpl(IArtifactGroupDao artifactGroupDao) { 17 | super(artifactGroupDao); 18 | } 19 | 20 | @Override 21 | public ArtifactGroup getOrCreate(String groupId) throws ServiceException, SecurityServiceException { 22 | ArtifactGroup artifactGroup = getByGroupId(groupId); 23 | if (artifactGroup == null) { 24 | artifactGroup = new ArtifactGroup(groupId); 25 | create(artifactGroup); 26 | } 27 | 28 | return artifactGroup; 29 | } 30 | 31 | @Override 32 | public ArtifactGroup getByGroupId(String groupId) { 33 | return getByNaturalId(groupId); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/service/IArtifactGroupService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.service; 2 | 3 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 4 | import fr.openwide.core.jpa.exception.SecurityServiceException; 5 | import fr.openwide.core.jpa.exception.ServiceException; 6 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactGroup; 7 | 8 | public interface IArtifactGroupService extends IGenericEntityService { 9 | 10 | ArtifactGroup getOrCreate(String groupId) throws ServiceException, SecurityServiceException; 11 | 12 | ArtifactGroup getByGroupId(String groupId); 13 | } 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/service/IArtifactNotificationRuleService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 6 | import fr.openwide.core.jpa.exception.SecurityServiceException; 7 | import fr.openwide.core.jpa.exception.ServiceException; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactNotificationRule; 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactNotificationRuleType; 10 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.FollowedArtifact; 11 | 12 | public interface IArtifactNotificationRuleService extends IGenericEntityService { 13 | 14 | ArtifactNotificationRule getByFollowedArtifactAndRegex(FollowedArtifact followedArtifact, String regex); 15 | 16 | boolean isRuleValid(String regex); 17 | 18 | void changeRuleType(ArtifactNotificationRule rule, ArtifactNotificationRuleType type) throws ServiceException, 19 | SecurityServiceException; 20 | 21 | boolean checkRulesForVersion(String version, List rules); 22 | } 23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/service/IArtifactVersionNotificationService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersionNotification; 9 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 10 | 11 | public interface IArtifactVersionNotificationService extends IGenericEntityService { 12 | 13 | List listByArtifact(Artifact artifact); 14 | 15 | Map> listNotificationsToSend(); 16 | } 17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/service/IArtifactVersionService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 6 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersion; 8 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion; 9 | 10 | public interface IArtifactVersionService extends IGenericEntityService { 11 | 12 | List listByArtifact(Artifact artifact); 13 | 14 | List listByProjectVersion(ProjectVersion projectVersion); 15 | 16 | ArtifactVersion getByArtifactAndVersion(Artifact artifact, String version); 17 | 18 | List listRecentReleases(int limit); 19 | } 20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/service/IBatchArtifactService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.service; 2 | 3 | import fr.openwide.core.jpa.business.generic.service.ITransactionalAspectAwareService; 4 | import fr.openwide.core.jpa.exception.SecurityServiceException; 5 | import fr.openwide.core.jpa.exception.ServiceException; 6 | import org.apache.commons.lang3.mutable.MutableInt; 7 | 8 | public interface IBatchArtifactService extends ITransactionalAspectAwareService { 9 | void synchronizeArtifact(Long artifactId, MutableInt versionsReleasedCount) throws ServiceException, SecurityServiceException; 10 | 11 | void notifyUsers() throws ServiceException, SecurityServiceException; 12 | } 13 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/util/ArtifactVersionLastUpdateDateComparator.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.util; 2 | 3 | import java.util.Date; 4 | 5 | import com.google.common.collect.Ordering; 6 | 7 | import fr.openwide.core.commons.util.ordering.AbstractNullSafeComparator; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersion; 9 | 10 | public class ArtifactVersionLastUpdateDateComparator extends AbstractNullSafeComparator { 11 | 12 | private static final long serialVersionUID = -7679829686548651732L; 13 | 14 | private static final ArtifactVersionLastUpdateDateComparator INSTANCE = new ArtifactVersionLastUpdateDateComparator(); 15 | 16 | private static final Ordering ORDERING = Ordering.natural().nullsFirst(); 17 | 18 | @Override 19 | protected int compareNotNullObjects(ArtifactVersion left, ArtifactVersion right) { 20 | return ORDERING.compare(left.getLastUpdateDate(), right.getLastUpdateDate()); 21 | } 22 | 23 | public static ArtifactVersionLastUpdateDateComparator get() { 24 | return INSTANCE; 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/artifact/util/MavenCentralVersionComparator.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.artifact.util; 2 | 3 | import java.io.Serializable; 4 | import java.util.Collections; 5 | import java.util.Comparator; 6 | 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.IComparableVersion; 8 | 9 | public class MavenCentralVersionComparator implements Comparator, Serializable { 10 | 11 | private static final long serialVersionUID = -6062668831010678541L; 12 | 13 | private static final MavenCentralVersionComparator INSTANCE = new MavenCentralVersionComparator(); 14 | 15 | private static final Comparator REVERSE_ORDER_INSTANCE = Collections.reverseOrder(INSTANCE); 16 | 17 | @Override 18 | public int compare(IComparableVersion v1, IComparableVersion v2) { 19 | int order = 0; 20 | 21 | if (v1 == null && v2 == null) { 22 | order = 0; 23 | } else if (v1 == null) { 24 | order = 1; 25 | } else if (v2 == null) { 26 | order = -1; 27 | } else { 28 | MavenCentralComparableVersion cv1 = new MavenCentralComparableVersion(v1); 29 | MavenCentralComparableVersion cv2 = new MavenCentralComparableVersion(v2); 30 | order = cv1.compareTo(cv2); 31 | } 32 | 33 | return order; 34 | } 35 | 36 | public static MavenCentralVersionComparator get() { 37 | return INSTANCE; 38 | } 39 | 40 | public static Comparator reverse() { 41 | return REVERSE_ORDER_INSTANCE; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/audit/service/IAuditService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.audit.service; 2 | 3 | import fr.openwide.maven.artifact.notifier.core.business.audit.model.AuditSummary; 4 | 5 | public interface IAuditService { 6 | 7 | void refreshAuditSummaryForCreate(AuditSummary auditSummary); 8 | 9 | void refreshAuditSummaryForUpdate(AuditSummary auditSummary); 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/authority/MavenArtifactNotifierAuthorityUtils.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.authority; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | import com.google.common.collect.ImmutableList; 10 | 11 | import fr.openwide.core.jpa.security.business.authority.model.Authority; 12 | import fr.openwide.core.jpa.security.business.authority.service.IAuthorityService; 13 | import fr.openwide.core.jpa.security.business.authority.util.CoreAuthorityConstants; 14 | 15 | @Component("basicApplicationAuthorityUtils") 16 | public class MavenArtifactNotifierAuthorityUtils { 17 | 18 | public static final List PUBLIC_AUTHORITIES = ImmutableList.of( 19 | CoreAuthorityConstants.ROLE_AUTHENTICATED, 20 | CoreAuthorityConstants.ROLE_ADMIN); 21 | 22 | @Autowired 23 | private IAuthorityService authorityService; 24 | 25 | public List getPublicAuthorities() { 26 | List publicAuthorities = new ArrayList(); 27 | 28 | for (String authorityName : PUBLIC_AUTHORITIES) { 29 | Authority authority = authorityService.getByName(authorityName); 30 | if (authority != null) { 31 | publicAuthorities.add(authority); 32 | } 33 | } 34 | 35 | return publicAuthorities; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/notification/service/EmptyNotificationPanelRendererServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.notification.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersionNotification; 6 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 7 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 8 | 9 | /** 10 | * Implémentation bouche-trou, uniquement pour combler la dépendance. 11 | */ 12 | public class EmptyNotificationPanelRendererServiceImpl implements INotificationPanelRendererService { 13 | 14 | @Override 15 | public String renderConfirmRegistrationNotificationPanel(User user) { 16 | return ""; 17 | } 18 | 19 | @Override 20 | public String renderResetPasswordNotificationPanel(User user) { 21 | return ""; 22 | } 23 | 24 | @Override 25 | public String renderNewVersionNotificationPanel(List notifications, User user) { 26 | return ""; 27 | } 28 | 29 | @Override 30 | public String renderNewVersionNotificationPanel(List notifications, 31 | EmailAddress emailAddress) { 32 | return ""; 33 | } 34 | 35 | @Override 36 | public String renderConfirmEmailNotificationPanel(EmailAddress emailAddress) { 37 | return ""; 38 | } 39 | 40 | @Override 41 | public String renderDeleteEmailNotificationPanel(EmailAddress emailAddress) { 42 | return ""; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/notification/service/EmptyNotificationUrlBuilderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.notification.service; 2 | 3 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 4 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 5 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 6 | 7 | /** 8 | * Implémentation bouche-trou, uniquement pour combler la dépendance. 9 | */ 10 | public class EmptyNotificationUrlBuilderServiceImpl implements INotificationUrlBuilderService { 11 | 12 | @Override 13 | public String getHomeUrl() { 14 | return ""; 15 | } 16 | 17 | @Override 18 | public String getAboutUrl() { 19 | return ""; 20 | } 21 | 22 | @Override 23 | public String getGitHubUrl() { 24 | return ""; 25 | } 26 | 27 | @Override 28 | public String getProfileUrl() { 29 | return ""; 30 | } 31 | 32 | @Override 33 | public String getConfirmRegistrationUrl(User user) { 34 | return ""; 35 | } 36 | 37 | @Override 38 | public String getResetPasswordUrl(User user) { 39 | return ""; 40 | } 41 | 42 | @Override 43 | public String getConfirmEmailUrl(EmailAddress emailAddress) { 44 | return ""; 45 | } 46 | 47 | @Override 48 | public String getDeleteEmailUrl(EmailAddress emailAddress) { 49 | return ""; 50 | } 51 | 52 | @Override 53 | public String getArtifactDescriptionUrl(Artifact artifact) { 54 | return ""; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/notification/service/IArtifactNotifierNotificationContentDescriptorFactory.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.notification.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.spring.notification.model.INotificationContentDescriptor; 6 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersionNotification; 7 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 8 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 9 | 10 | public interface IArtifactNotifierNotificationContentDescriptorFactory { 11 | 12 | TDescriptor renderDeleteEmailNotificationPanel(EmailAddress emailAddress); 13 | 14 | TDescriptor renderConfirmEmailNotificationPanel(EmailAddress emailAddress); 15 | 16 | TDescriptor renderNewVersionNotificationPanel(List notifications, EmailAddress emailAddress); 17 | 18 | TDescriptor renderNewVersionNotificationPanel(List notifications, User user); 19 | 20 | TDescriptor renderResetPasswordNotificationPanel(User user); 21 | 22 | TDescriptor renderConfirmRegistrationNotificationPanel(User user); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/notification/service/INotificationPanelRendererService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.notification.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersionNotification; 6 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 7 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 8 | 9 | public interface INotificationPanelRendererService { 10 | 11 | String renderConfirmRegistrationNotificationPanel(User user); 12 | 13 | String renderResetPasswordNotificationPanel(User user); 14 | 15 | String renderNewVersionNotificationPanel(List notifications, User user); 16 | 17 | String renderNewVersionNotificationPanel(List notifications, EmailAddress emailAddress); 18 | 19 | String renderConfirmEmailNotificationPanel(EmailAddress emailAddress); 20 | 21 | String renderDeleteEmailNotificationPanel(EmailAddress emailAddress); 22 | } 23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/notification/service/INotificationService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.notification.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.exception.ServiceException; 6 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersionNotification; 7 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 8 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 9 | 10 | public interface INotificationService { 11 | 12 | void sendConfirmRegistrationNotification(User user) throws ServiceException; 13 | 14 | void sendResetPasswordNotification(User user) throws ServiceException; 15 | 16 | void sendNewVersionNotification(List notification, User user) throws ServiceException; 17 | 18 | void sendConfirmEmailNotification(EmailAddress emailAddress) throws ServiceException; 19 | 20 | void sendDeleteEmailNotification(EmailAddress emailAddress) throws ServiceException; 21 | } 22 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/notification/service/INotificationUrlBuilderService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.notification.service; 2 | 3 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 4 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 5 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 6 | 7 | 8 | public interface INotificationUrlBuilderService { 9 | 10 | String getHomeUrl(); 11 | 12 | String getAboutUrl(); 13 | 14 | String getGitHubUrl(); 15 | 16 | String getProfileUrl(); 17 | 18 | String getConfirmRegistrationUrl(User user); 19 | 20 | String getResetPasswordUrl(User user); 21 | 22 | String getConfirmEmailUrl(EmailAddress emailAddress); 23 | 24 | String getDeleteEmailUrl(EmailAddress emailAddress); 25 | 26 | String getArtifactDescriptionUrl(Artifact artifact); 27 | } 28 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/dao/IProjectDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.dao; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 6 | import fr.openwide.core.jpa.exception.ServiceException; 7 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 8 | 9 | public interface IProjectDao extends IGenericEntityDao { 10 | 11 | List searchAutocomplete(String searchPattern, Integer limit, Integer offset) throws ServiceException; 12 | 13 | List searchByName(String searchTerm, Integer limit, Integer offset); 14 | 15 | int countSearchByName(String searchTerm); 16 | } 17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/dao/IProjectLicenseDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.dao; 2 | 3 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 4 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectLicense; 5 | 6 | public interface IProjectLicenseDao extends IGenericEntityDao { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/dao/IProjectVersionDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.dao; 2 | 3 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 4 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 5 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion; 6 | 7 | public interface IProjectVersionDao extends IGenericEntityDao { 8 | 9 | ProjectVersion getByProjectAndVersion(Project project, String version); 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/dao/ProjectLicenseDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | import fr.openwide.core.jpa.business.generic.dao.GenericEntityDaoImpl; 6 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectLicense; 7 | 8 | @Repository("projectLicenseDao") 9 | public class ProjectLicenseDaoImpl extends GenericEntityDaoImpl implements IProjectLicenseDao { 10 | 11 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/dao/ProjectVersionDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | import com.querydsl.jpa.impl.JPAQuery; 6 | 7 | import fr.openwide.core.jpa.business.generic.dao.GenericEntityDaoImpl; 8 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 9 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion; 10 | import fr.openwide.maven.artifact.notifier.core.business.project.model.QProjectVersion; 11 | 12 | @Repository("projectVersionDao") 13 | public class ProjectVersionDaoImpl extends GenericEntityDaoImpl implements IProjectVersionDao { 14 | 15 | private static final QProjectVersion qProjectVersion = QProjectVersion.projectVersion; 16 | 17 | @Override 18 | public ProjectVersion getByProjectAndVersion(Project project, String version) { 19 | JPAQuery query = new JPAQuery<>(getEntityManager()); 20 | 21 | query 22 | .select(qProjectVersion) 23 | .from(qProjectVersion) 24 | .where(qProjectVersion.project.eq(project)) 25 | .where(qProjectVersion.version.eq(version)); 26 | 27 | return query.fetchOne(); 28 | } 29 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/model/ProjectLicense.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.model; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | 6 | import org.hibernate.search.annotations.Indexed; 7 | 8 | import fr.openwide.core.jpa.more.business.generic.model.GenericListItem; 9 | 10 | @Entity 11 | @Indexed 12 | public class ProjectLicense extends GenericListItem { 13 | 14 | private static final long serialVersionUID = -586542589672564851L; 15 | 16 | @Column 17 | private String licenseUrl; 18 | 19 | protected ProjectLicense() { 20 | } 21 | 22 | public ProjectLicense(String label) { 23 | super(label, 0); 24 | } 25 | 26 | public String getLicenseUrl() { 27 | return licenseUrl; 28 | } 29 | 30 | public void setLicenseUrl(String licenseUrl) { 31 | this.licenseUrl = licenseUrl; 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/model/ProjectVersionStatus.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.model; 2 | 3 | public enum ProjectVersionStatus { 4 | 5 | IN_PROGRESS, 6 | PUBLISHED_ON_MAVEN_CENTRAL 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/service/IProjectLicenseService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.service; 2 | 3 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 4 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectLicense; 5 | 6 | public interface IProjectLicenseService extends IGenericEntityService { 7 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/service/IProjectService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 6 | import fr.openwide.core.jpa.exception.SecurityServiceException; 7 | import fr.openwide.core.jpa.exception.ServiceException; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 9 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 10 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion; 11 | 12 | public interface IProjectService extends IGenericEntityService { 13 | 14 | Project getByUri(String uri); 15 | 16 | List searchAutocomplete(String searchPattern, Integer limit, Integer offset) throws ServiceException; 17 | 18 | List searchByName(String searchPattern, Integer limit, Integer offset); 19 | 20 | int countSearchByName(String searchTerm); 21 | 22 | void createProjectVersion(Project project, ProjectVersion projectVersion) throws ServiceException, SecurityServiceException; 23 | 24 | void deleteProjectVersion(Project project, ProjectVersion projectVersion) throws ServiceException, SecurityServiceException; 25 | 26 | void addArtifact(Project project, Artifact artifact) throws ServiceException, SecurityServiceException; 27 | 28 | void removeArtifact(Project project, Artifact artifact) throws ServiceException, SecurityServiceException; 29 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/service/IProjectVersionService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.service; 2 | 3 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 4 | import fr.openwide.core.jpa.exception.SecurityServiceException; 5 | import fr.openwide.core.jpa.exception.ServiceException; 6 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 7 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion; 8 | 9 | public interface IProjectVersionService extends IGenericEntityService { 10 | 11 | ProjectVersion getByProjectAndVersion(Project project, String version); 12 | 13 | void linkWithArtifactVersions(ProjectVersion projectVersion) throws ServiceException, SecurityServiceException; 14 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/project/service/ProjectLicenseServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.project.service; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import fr.openwide.core.jpa.business.generic.service.GenericEntityServiceImpl; 7 | import fr.openwide.maven.artifact.notifier.core.business.project.dao.IProjectLicenseDao; 8 | import fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectLicense; 9 | 10 | @Service("projectLicenseService") 11 | public class ProjectLicenseServiceImpl extends GenericEntityServiceImpl implements IProjectLicenseService { 12 | 13 | @Autowired 14 | public ProjectLicenseServiceImpl(IProjectLicenseDao projectLicenseDao) { 15 | super(projectLicenseDao); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/search/service/IMavenCentralSearchApiService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.search.service; 2 | 3 | import java.io.File; 4 | import java.util.List; 5 | 6 | import fr.openwide.core.jpa.exception.ServiceException; 7 | import fr.openwide.maven.artifact.notifier.core.business.search.model.ArtifactBean; 8 | import fr.openwide.maven.artifact.notifier.core.business.search.model.ArtifactVersionBean; 9 | import fr.openwide.maven.artifact.notifier.core.business.search.model.PomBean; 10 | 11 | public interface IMavenCentralSearchApiService { 12 | 13 | List getArtifacts(String global, String groupId, String artifactId, int offset, int maxRows) 14 | throws ServiceException; 15 | 16 | long countArtifacts(String global, String groupId, String artifactId) throws ServiceException; 17 | 18 | long countArtifacts(String artifactId) throws ServiceException; 19 | 20 | PomBean searchFromPom(String xml) throws ServiceException; 21 | 22 | PomBean searchFromPom(File file) throws ServiceException; 23 | 24 | List getArtifactVersions(String groupId, String artifactId) throws ServiceException; 25 | } 26 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/search/service/IMavenCentralSearchUrlService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.search.service; 2 | 3 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersion; 4 | 5 | public interface IMavenCentralSearchUrlService { 6 | 7 | String getGroupUrl(String groupId); 8 | 9 | String getArtifactUrl(String groupId, String artifactId); 10 | 11 | String getVersionUrl(String groupId, String artifactId, String version); 12 | 13 | String getVersionUrl(ArtifactVersion version); 14 | } 15 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/search/service/IPomParserService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.search.service; 2 | 3 | import java.io.File; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.search.model.PomBean; 6 | 7 | public interface IPomParserService { 8 | 9 | PomBean parse(String xml); 10 | 11 | PomBean parse(File in); 12 | } 13 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/search/util/MavenCentralSearchApiConstants.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.search.util; 2 | 3 | public final class MavenCentralSearchApiConstants { 4 | 5 | public static final String GROUP_FIELD = "g"; 6 | public static final String ARTIFACT_FIELD = "a"; 7 | public static final String TYPE_FIELD = "p"; 8 | 9 | public static final String CORE_GAV = "gav"; 10 | 11 | private MavenCentralSearchApiConstants() { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/statistics/dao/IStatisticDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.statistics.dao; 2 | 3 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 4 | import fr.openwide.maven.artifact.notifier.core.business.statistics.model.Statistic; 5 | 6 | public interface IStatisticDao extends IGenericEntityDao { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/statistics/dao/StatisticDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.statistics.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | import fr.openwide.core.jpa.business.generic.dao.GenericEntityDaoImpl; 6 | import fr.openwide.maven.artifact.notifier.core.business.statistics.model.Statistic; 7 | 8 | @Repository("statisticDao") 9 | public class StatisticDaoImpl extends GenericEntityDaoImpl implements IStatisticDao { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/statistics/service/IStatisticService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.statistics.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 6 | import fr.openwide.core.jpa.exception.SecurityServiceException; 7 | import fr.openwide.core.jpa.exception.ServiceException; 8 | import fr.openwide.maven.artifact.notifier.core.business.statistics.model.Statistic; 9 | import fr.openwide.maven.artifact.notifier.core.business.statistics.model.Statistic.StatisticEnumKey; 10 | 11 | public interface IStatisticService extends IGenericEntityService { 12 | 13 | List listByEnumKey(StatisticEnumKey enumKey); 14 | 15 | void feed(StatisticEnumKey enumKey, Integer value) throws ServiceException, SecurityServiceException; 16 | } 17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/sync/service/IArtifactVersionProviderService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.sync.service; 2 | 3 | import java.util.List; 4 | 5 | import fr.openwide.core.jpa.exception.ServiceException; 6 | import fr.openwide.maven.artifact.notifier.core.business.search.model.ArtifactVersionBean; 7 | 8 | public interface IArtifactVersionProviderService { 9 | 10 | List getArtifactVersions(String groupId, String artifactId) throws ServiceException; 11 | } 12 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/sync/service/IMavenSynchronizationService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.sync.service; 2 | 3 | import fr.openwide.core.jpa.exception.SecurityServiceException; 4 | import fr.openwide.core.jpa.exception.ServiceException; 5 | 6 | import java.util.List; 7 | 8 | public interface IMavenSynchronizationService { 9 | 10 | void refreshAllLatestVersions() throws ServiceException, SecurityServiceException; 11 | 12 | void initializeAllArtifacts() throws ServiceException, SecurityServiceException, InterruptedException; 13 | 14 | void synchronizeAllArtifactsAndNotifyUsers() throws ServiceException, SecurityServiceException, InterruptedException; 15 | 16 | void synchronizeArtifactsAndNotifyUsers(List artifactIds) throws ServiceException, SecurityServiceException, 17 | InterruptedException; 18 | } 19 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/sync/service/MavenCentralSearchApiArtifactVersionProviderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.sync.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import fr.openwide.core.jpa.exception.ServiceException; 9 | import fr.openwide.maven.artifact.notifier.core.business.search.model.ArtifactVersionBean; 10 | import fr.openwide.maven.artifact.notifier.core.business.search.service.IMavenCentralSearchApiService; 11 | 12 | @Service("artifactVersionProviderService") 13 | public class MavenCentralSearchApiArtifactVersionProviderServiceImpl implements IArtifactVersionProviderService { 14 | 15 | @Autowired 16 | private IMavenCentralSearchApiService mavenCentralSearchService; 17 | 18 | @Override 19 | public List getArtifactVersions(String groupId, String artifactId) throws ServiceException { 20 | return mavenCentralSearchService.getArtifactVersions(groupId, artifactId); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/task/model/MavenArtifactNotifierTaskQueueId.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.task.model; 2 | 3 | import fr.openwide.core.jpa.more.business.task.model.IQueueId; 4 | 5 | public enum MavenArtifactNotifierTaskQueueId implements IQueueId { 6 | 7 | // Define queue IDs here. 8 | ; 9 | 10 | @Override 11 | public String getUniqueStringId() { 12 | return name(); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/upgrade/service/DataUpgradeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.upgrade.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Service; 6 | 7 | import com.google.common.collect.Lists; 8 | 9 | import fr.openwide.core.jpa.more.business.upgrade.model.IDataUpgrade; 10 | import fr.openwide.core.jpa.more.business.upgrade.service.AbstractDataUpgradeServiceImpl; 11 | 12 | @Service("dataUpgradeServiceImpl") 13 | public class DataUpgradeServiceImpl extends AbstractDataUpgradeServiceImpl { 14 | 15 | @Override 16 | public List listDataUpgrades() { 17 | return Lists.newArrayListWithCapacity(0); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/dao/EmailAddressDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | import fr.openwide.core.jpa.business.generic.dao.GenericEntityDaoImpl; 6 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 7 | 8 | @Repository("emailAddressDao") 9 | public class EmailAddressDaoImpl extends GenericEntityDaoImpl implements IEmailAddressDao { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/dao/IEmailAddressDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.dao; 2 | 3 | import fr.openwide.core.jpa.business.generic.dao.IGenericEntityDao; 4 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 5 | 6 | public interface IEmailAddressDao extends IGenericEntityDao { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/dao/IUserDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.dao; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import fr.openwide.core.jpa.security.business.person.dao.IGenericUserDao; 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersionNotification; 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.FollowedArtifact; 10 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 11 | import fr.openwide.maven.artifact.notifier.core.business.user.model.UserGroup; 12 | 13 | public interface IUserDao extends IGenericUserDao { 14 | 15 | FollowedArtifact getFollowedArtifact(User user, Artifact artifact); 16 | 17 | List listLastNotifications(User user, long limit); 18 | 19 | List listNotificationsAfterDate(User user, Date date); 20 | 21 | List search(String searchTerm, Integer limit, Integer offset); 22 | 23 | int countSearch(String searchTerm); 24 | 25 | List listByUserGroup(UserGroup userGroup); 26 | 27 | User getOldGoogleOpenIdProfile(String email); 28 | } 29 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/dao/IUserGroupDao.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.dao; 2 | 3 | import fr.openwide.core.jpa.security.business.person.dao.IGenericUserGroupDao; 4 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 5 | import fr.openwide.maven.artifact.notifier.core.business.user.model.UserGroup; 6 | 7 | public interface IUserGroupDao extends IGenericUserGroupDao { 8 | 9 | UserGroup getByName(String name); 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/dao/UserGroupDaoImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.dao; 2 | 3 | import org.springframework.stereotype.Repository; 4 | 5 | import fr.openwide.core.jpa.security.business.person.dao.GenericUserGroupDaoImpl; 6 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 7 | import fr.openwide.maven.artifact.notifier.core.business.user.model.UserGroup; 8 | import fr.openwide.maven.artifact.notifier.core.business.user.model.UserGroup_; 9 | 10 | @Repository("personGroupDao") 11 | public class UserGroupDaoImpl extends GenericUserGroupDaoImpl implements IUserGroupDao { 12 | 13 | public UserGroupDaoImpl() { 14 | super(); 15 | } 16 | 17 | @Override 18 | public UserGroup getByName(String name) { 19 | return getByField(UserGroup_.name, name); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/exception/AlreadyAddedEmailException.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.exception; 2 | 3 | import fr.openwide.core.jpa.exception.ServiceException; 4 | 5 | public class AlreadyAddedEmailException extends ServiceException { 6 | 7 | private static final long serialVersionUID = 7747632387980868603L; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/exception/AlreadyFollowedArtifactException.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.exception; 2 | 3 | import fr.openwide.core.jpa.exception.ServiceException; 4 | 5 | public class AlreadyFollowedArtifactException extends ServiceException { 6 | 7 | private static final long serialVersionUID = 4787557542394114694L; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/model/AuthenticationType.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.model; 2 | 3 | public enum AuthenticationType { 4 | LOCAL, 5 | 6 | OAUTH2_GOOGLE, 7 | 8 | TWITTER, 9 | 10 | GITHUB, 11 | 12 | OPENID, 13 | 14 | @Deprecated 15 | OPENID_GOOGLE 16 | } 17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/model/EmailStatus.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.model; 2 | 3 | public enum EmailStatus { 4 | 5 | PENDING_CONFIRM, 6 | 7 | VALIDATED, 8 | 9 | PENDING_DELETE 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/model/UserGroup.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.model; 2 | 3 | import javax.persistence.Entity; 4 | 5 | import org.bindgen.Bindable; 6 | import org.hibernate.search.annotations.Indexed; 7 | 8 | import fr.openwide.core.jpa.security.business.person.model.GenericUserGroup; 9 | 10 | @Entity 11 | @Indexed 12 | @Bindable 13 | public class UserGroup extends GenericUserGroup { 14 | private static final long serialVersionUID = 2156717229285615454L; 15 | 16 | public UserGroup() { 17 | } 18 | 19 | public UserGroup(String name) { 20 | super(name); 21 | } 22 | 23 | @Override 24 | protected UserGroup thisAsConcreteType() { 25 | return this; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/service/EmailAddressServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.service; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import fr.openwide.core.jpa.business.generic.service.GenericEntityServiceImpl; 7 | import fr.openwide.core.jpa.exception.SecurityServiceException; 8 | import fr.openwide.core.jpa.exception.ServiceException; 9 | import fr.openwide.maven.artifact.notifier.core.business.user.dao.IEmailAddressDao; 10 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 11 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress_; 12 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailStatus; 13 | 14 | @Service("emailAddressService") 15 | public class EmailAddressServiceImpl extends GenericEntityServiceImpl implements IEmailAddressService { 16 | 17 | @Autowired 18 | public EmailAddressServiceImpl(IEmailAddressDao emailAddressDao) { 19 | super(emailAddressDao); 20 | } 21 | 22 | @Override 23 | public EmailAddress getByHash(String hash) { 24 | return getByField(EmailAddress_.emailHash, hash); 25 | } 26 | 27 | @Override 28 | public void changeStatus(EmailAddress emailAddress, EmailStatus status) throws ServiceException, SecurityServiceException { 29 | emailAddress.setStatus(status); 30 | update(emailAddress); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/service/IEmailAddressService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.service; 2 | 3 | import fr.openwide.core.jpa.business.generic.service.IGenericEntityService; 4 | import fr.openwide.core.jpa.exception.SecurityServiceException; 5 | import fr.openwide.core.jpa.exception.ServiceException; 6 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailAddress; 7 | import fr.openwide.maven.artifact.notifier.core.business.user.model.EmailStatus; 8 | 9 | public interface IEmailAddressService extends IGenericEntityService { 10 | 11 | EmailAddress getByHash(String hash); 12 | 13 | void changeStatus(EmailAddress emailAddress, EmailStatus status) throws ServiceException, SecurityServiceException; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/service/IUserGroupService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.service; 2 | 3 | import fr.openwide.core.jpa.security.business.person.service.IGenericUserGroupService; 4 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 5 | import fr.openwide.maven.artifact.notifier.core.business.user.model.UserGroup; 6 | 7 | public interface IUserGroupService extends IGenericUserGroupService { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/business/user/service/UserGroupServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.business.user.service; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import fr.openwide.core.jpa.search.service.IHibernateSearchService; 7 | import fr.openwide.core.jpa.security.business.person.service.GenericUserGroupServiceImpl; 8 | import fr.openwide.maven.artifact.notifier.core.business.user.dao.IUserGroupDao; 9 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 10 | import fr.openwide.maven.artifact.notifier.core.business.user.model.UserGroup; 11 | 12 | @Service("personGroupService") 13 | public class UserGroupServiceImpl extends GenericUserGroupServiceImpl 14 | implements IUserGroupService { 15 | 16 | @Autowired 17 | private IHibernateSearchService hibernateSearchService; 18 | 19 | @Autowired 20 | private IUserService userService; 21 | 22 | @Autowired 23 | public UserGroupServiceImpl(IUserGroupDao userGroupDao) { 24 | super(userGroupDao); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/config/spring/MavenArtifactNotifierCoreNotificationConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.config.spring; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.mail.javamail.JavaMailSenderImpl; 7 | import org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean; 8 | 9 | @Configuration 10 | public class MavenArtifactNotifierCoreNotificationConfig { 11 | 12 | @Bean 13 | public JavaMailSenderImpl mailSender(@Value("${notification.smtp.host}") String host, 14 | @Value("${notification.smtp.port}") int port) { 15 | JavaMailSenderImpl javaMailSend = new JavaMailSenderImpl(); 16 | javaMailSend.setHost(host); 17 | javaMailSend.setPort(port); 18 | return javaMailSend; 19 | } 20 | 21 | @Bean 22 | public FreeMarkerConfigurationFactoryBean freemarkerMailConfiguration() { 23 | FreeMarkerConfigurationFactoryBean configuration = new FreeMarkerConfigurationFactoryBean(); 24 | configuration.setTemplateLoaderPath("classpath:notification"); 25 | return configuration; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/config/spring/MavenArtifactNotifierCorePropertyConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.config.spring; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | 5 | import fr.openwide.core.jpa.more.business.parameter.dao.ParameterDaoImpl; 6 | import fr.openwide.core.spring.config.spring.AbstractApplicationPropertyConfig; 7 | import fr.openwide.core.spring.property.dao.IMutablePropertyDao; 8 | import fr.openwide.core.spring.property.service.IPropertyRegistry; 9 | import fr.openwide.maven.artifact.notifier.core.property.MavenArtifactNotifierCorePropertyIds; 10 | 11 | @Configuration 12 | public class MavenArtifactNotifierCorePropertyConfig extends AbstractApplicationPropertyConfig { 13 | 14 | @Override 15 | protected void register(IPropertyRegistry registry) { 16 | registry.registerDateTime(MavenArtifactNotifierCorePropertyIds.LAST_SYNCHRONIZATION_DATE); 17 | } 18 | 19 | @Override 20 | public IMutablePropertyDao mutablePropertyDao() { 21 | return new ParameterDaoImpl(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/config/spring/MavenArtifactNotifierCoreSecurityConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.config.spring; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.Scope; 6 | import org.springframework.context.annotation.ScopedProxyMode; 7 | 8 | import fr.openwide.core.jpa.security.config.spring.AbstractJpaSecurityConfig; 9 | import fr.openwide.core.jpa.security.service.AuthenticationUserNameComparison; 10 | import fr.openwide.core.jpa.security.service.ICorePermissionEvaluator; 11 | import fr.openwide.maven.artifact.notifier.core.security.service.MavenArtifactNotifierPermissionEvaluator; 12 | 13 | @Configuration 14 | public class MavenArtifactNotifierCoreSecurityConfig extends AbstractJpaSecurityConfig { 15 | 16 | @Bean 17 | @Override 18 | public AuthenticationUserNameComparison authenticationUserNameComparison() { 19 | return AuthenticationUserNameComparison.CASE_INSENSITIVE; 20 | } 21 | 22 | @Bean 23 | @Override 24 | @Scope(proxyMode = ScopedProxyMode.INTERFACES) 25 | public ICorePermissionEvaluator permissionEvaluator() { 26 | return new MavenArtifactNotifierPermissionEvaluator(); 27 | } 28 | 29 | @Override 30 | public String roleHierarchyAsString() { 31 | return defaultRoleHierarchyAsString(); 32 | } 33 | 34 | @Override 35 | public String permissionHierarchyAsString() { 36 | return defaultPermissionHierarchyAsString(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/config/spring/MavenArtifactNotifierCoreSolrConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.config.spring; 2 | 3 | import java.net.MalformedURLException; 4 | 5 | import org.apache.solr.client.solrj.impl.HttpSolrClient; 6 | import org.apache.solr.client.solrj.impl.XMLResponseParser; 7 | import org.springframework.beans.factory.annotation.Value; 8 | import org.springframework.context.annotation.Bean; 9 | import org.springframework.context.annotation.Configuration; 10 | 11 | @Configuration 12 | public class MavenArtifactNotifierCoreSolrConfig { 13 | 14 | @Bean 15 | public HttpSolrClient solrClient(@Value("${solr.url}") String solrUrl, 16 | @Value("${solr.pool.maxTotalConnections}") Integer maxTotalConnections) throws MalformedURLException { 17 | HttpSolrClient solrClient = new HttpSolrClient(solrUrl); 18 | 19 | solrClient.setParser(new TextXMLResponseParser()); 20 | solrClient.setMaxTotalConnections(maxTotalConnections); 21 | solrClient.setDefaultMaxConnectionsPerHost(maxTotalConnections); 22 | 23 | return solrClient; 24 | } 25 | 26 | /** 27 | * @see http://stackoverflow.com/questions/27781294/expected-mime-type-application-xml-but-got-text-html 28 | */ 29 | public static class TextXMLResponseParser extends XMLResponseParser { 30 | public TextXMLResponseParser() { 31 | } 32 | 33 | @Override 34 | public String getContentType() { 35 | return "text/xml; charset=UTF-8"; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/config/spring/MavenArtifactNotifierCoreTaskManagementConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.config.spring; 2 | 3 | import java.util.Collection; 4 | 5 | import org.apache.commons.lang3.EnumUtils; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | import fr.openwide.core.jpa.more.business.task.model.IQueueId; 10 | import fr.openwide.core.jpa.more.config.spring.AbstractTaskManagementConfig; 11 | import fr.openwide.maven.artifact.notifier.core.business.task.model.MavenArtifactNotifierTaskQueueId; 12 | 13 | @Configuration 14 | public class MavenArtifactNotifierCoreTaskManagementConfig extends AbstractTaskManagementConfig { 15 | 16 | @Override 17 | @Bean 18 | public Collection queueIds() { 19 | return EnumUtils.getEnumList(MavenArtifactNotifierTaskQueueId.class); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/property/MavenArtifactNotifierCorePropertyIds.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.property; 2 | 3 | import java.util.Date; 4 | 5 | import fr.openwide.core.spring.property.model.AbstractPropertyIds; 6 | import fr.openwide.core.spring.property.model.MutablePropertyId; 7 | 8 | public final class MavenArtifactNotifierCorePropertyIds extends AbstractPropertyIds { 9 | 10 | /* 11 | * Mutable Properties 12 | */ 13 | public static final MutablePropertyId LAST_SYNCHRONIZATION_DATE = mutable("lastSynchronizationDate"); 14 | 15 | /* 16 | * Immutable Properties 17 | */ 18 | 19 | // None 20 | } 21 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/security/service/MavenArtifactNotifierPermissionEvaluator.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.security.service; 2 | 3 | import org.springframework.security.acls.model.Permission; 4 | 5 | import fr.openwide.core.jpa.security.service.AbstractCorePermissionEvaluator; 6 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 7 | 8 | public class MavenArtifactNotifierPermissionEvaluator extends AbstractCorePermissionEvaluator { 9 | 10 | @Override 11 | protected boolean hasPermission(User user, Object targetDomainObject, Permission permission) { 12 | throw new IllegalArgumentException("ACL not used at the moment."); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/util/init/service/IProjectImportDataService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.util.init.service; 2 | 3 | import java.io.File; 4 | import java.io.FileNotFoundException; 5 | import java.io.IOException; 6 | 7 | public interface IProjectImportDataService { 8 | 9 | void importProjects(File file) throws FileNotFoundException, IOException; 10 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/java/fr/openwide/maven/artifact/notifier/core/util/monitoring/DatabaseConsistencyCheckServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.util.monitoring; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import fr.openwide.maven.artifact.notifier.core.business.user.service.IUserService; 7 | import fr.openwide.core.jpa.exception.SecurityServiceException; 8 | import fr.openwide.core.jpa.exception.ServiceException; 9 | import fr.openwide.core.jpa.util.IDatabaseConsistencyCheckService; 10 | 11 | @Service("databaseConsistencyCheckService") 12 | public class DatabaseConsistencyCheckServiceImpl implements IDatabaseConsistencyCheckService { 13 | 14 | @Autowired 15 | private IUserService userService; 16 | 17 | @Override 18 | public void checkDatabaseAccess() { 19 | userService.count(); 20 | } 21 | 22 | @Override 23 | public void checkDatabaseConsistency() throws ServiceException, SecurityServiceException { 24 | // rien 25 | } 26 | 27 | @Override 28 | public void checkOnStartup(boolean allowCreateMissingElements) throws ServiceException, SecurityServiceException { 29 | // rien 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Logger racine 2 | log4j.appender.Stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.Stdout.layout.ConversionPattern=[%d{ISO8601}] %-5p - %-26.26c{1} - %X{ow-url} - %m\n 5 | 6 | log4j.rootLogger=WARN, Stdout 7 | 8 | # hibernate queries 9 | #log4j.logger.org.hibernate.SQL=DEBUG 10 | #log4j.logger.org.hibernate.type=INFO 11 | 12 | # schema initialization 13 | #log4j.logger.org.hibernate.tool.hbm2ddl=DEBUG 14 | 15 | # configuration logging 16 | log4j.logger.fr.openwide.core.spring.util.ConfigurationLogger=INFO 17 | 18 | # permet de vérifier le binding de jul à slf4j au démarrage de la webapp 19 | log4j.logger.fr.openwide.core.commons.util.logging.SLF4JLoggingListener=INFO 20 | # permet de contrôler si nécessaire les logs jersey 21 | #log4j.logger.com.sun.jersey.api.container.filter.LoggingFilter=INFO -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/test/java/fr/openwide/maven/artifact/notifier/core/test/business/TestUserService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.test.business; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import java.util.List; 6 | 7 | import org.junit.Test; 8 | 9 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 10 | import fr.openwide.maven.artifact.notifier.core.test.AbstractMavenArtifactNotifierTestCase; 11 | import fr.openwide.core.jpa.exception.SecurityServiceException; 12 | import fr.openwide.core.jpa.exception.ServiceException; 13 | 14 | public class TestUserService extends AbstractMavenArtifactNotifierTestCase { 15 | 16 | @Test 17 | public void testUser() throws ServiceException, SecurityServiceException { 18 | 19 | { 20 | User user = new User(); 21 | user.setUserName("firstname.lastname@test.fr"); 22 | user.setFullName("firstname lastname"); 23 | 24 | userService.create(user); 25 | } 26 | 27 | List userList = userService.list(); 28 | 29 | assertEquals(1, userList.size()); 30 | assertEquals("firstname.lastname@test.fr", userList.get(0).getUserName()); 31 | assertEquals("firstname lastname", userList.get(0).getFullName()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/test/java/fr/openwide/maven/artifact/notifier/core/test/business/version/util/TestMavenCentralComparableVersion.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.test.business.version.util; 2 | 3 | import java.sql.Date; 4 | 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactVersion; 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.util.MavenCentralVersionComparator; 10 | 11 | public class TestMavenCentralComparableVersion { 12 | 13 | @Test 14 | public void testMavenCentralComparableVersion() { 15 | ArtifactVersion classic1 = new ArtifactVersion("1.2", new Date(1131452383000L)); 16 | ArtifactVersion classic2 = new ArtifactVersion("3.0-rc3", new Date(1299460443000L)); 17 | ArtifactVersion date1 = new ArtifactVersion("20041127.091804", new Date(1132834783000L)); 18 | ArtifactVersion date2 = new ArtifactVersion("20060216.105226", new Date(1176203983000L)); 19 | 20 | Assert.assertEquals(1, MavenCentralVersionComparator.get().compare(classic2, classic1)); 21 | Assert.assertEquals(1, MavenCentralVersionComparator.get().compare(classic2, date1)); 22 | Assert.assertEquals(1, MavenCentralVersionComparator.get().compare(classic1, date1)); 23 | Assert.assertEquals(0, MavenCentralVersionComparator.get().compare(date1, date1)); 24 | Assert.assertEquals(-1, MavenCentralVersionComparator.get().compare(date1, date2)); 25 | Assert.assertEquals(1, MavenCentralVersionComparator.get().compare(date2, classic1)); 26 | Assert.assertEquals(-1, MavenCentralVersionComparator.get().compare(date2, classic2)); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/test/java/fr/openwide/maven/artifact/notifier/core/test/config/spring/MavenArtifactNotifierCoreTestCommonConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.test.config.spring; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.Import; 6 | 7 | import fr.openwide.core.spring.config.spring.annotation.ConfigurationLocations; 8 | import fr.openwide.maven.artifact.notifier.core.business.notification.service.EmptyNotificationContentDescriptorFactoryImpl; 9 | import fr.openwide.maven.artifact.notifier.core.business.notification.service.IArtifactNotifierNotificationContentDescriptorFactory; 10 | import fr.openwide.maven.artifact.notifier.core.config.spring.MavenArtifactNotifierCoreCommonConfig; 11 | 12 | @Configuration 13 | @ConfigurationLocations(locations = { "classpath:configuration-test.properties" }, order = 1000) 14 | @Import({ 15 | MavenArtifactNotifierCoreCommonConfig.class, 16 | }) 17 | public class MavenArtifactNotifierCoreTestCommonConfig { 18 | 19 | @Bean 20 | public IArtifactNotifierNotificationContentDescriptorFactory notificationContentDescriptorFactory() { 21 | return new EmptyNotificationContentDescriptorFactoryImpl(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/test/java/fr/openwide/maven/artifact/notifier/core/test/service/CoreTestNotificationPanelRendererServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.test.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.notification.service.EmptyNotificationPanelRendererServiceImpl; 6 | 7 | /** 8 | * Implémentation bouche-trou, uniquement pour combler la dépendance. 9 | */ 10 | @Service("coreTestNotificationPanelRendererService") 11 | public class CoreTestNotificationPanelRendererServiceImpl extends EmptyNotificationPanelRendererServiceImpl { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/test/java/fr/openwide/maven/artifact/notifier/core/test/service/CoreTestNotificationUrlBuilderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.core.test.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.notification.service.EmptyNotificationUrlBuilderServiceImpl; 6 | 7 | /** 8 | * Implémentation bouche-trou, uniquement pour combler la dépendance. 9 | */ 10 | @Service("coreTestNotificationUrlBuilderService") 11 | public class CoreTestNotificationUrlBuilderServiceImpl extends EmptyNotificationUrlBuilderServiceImpl { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/test/resources/configuration-test.properties: -------------------------------------------------------------------------------- 1 | # Database 2 | db.type=postgresql 3 | db.jdbcUrl=jdbc:postgresql://localhost:5432/maven_artifact_notifier_test?housekeeper.enabled=false 4 | db.user=maven_artifact_notifier_test 5 | db.password=maven_artifact_notifier_test 6 | db.maxPoolSize=50 7 | 8 | hibernate.hbm2ddl.auto=create 9 | 10 | # Paths 11 | data.path=/tmp/maven-artifact-notifier 12 | shared-data.path=/tmp/maven-artifact-notifier 13 | test.data.path=/tmp/maven-artifact-notifier 14 | 15 | notification.test.emails=noreply@smile.eu 16 | -------------------------------------------------------------------------------- /maven-artifact-notifier-core/src/test/resources/notification/artifact_version_notification.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Nouvelles versions - ${.now?date?iso_utc} 3 | 4 | <#if BODY_TEXT!false> 5 | Bonjour, 6 | 7 | De nouvelles versions ont été déployées sur Maven Central : 8 | 9 | <#list notifications as notification> 10 | <#assign uniqueId = notification.artifactVersion.artifact.group.groupId + ':' + notification.artifactVersion.artifact.artifactId> 11 | * ${uniqueId} - ${notification.artifactVersion.version} 12 | 13 | 14 | Si vous souhaitez ne plus recevoir de notifications par mail, vous pouvez vous désabonner à l'adresse suivante : 15 | ${unsubscribeUrl} 16 | 17 | -- 18 | artifact listener 19 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 4.0.0 5 | 6 | 7 | maven-artifact-notifier 8 | fr.openwide.maven 9 | 0.4-SNAPSHOT 10 | 11 | 12 | maven-artifact-notifier-init 13 | 14 | Artifact Listener - Init 15 | 16 | 17 | 18 | fr.openwide.maven 19 | maven-artifact-notifier-core 20 | 0.4-SNAPSHOT 21 | 22 | 23 | 24 | 25 | junit 26 | junit 27 | test 28 | 29 | 30 | 31 | org.springframework 32 | spring-test 33 | test 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/java/fr/openwide/maven/artifact/notifier/init/MavenArtifactNotifierInitPackage.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.init; 2 | 3 | public final class MavenArtifactNotifierInitPackage { // NOSONAR 4 | 5 | private MavenArtifactNotifierInitPackage() { 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/java/fr/openwide/maven/artifact/notifier/init/config/spring/MavenArtifactNotifierInitConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.init.config.spring; 2 | 3 | import org.springframework.context.annotation.ComponentScan; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.Import; 6 | 7 | import fr.openwide.maven.artifact.notifier.core.config.spring.MavenArtifactNotifierCoreCommonConfig; 8 | import fr.openwide.maven.artifact.notifier.init.MavenArtifactNotifierInitPackage; 9 | import fr.openwide.core.spring.config.spring.annotation.ConfigurationLocations; 10 | 11 | @Configuration 12 | @Import({ 13 | MavenArtifactNotifierCoreCommonConfig.class 14 | }) 15 | @ConfigurationLocations(locations = "classpath:configuration-init.properties") 16 | @ComponentScan( 17 | basePackageClasses = { 18 | MavenArtifactNotifierInitPackage.class 19 | } 20 | ) 21 | public class MavenArtifactNotifierInitConfig { 22 | } 23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/java/fr/openwide/maven/artifact/notifier/init/service/InitNotificationContentDescriptorFactoryImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.init.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.notification.service.EmptyNotificationContentDescriptorFactoryImpl; 6 | 7 | @Service("initNotificationContentDescriptorFactoryImpl") 8 | public class InitNotificationContentDescriptorFactoryImpl extends EmptyNotificationContentDescriptorFactoryImpl { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/java/fr/openwide/maven/artifact/notifier/init/service/InitNotificationPanelRendererServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.init.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.notification.service.EmptyNotificationPanelRendererServiceImpl; 6 | 7 | /** 8 | * Implémentation bouche-trou, uniquement pour combler la dépendance. 9 | */ 10 | @Service("initNotificationPanelRendererService") 11 | public class InitNotificationPanelRendererServiceImpl extends EmptyNotificationPanelRendererServiceImpl { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/java/fr/openwide/maven/artifact/notifier/init/service/InitNotificationUrlBuilderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.init.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import fr.openwide.maven.artifact.notifier.core.business.notification.service.EmptyNotificationUrlBuilderServiceImpl; 6 | 7 | /** 8 | * Implémentation bouche-trou, uniquement pour combler la dépendance. 9 | */ 10 | @Service("initNotificationUrlBuilderService") 11 | public class InitNotificationUrlBuilderServiceImpl extends EmptyNotificationUrlBuilderServiceImpl { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/java/fr/openwide/maven/artifact/notifier/init/util/SpringContextWrapper.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.init.util; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import javax.persistence.EntityManagerFactory; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Component; 10 | 11 | import fr.openwide.core.jpa.exception.SecurityServiceException; 12 | import fr.openwide.core.jpa.exception.ServiceException; 13 | import fr.openwide.core.jpa.more.util.init.service.IImportDataService; 14 | import fr.openwide.core.jpa.search.service.IHibernateSearchService; 15 | import fr.openwide.core.jpa.util.EntityManagerUtils; 16 | 17 | @Component 18 | public class SpringContextWrapper { 19 | 20 | @Autowired 21 | private IHibernateSearchService hibernateSearchService; 22 | 23 | @Autowired 24 | private EntityManagerUtils entityManagerUtils; 25 | 26 | @Autowired 27 | private EntityManagerFactory entityManagerFactory; 28 | 29 | @Autowired 30 | private IImportDataService importDataService; 31 | 32 | public void importDirectory(File directory) throws ServiceException, SecurityServiceException, IOException { 33 | importDataService.importDirectory(directory); 34 | } 35 | 36 | public void reindexAll() throws ServiceException { 37 | hibernateSearchService.reindexAll(); 38 | } 39 | 40 | public void openEntityManager() { 41 | entityManagerUtils.openEntityManager(); 42 | } 43 | 44 | public void closeEntityManager() { 45 | entityManagerUtils.closeEntityManager(); 46 | entityManagerFactory.close(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/configuration-init.properties: -------------------------------------------------------------------------------- 1 | # Désactivation de l'indexation au fil de l'eau : le MassIndexer est censé être appelé après l'initialisation. 2 | hibernate.search.indexing_strategy=manual 3 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/init/development/business_data.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-init/src/main/resources/init/development/business_data.xls -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/init/development/reference_data.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-init/src/main/resources/init/development/reference_data.xls -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/init/production/business_data.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-init/src/main/resources/init/production/business_data.xls -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/init/production/reference_data.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-init/src/main/resources/init/production/reference_data.xls -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/update/2013-07-22-pac4j.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | ALTER TABLE user_ RENAME COLUMN openididentifier TO remoteidentifier; 4 | 5 | COMMIT; 6 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/update/2013-08-08-project-licenses.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | INSERT INTO projectlicense VALUES(7, 'f', 'f', 'f', 't', 'Apache License 2.0', 0, 'ASL-2.0', 'http://opensource.org/licenses/Apache-2.0'); 4 | INSERT INTO projectlicense VALUES(8, 'f', 'f', 'f', 't', 'Eclipse Public License', 1, 'EPL-1.0', 'http://opensource.org/licenses/EPL-1.0'); 5 | INSERT INTO projectlicense VALUES(9, 'f', 'f', 'f', 't', 'MIT License', 2, 'MIT', 'http://opensource.org/licenses/MIT'); 6 | 7 | INSERT INTO projectlicense VALUES(3, 'f', 'f', 'f', 't', 'GNU Lesser General Public License 2.1', 3, 'LGPL-2.1', 'http://opensource.org/licenses/LGPL-2.1'); 8 | INSERT INTO projectlicense VALUES(4, 'f', 'f', 'f', 't', 'GNU Lesser General Public License 3.0', 4, 'LGPL-3.0', 'http://opensource.org/licenses/LGPL-3.0'); 9 | 10 | INSERT INTO projectlicense VALUES(5, 'f', 'f', 'f', 't', 'BSD 2-Clause License', 5, 'BSD-2', 'http://opensource.org/licenses/BSD-2-Clause'); 11 | INSERT INTO projectlicense VALUES(6, 'f', 'f', 'f', 't', 'BSD 3-Clause License', 6, 'BSD-3', 'http://opensource.org/licenses/BSD-3-Clause'); 12 | 13 | INSERT INTO projectlicense VALUES(1, 'f', 'f', 'f', 't', 'GNU General Public License 2.0', 7, 'GPL-2.0', 'http://opensource.org/licenses/GPL-2.0'); 14 | INSERT INTO projectlicense VALUES(2, 'f', 'f', 'f', 't', 'GNU General Public License 3.0', 8, 'GPL-3.0', 'http://opensource.org/licenses/GPL-3.0'); 15 | 16 | 17 | COMMIT; 18 | -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/update/2014-08-23-upgrade-to-0-9.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | alter table user__usergroup rename column usergroups_id to groups_id; 4 | 5 | COMMIT; -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/update/2014-11-28-change-notification-machinery.sql: -------------------------------------------------------------------------------- 1 | BEGIN; 2 | 3 | alter table artifactversionnotification add column status varchar(255); 4 | update artifactversionnotification set status='SENT'; 5 | 6 | COMMIT; -------------------------------------------------------------------------------- /maven-artifact-notifier-init/src/main/resources/update/20150504-google-oauth2.sql: -------------------------------------------------------------------------------- 1 | begin; 2 | 3 | update user_ set email=email || '__OPENID_GOOGLE', username = username || '__OPENID_GOOGLE' where authenticationType='OPENID_GOOGLE'; 4 | 5 | commit; -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/bindgen.properties: -------------------------------------------------------------------------------- 1 | skipBindKeyword=true -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/MavenArtifactNotifierSession.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application; 2 | 3 | import org.apache.wicket.Session; 4 | import org.apache.wicket.request.Request; 5 | import org.apache.wicket.spring.injection.annot.SpringBean; 6 | import org.springframework.security.authentication.AuthenticationManager; 7 | 8 | import fr.openwide.core.wicket.more.AbstractCoreSession; 9 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 10 | 11 | public class MavenArtifactNotifierSession extends AbstractCoreSession { 12 | 13 | private static final long serialVersionUID = 1870827020904365541L; 14 | 15 | public static final String SPRING_SECURITY_SAVED_REQUEST = "SPRING_SECURITY_SAVED_REQUEST"; 16 | 17 | @SpringBean(name = "authenticationManager") 18 | private AuthenticationManager authenticationManager; 19 | 20 | public MavenArtifactNotifierSession(Request request) { 21 | super(request); 22 | } 23 | 24 | public static MavenArtifactNotifierSession get() { 25 | return (MavenArtifactNotifierSession) Session.get(); 26 | } 27 | 28 | public void authenticatePac4j() { 29 | if (!isSignedIn()) { 30 | doInitializeSession(); 31 | signIn(true); 32 | 33 | bind(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/component/AdministrationArtifactSearchPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 |
9 | 13 |
14 | 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/component/ArtifactPortfolioPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
19 | 20 | 23 | 24 |
32 |
33 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/component/UserArtifactsPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |

8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 32 | 33 | 34 | 35 | 36 | 37 |
22 | 23 | 24 | 25 | 27 | 29 | 30 | 31 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/component/UserGroupPortfolioPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
16 | 17 |
26 |
27 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/component/UserPortfolioPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
18 | 19 |
30 |
31 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/form/ChangePasswordPopupPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 | 9 |
10 | 13 |
14 |
15 |
16 | 17 |
18 | 21 |
22 |
23 |
24 |
25 |
26 | 30 | 34 |
35 |
36 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/page/AdministrationArtifactDescriptionPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 |

9 | 10 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/page/AdministrationArtifactPortfolioPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

17 | 18 |
19 |
20 |
21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/page/AdministrationUserDescriptionPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/page/AdministrationUserGroupDescriptionPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/page/AdministrationUserGroupPortfolioPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 | 9 | 13 |

14 | 15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/page/AdministrationUserPortfolioPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 | 9 | 13 |

14 | 15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/administration/template/AdministrationTemplate.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.administration.template; 2 | 3 | import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation; 4 | import org.apache.wicket.markup.html.WebPage; 5 | import org.apache.wicket.model.ResourceModel; 6 | import org.apache.wicket.request.mapper.parameter.PageParameters; 7 | 8 | import fr.openwide.core.jpa.security.business.authority.util.CoreAuthorityConstants; 9 | import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement; 10 | import fr.openwide.maven.artifact.notifier.web.application.administration.page.AdministrationArtifactPortfolioPage; 11 | import fr.openwide.maven.artifact.notifier.web.application.common.template.MainTemplate; 12 | 13 | @AuthorizeInstantiation(CoreAuthorityConstants.ROLE_ADMIN) 14 | public abstract class AdministrationTemplate extends MainTemplate { 15 | 16 | private static final long serialVersionUID = -5571981353426833725L; 17 | 18 | public AdministrationTemplate(PageParameters parameters) { 19 | super(parameters); 20 | 21 | addBreadCrumbElement(new BreadCrumbElement(new ResourceModel("navigation.administration"))); 22 | } 23 | 24 | @Override 25 | protected Class getFirstMenuPage() { 26 | return AdministrationArtifactPortfolioPage.class; 27 | } 28 | 29 | @Override 30 | protected abstract Class getSecondMenuPage(); 31 | } 32 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/AbstractArtifactVersionTagPanel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.artifact.component; 2 | 3 | import java.util.regex.Pattern; 4 | 5 | import org.apache.wicket.model.IModel; 6 | 7 | import fr.openwide.core.wicket.markup.html.panel.GenericPanel; 8 | 9 | public abstract class AbstractArtifactVersionTagPanel extends GenericPanel { 10 | 11 | private static final long serialVersionUID = -802075278729209091L; 12 | 13 | private static final Pattern NON_FINAL_VERSION_PATTERN = Pattern.compile(".*[\\.-](rc|cr|beta|alpha|incubating).*", Pattern.CASE_INSENSITIVE); 14 | 15 | public AbstractArtifactVersionTagPanel(String id, IModel model) { 16 | super(id, model); 17 | } 18 | 19 | protected boolean isFinalVersion(String version) { 20 | return version == null || !NON_FINAL_VERSION_PATTERN.matcher(version).matches(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/ArtifactFollowActionsPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 12 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/ArtifactPublicPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 | 9 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/ArtifactPublicPanel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.artifact.component; 2 | 3 | import org.apache.wicket.markup.html.basic.Label; 4 | import org.apache.wicket.model.IModel; 5 | import org.apache.wicket.model.ResourceModel; 6 | 7 | import fr.openwide.core.wicket.markup.html.panel.GenericPanel; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 9 | import fr.openwide.maven.artifact.notifier.web.application.MavenArtifactNotifierSession; 10 | 11 | public class ArtifactPublicPanel extends GenericPanel { 12 | 13 | private static final long serialVersionUID = -8479708798509150198L; 14 | 15 | public ArtifactPublicPanel(String id, IModel artifactModel) { 16 | super(id, artifactModel); 17 | 18 | add(new Label("description", new ResourceModel("artifact.description.text")).setEscapeModelStrings(false)); 19 | } 20 | 21 | @Override 22 | protected void onConfigure() { 23 | super.onConfigure(); 24 | setVisible(MavenArtifactNotifierSession.get().getUser() == null); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/ArtifactVersionLinksPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/ArtifactVersionTagPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/DeprecatedArtifactPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 |
8 | 9 | 10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/component/FollowedArtifactNotificationRulesDemoPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |

9 | 10 | 11 |

12 | 13 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/form/ArtifactDeprecationFormPopupPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 |
9 |
10 |
11 | 12 |
13 | 20 |
21 |
22 |
23 |
24 |
25 | 29 | 33 |
34 |
35 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/form/ArtifactNotificationRuleFormPopupPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 | 9 |
10 | 11 |
12 |
13 |
14 | 15 |
16 | 17 |
18 |
19 |
20 |
21 |
22 | 26 | 30 |
31 |
32 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/form/ArtifactPomSearchPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 |
9 | 11 | 15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 |
23 | 24 |
25 | 26 |
27 | 29 | 33 |
34 |
35 |
36 |
37 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/form/ArtifactSearchPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 |
9 | 13 |
14 |
15 |
16 |
17 | 18 | 19 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/form/ArtifactVersionFormPopupPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 |
10 |
11 | 15 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/model/ArtifactModel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.artifact.model; 2 | 3 | import org.apache.wicket.injection.Injector; 4 | import org.apache.wicket.model.IModel; 5 | import org.apache.wicket.model.LoadableDetachableModel; 6 | import org.apache.wicket.spring.injection.annot.SpringBean; 7 | 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactKey; 10 | import fr.openwide.maven.artifact.notifier.core.business.artifact.service.IArtifactService; 11 | 12 | public class ArtifactModel extends LoadableDetachableModel { 13 | 14 | private static final long serialVersionUID = -4753990112314070463L; 15 | 16 | @SpringBean 17 | private IArtifactService artifactService; 18 | 19 | private IModel artifactKeyModel; 20 | 21 | public ArtifactModel(IModel artifactKeyModel) { 22 | super(); 23 | this.artifactKeyModel = artifactKeyModel; 24 | 25 | Injector.get().inject(this); 26 | } 27 | 28 | @Override 29 | protected Artifact load() { 30 | return artifactService.getByArtifactKey(artifactKeyModel.getObject()); 31 | } 32 | 33 | @Override 34 | protected void onDetach() { 35 | super.onDetach(); 36 | if (artifactKeyModel != null) { 37 | artifactKeyModel.detach(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/page/ArtifactPomSearchPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 11 |
12 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/artifact/page/ArtifactSearchPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 12 |
13 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/auth/pac4j/service/Pac4jAuthenticationFailureHandler.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.auth.pac4j.service; 2 | 3 | import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; 4 | 5 | import fr.openwide.maven.artifact.notifier.web.application.auth.pac4j.util.Pac4jAuthenticationUtils; 6 | 7 | public class Pac4jAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { 8 | 9 | public Pac4jAuthenticationFailureHandler() { 10 | super(Pac4jAuthenticationUtils.LOGIN_FAILURE_URL); 11 | } 12 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/auth/pac4j/service/Pac4jAuthenticationServiceImpl.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.auth.pac4j.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.security.core.Authentication; 6 | import org.springframework.security.core.GrantedAuthority; 7 | 8 | import fr.openwide.core.jpa.security.service.CoreAuthenticationServiceImpl; 9 | import fr.openwide.maven.artifact.notifier.web.application.auth.pac4j.util.Pac4jAuthenticationUtils; 10 | 11 | public class Pac4jAuthenticationServiceImpl extends CoreAuthenticationServiceImpl { 12 | 13 | @Override 14 | public String getUserName() { 15 | return Pac4jAuthenticationUtils.getUserName(); 16 | } 17 | 18 | @Override 19 | public boolean isLoggedIn() { 20 | return Pac4jAuthenticationUtils.isLoggedIn(); 21 | } 22 | 23 | @Override 24 | public List getAuthorities() { 25 | return Pac4jAuthenticationUtils.getAuthorities(); 26 | } 27 | 28 | @Override 29 | public Authentication getAuthentication() { 30 | return Pac4jAuthenticationUtils.getAuthentication(); 31 | } 32 | 33 | @Override 34 | public void signOut() { 35 | Pac4jAuthenticationUtils.setAuthentication(null); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/behavior/AuthenticatedOnlyBehavior.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.common.behavior; 2 | 3 | import org.apache.wicket.Component; 4 | import org.apache.wicket.authroles.authentication.AuthenticatedWebSession; 5 | import org.apache.wicket.behavior.Behavior; 6 | 7 | public class AuthenticatedOnlyBehavior extends Behavior { 8 | 9 | private static final long serialVersionUID = -8533644530041049668L; 10 | 11 | @Override 12 | public void bind(Component component) { 13 | super.bind(component); 14 | component.setVisibilityAllowed(isAuthenticated()); 15 | } 16 | 17 | protected boolean isAuthenticated() { 18 | return AuthenticatedWebSession.exists() && AuthenticatedWebSession.get().isSignedIn(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/component/AuthenticatedOnlyButton.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.common.component; 2 | 3 | import org.apache.wicket.markup.html.form.Button; 4 | import org.apache.wicket.model.IModel; 5 | 6 | import fr.openwide.maven.artifact.notifier.web.application.common.behavior.AuthenticatedOnlyBehavior; 7 | 8 | public class AuthenticatedOnlyButton extends Button { 9 | 10 | private static final long serialVersionUID = -7586843919098210316L; 11 | 12 | public AuthenticatedOnlyButton(String id) { 13 | super(id); 14 | 15 | add(new AuthenticatedOnlyBehavior()); 16 | } 17 | 18 | public AuthenticatedOnlyButton(String id, IModel model) { 19 | super(id, model); 20 | 21 | add(new AuthenticatedOnlyBehavior()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/component/FooterPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | Smile 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/component/StatisticsPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/component/navigation/MavenArtifactNotifierBodyBreadCrumbPanel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.common.component.navigation; 2 | 3 | import java.util.Collection; 4 | import java.util.List; 5 | 6 | import org.apache.wicket.model.IModel; 7 | 8 | import fr.openwide.core.commons.util.functional.SerializablePredicate; 9 | import fr.openwide.core.wicket.more.markup.html.basic.EnclosureBehavior; 10 | import fr.openwide.core.wicket.more.markup.html.template.component.BodyBreadCrumbPanel; 11 | import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement; 12 | 13 | public class MavenArtifactNotifierBodyBreadCrumbPanel extends BodyBreadCrumbPanel { 14 | 15 | private static final long serialVersionUID = 3560734634512197550L; 16 | 17 | public MavenArtifactNotifierBodyBreadCrumbPanel(String id, 18 | IModel> prependedBreadCrumbElementsModel, 19 | IModel> breadCrumbElementsModel) { 20 | super(id, prependedBreadCrumbElementsModel, breadCrumbElementsModel); 21 | 22 | remove(this.getBehaviors(EnclosureBehavior.class).toArray(new EnclosureBehavior[0])); 23 | 24 | add(new EnclosureBehavior().model(new MoreThanOneElementPredicate(), breadCrumbElementsModel)); 25 | } 26 | 27 | private class MoreThanOneElementPredicate implements SerializablePredicate> { 28 | private static final long serialVersionUID = 6959237159408573L; 29 | 30 | @Override 31 | public boolean apply(Collection input) { 32 | return input != null && input.size() > 1; 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/model/EitherModel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.common.model; 2 | 3 | import org.apache.wicket.model.AbstractReadOnlyModel; 4 | import org.apache.wicket.model.IModel; 5 | 6 | public abstract class EitherModel extends AbstractReadOnlyModel { 7 | 8 | private static final long serialVersionUID = 5069343397373330352L; 9 | 10 | private final IModel firstModel; 11 | 12 | private final IModel secondModel; 13 | 14 | public EitherModel(IModel firstModel, IModel secondModel) { 15 | super(); 16 | this.firstModel = firstModel; 17 | this.secondModel = secondModel; 18 | } 19 | 20 | @Override 21 | public T getObject() { 22 | if (shouldGetFirstModel()) { 23 | return firstModel.getObject(); 24 | } else { 25 | return secondModel.getObject(); 26 | } 27 | } 28 | 29 | protected abstract boolean shouldGetFirstModel(); 30 | 31 | @Override 32 | public void detach() { 33 | super.detach(); 34 | firstModel.detach(); 35 | secondModel.detach(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/model/FollowingStats.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.common.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class FollowingStats implements Serializable { 6 | 7 | private static final long serialVersionUID = 2094739537159184340L; 8 | 9 | private Long userCount; 10 | 11 | private Long followedArtifactCount; 12 | 13 | public FollowingStats(Long userCount, Long followedArtifactCount) { 14 | this.userCount = userCount; 15 | this.followedArtifactCount = followedArtifactCount; 16 | } 17 | 18 | public Long getUserCount() { 19 | return userCount; 20 | } 21 | 22 | public void setUserCount(Long userCount) { 23 | this.userCount = userCount; 24 | } 25 | 26 | public Long getFollowedArtifactCount() { 27 | return followedArtifactCount; 28 | } 29 | 30 | public void setFollowedArtifactCount(Long followedArtifactCount) { 31 | this.followedArtifactCount = followedArtifactCount; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/model/FollowingStatsModel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.common.model; 2 | 3 | import org.apache.wicket.injection.Injector; 4 | import org.apache.wicket.model.LoadableDetachableModel; 5 | import org.apache.wicket.spring.injection.annot.SpringBean; 6 | 7 | import fr.openwide.maven.artifact.notifier.core.business.artifact.service.IFollowedArtifactService; 8 | import fr.openwide.maven.artifact.notifier.core.business.user.service.IUserService; 9 | 10 | public class FollowingStatsModel extends LoadableDetachableModel { 11 | 12 | private static final long serialVersionUID = -7823908580420416409L; 13 | 14 | @SpringBean 15 | private IUserService userService; 16 | 17 | @SpringBean 18 | private IFollowedArtifactService followedArtifactService; 19 | 20 | public FollowingStatsModel() { 21 | super(); 22 | Injector.get().inject(this); 23 | } 24 | 25 | @Override 26 | protected FollowingStats load() { 27 | return new FollowingStats(userService.count(), followedArtifactService.count()); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/favicon.ico -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/github-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/github-icon.png -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/google-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/google-icon.png -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/twitter-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/icons/twitter-icon.png -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/images/screenshot-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/images/screenshot-dashboard.png -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/StylesLessCssResourceReference.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.common.template.styles; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.wicket.markup.head.CssHeaderItem; 6 | import org.apache.wicket.markup.head.HeaderItem; 7 | import org.retzlaff.select2.resource.Select2CssResourceReference; 8 | 9 | import com.google.common.collect.Lists; 10 | 11 | import fr.openwide.core.wicket.more.css.lesscss.LessCssResourceReference; 12 | import fr.openwide.core.wicket.more.markup.html.template.css.bootstrap2.jqueryui.JQueryUiCssResourceReference; 13 | 14 | public final class StylesLessCssResourceReference extends LessCssResourceReference { 15 | 16 | private static final long serialVersionUID = -6024518060296236148L; 17 | 18 | private static final StylesLessCssResourceReference INSTANCE = new StylesLessCssResourceReference(); 19 | 20 | private StylesLessCssResourceReference() { 21 | super(StylesLessCssResourceReference.class, "styles.less"); 22 | } 23 | 24 | @Override 25 | public List getDependencies() { 26 | List dependencies = Lists.newArrayListWithExpectedSize(2); 27 | dependencies.add(CssHeaderItem.forReference(JQueryUiCssResourceReference.get())); 28 | dependencies.add(CssHeaderItem.forReference(Select2CssResourceReference.get())); 29 | return dependencies; 30 | } 31 | 32 | public static StylesLessCssResourceReference get() { 33 | return INSTANCE; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/administration.less: -------------------------------------------------------------------------------- 1 | .administration { 2 | 3 | .description { 4 | 5 | .control-label { 6 | font-weight: bold; 7 | } 8 | } 9 | } 10 | 11 | .check-item { 12 | width: 200px; 13 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/content-text.less: -------------------------------------------------------------------------------- 1 | .content-text { 2 | h2 { 3 | margin: 22px 0 10px 0; 4 | 5 | &:first-of-type { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | h3 { 11 | margin: 18px 0 10px 0; 12 | } 13 | 14 | h2 + h3 { 15 | margin-top: 0; 16 | } 17 | 18 | ul, ol { 19 | margin-left: 25px; 20 | } 21 | 22 | p:not(:first-child) { 23 | margin-top: 10px; 24 | } 25 | 26 | p + ul, 27 | p + ol { 28 | margin-top: 4px; 29 | } 30 | 31 | .content-insert { 32 | float: right; 33 | padding: 8px; 34 | border: 1px #EEEEEE solid; 35 | width: 100%; 36 | .box-sizing(border-box); 37 | 38 | .content-insert-title { 39 | font-weight: bold; 40 | } 41 | 42 | hr { 43 | margin: 5px 0; 44 | } 45 | 46 | p { 47 | margin-top: 5px; 48 | } 49 | 50 | p + ul, 51 | p + ol { 52 | margin-top: 2px; 53 | } 54 | } 55 | 56 | .content-insert + .content-insert { 57 | margin-top: 30px; 58 | } 59 | 60 | &.fat { 61 | &, ul, ol, li { 62 | font-size: 14px; 63 | line-height: 20px; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/dashboard.less: -------------------------------------------------------------------------------- 1 | .content.dashboard { 2 | .artifact-notification-day { 3 | .day { 4 | background: #F8F8F8; 5 | border-bottom: 1px solid #DDDDDD; 6 | padding: 4px 8px; 7 | color: #D35400; 8 | font-weight: bold; 9 | } 10 | 11 | .artifact-notification { 12 | line-height: 26px; 13 | padding: 0 15px; 14 | 15 | .artifact { 16 | padding-left: 10px; 17 | word-wrap: break-word; 18 | } 19 | 20 | .version-link { 21 | text-align: center; 22 | } 23 | 24 | &:hover { 25 | .row { 26 | background: #F4F4F4; 27 | } 28 | } 29 | } 30 | } 31 | 32 | .artifact-notification-day + .artifact-notification-day { 33 | margin-top: 8px; 34 | } 35 | 36 | .table.dashboard-artifact-list { 37 | th, td { 38 | &.group-id { 39 | width: 35%; 40 | max-width: 150px; 41 | } 42 | &.artifact-id { 43 | width: 35%; 44 | max-width: 130px; 45 | } 46 | &.artifact-version { 47 | width: 20%; 48 | max-width: 100px; 49 | } 50 | &.table-actions { 51 | width: 10%; 52 | } 53 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { 54 | font-size: 10px; 55 | } 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/footer.less: -------------------------------------------------------------------------------- 1 | .footer { 2 | background: #3B80FF; 3 | border-top: 1px solid #2C3E50; 4 | padding: 10px 15px; 5 | font-size: 1.2em 6 | .border-radius(0 0 5px 5px); 7 | 8 | .footer-links { 9 | line-height: 75px; 10 | color: white; 11 | 12 | a { 13 | color: white; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/forms.less: -------------------------------------------------------------------------------- 1 | form { 2 | margin-bottom: 18px; 3 | 4 | .input-group { 5 | margin-bottom: 0px; 6 | } 7 | } 8 | 9 | .input-group { 10 | margin-bottom: 18px; 11 | } 12 | 13 | .view-field { 14 | padding: 4px 0px; 15 | } 16 | 17 | .check-list { 18 | padding-top: 5px; 19 | width: 200px; 20 | 21 | .check-item { 22 | padding-bottom: 4px; 23 | 24 | .check-label { 25 | float:left; 26 | } 27 | 28 | .check-icon { 29 | float:right; 30 | } 31 | 32 | .check-input { 33 | float:right; 34 | } 35 | } 36 | } 37 | 38 | // Champs obligatoires 39 | .form-horizontal .form-group .control-label.required:before { 40 | content: "* "; 41 | color: #FF0000; 42 | } 43 | 44 | input:focus:invalid, 45 | textarea:focus:invalid, 46 | select:focus:invalid { 47 | color: #b94a48; 48 | border-color: #ee5f5b; 49 | &:focus { 50 | border-color: darken(#ee5f5b, 10%); 51 | @shadow: 0 0 6px lighten(#ee5f5b, 20%); 52 | .box-shadow(@shadow); 53 | } 54 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/modals.less: -------------------------------------------------------------------------------- 1 | // User/UserGroup update modal popup 2 | .modal-usergroup-form, 3 | .modal-user-form { 4 | min-width: 520px; 5 | 6 | input { 7 | width: 200px; 8 | } 9 | textarea { 10 | width: 350px; 11 | height: 80px; 12 | } 13 | select { 14 | width: 350px; 15 | } 16 | } 17 | 18 | .modal-artifact-deprecation { 19 | .modal-width(620px); 20 | } 21 | 22 | .modal-project-form { 23 | .modal-width(@modalStandard); 24 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/common/template/styles/variables.less: -------------------------------------------------------------------------------- 1 | // OWSI-Core 2 | @mainColor: #3498DB; 3 | @mainColorHighlight: #298edb; 4 | @footerBackground: #DDDDDD; 5 | @footerText: #666666; 6 | 7 | @inputFocusBorder: rgba(10,121,166,.7); 8 | @inputFocusBoxShadow: ~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(10,121,166,.6)"; 9 | 10 | // Variables Bootstrap 11 | @font-size-base: 12px; 12 | @line-height-base: 1.5; 13 | 14 | @grid-float-breakpoint: @screen-md-min; 15 | 16 | @import url('//fonts.googleapis.com/css?family=Open+Sans|Open+Sans+Condensed:300'); 17 | @font-family-sans-serif: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; 18 | 19 | @bodyBackground: #FFFFFF; 20 | 21 | @navbarBackground: #3498DB; 22 | @navbarBackgroundHighlight: lighten(#3498DB, 10%); 23 | @navbarBorder: darken(@navbarBackground, 12%); 24 | 25 | @navbarText: #FFF; 26 | @navbarLinkColor: #FFF; 27 | @navbarLinkColorHover: #666666; 28 | @navbarLinkColorActive: #D35400; 29 | @navbarLinkBackgroundHover: #DDDDDD; 30 | @navbarLinkBackgroundActive: #DDDDDD; 31 | 32 | @navbarBrandColor: @navbarLinkColor; 33 | 34 | @linkColor: @mainColor; 35 | @linkColorHover: darken(@linkColor, 10%); 36 | 37 | @btnPrimaryBackground: #888; 38 | @btnPrimaryBackgroundHighlight: #666; 39 | 40 | @dropdownLinkBackgroundHover: @mainColor; 41 | @dropdownLinkColorHover: #FFF; 42 | 43 | @modalStandard: 560px; 44 | @modalMedium: 800px; 45 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/config/spring/MavenArtifactNotifierWebappCacheConfig.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.config.spring; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.context.annotation.ImportResource; 5 | 6 | @Configuration 7 | @ImportResource({ "classpath:spring/cache-web-context.xml" }) 8 | public class MavenArtifactNotifierWebappCacheConfig { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/importation/page/ConsoleImportProjectPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 |
9 |
10 | ) 12 | 13 |
14 | 15 |
16 |
17 | 18 | 24 |
25 |
26 | 27 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/importation/page/resource/ProjectImportModelResourceReference.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.console.importation.page.resource; 2 | 3 | import org.apache.wicket.request.Url; 4 | import org.apache.wicket.request.resource.UrlResourceReference; 5 | 6 | public class ProjectImportModelResourceReference extends UrlResourceReference { 7 | 8 | private static final long serialVersionUID = 2262127218326542618L; 9 | 10 | private static final ProjectImportModelResourceReference INSTANCE = new ProjectImportModelResourceReference(); 11 | 12 | private ProjectImportModelResourceReference() { 13 | super(Url.parse("../../../static/console/import/project/resource/project-import-model.xls")); 14 | } 15 | 16 | public static ProjectImportModelResourceReference get() { 17 | return INSTANCE; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/importation/page/resource/project-import-model.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openwide-java/artifact-listener/ba6eaf2c75ae8e96d27ebccd1e8a28c4d3621dc9/maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/importation/page/resource/project-import-model.xls -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/importation/template/ConsoleImportTemplate.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.console.importation.template; 2 | 3 | import org.apache.wicket.request.mapper.parameter.PageParameters; 4 | 5 | import fr.openwide.core.wicket.more.console.template.ConsoleTemplate; 6 | import fr.openwide.maven.artifact.notifier.web.application.console.importation.page.ConsoleImportProjectPage; 7 | 8 | public abstract class ConsoleImportTemplate extends ConsoleTemplate { 9 | 10 | private static final long serialVersionUID = -3192604063259001201L; 11 | 12 | public ConsoleImportTemplate(PageParameters parameters) { 13 | super(parameters); 14 | 15 | addHeadPageTitleKey("console.import"); 16 | } 17 | 18 | @Override 19 | protected Class getMenuSectionPageClass() { 20 | return ConsoleImportProjectPage.class; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/page/ConfirmEmailHtmlNotificationDemoPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/page/ConfirmRegistrationHtmlNotificationDemoPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/page/ConsoleNotificationIndexPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/page/DeleteEmailHtmlNotificationDemoPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/page/NewVersionsAdditionalEmailHtmlNotificationDemoPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/page/NewVersionsHtmlNotificationDemoPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/page/ResetPasswordHtmlNotificationDemoPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/template/ConsoleNotificationTemplate.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.console.notification.template; 2 | 3 | import org.apache.wicket.request.mapper.parameter.PageParameters; 4 | 5 | import fr.openwide.core.wicket.more.console.template.ConsoleTemplate; 6 | import fr.openwide.maven.artifact.notifier.web.application.console.notification.page.ConsoleNotificationIndexPage; 7 | 8 | public abstract class ConsoleNotificationTemplate extends ConsoleTemplate { 9 | 10 | private static final long serialVersionUID = -3192604063259001201L; 11 | 12 | public ConsoleNotificationTemplate(PageParameters parameters) { 13 | super(parameters); 14 | } 15 | 16 | @Override 17 | protected Class getMenuSectionPageClass() { 18 | return ConsoleNotificationIndexPage.class; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/template/NotificationRendererTemplate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/console/notification/template/NotificationRendererTemplate.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.console.notification.template; 2 | 3 | import org.apache.wicket.MarkupContainer; 4 | import org.apache.wicket.behavior.AttributeAppender; 5 | import org.apache.wicket.markup.html.TransparentWebMarkupContainer; 6 | import org.apache.wicket.markup.html.WebPage; 7 | import org.apache.wicket.markup.html.basic.Label; 8 | import org.apache.wicket.model.ResourceModel; 9 | import org.apache.wicket.request.mapper.parameter.PageParameters; 10 | 11 | import fr.openwide.maven.artifact.notifier.web.application.MavenArtifactNotifierSession; 12 | 13 | public class NotificationRendererTemplate extends WebPage { 14 | 15 | private static final long serialVersionUID = -3192604063259001201L; 16 | 17 | public NotificationRendererTemplate(PageParameters parameters) { 18 | super(parameters); 19 | 20 | MarkupContainer htmlRootElement = new TransparentWebMarkupContainer("htmlRootElement"); 21 | htmlRootElement.add(AttributeAppender.append("lang", MavenArtifactNotifierSession.get().getLocale().getLanguage())); 22 | add(htmlRootElement); 23 | 24 | add(new Label("headPageTitle", new ResourceModel("console.notifications"))); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/component/DashboardNotificationListViewPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |

8 |
9 |
10 | 11 |
12 |
13 |
14 |
15 | 16 |
17 |
18 | 21 |
22 |
23 |
24 |
25 | 26 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/form/PasswordPatternValidator.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.form; 2 | 3 | import java.util.Collections; 4 | 5 | import org.apache.wicket.validation.IValidatable; 6 | import org.apache.wicket.validation.IValidationError; 7 | import org.apache.wicket.validation.ValidationError; 8 | import org.apache.wicket.validation.validator.PatternValidator; 9 | 10 | import fr.openwide.maven.artifact.notifier.core.business.user.model.User; 11 | 12 | public class PasswordPatternValidator extends PatternValidator { 13 | 14 | private static final long serialVersionUID = 315971574858314679L; 15 | 16 | private static final String PASSWORD_VALIDATION_PATTERN; 17 | 18 | static { 19 | PASSWORD_VALIDATION_PATTERN = ".{" + User.MIN_PASSWORD_LENGTH + "," + User.MAX_PASSWORD_LENGTH + "}"; 20 | } 21 | 22 | public PasswordPatternValidator() { 23 | super(PASSWORD_VALIDATION_PATTERN); 24 | } 25 | 26 | @Override 27 | protected IValidationError decorate(IValidationError error, IValidatable validatable) { 28 | ((ValidationError) error).setKeys(Collections.singletonList("register.password.malformed")); 29 | return error; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/link/convert/converters/ArtifactKeyToArtifactSpringConverter.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.link.convert.converters; 2 | 3 | import java.util.Collections; 4 | import java.util.Set; 5 | 6 | import org.springframework.core.convert.TypeDescriptor; 7 | import org.springframework.core.convert.converter.GenericConverter; 8 | 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 10 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactKey; 11 | import fr.openwide.maven.artifact.notifier.core.business.artifact.service.IArtifactService; 12 | 13 | /** 14 | * Converts an ArtifactKey to an artifact. 15 | */ 16 | public class ArtifactKeyToArtifactSpringConverter implements GenericConverter { 17 | 18 | private IArtifactService artifactService; 19 | 20 | public ArtifactKeyToArtifactSpringConverter(IArtifactService artifactService) { 21 | this.artifactService = artifactService; 22 | } 23 | 24 | @Override 25 | public Set getConvertibleTypes() { 26 | return Collections.singleton(new ConvertiblePair(ArtifactKey.class, Artifact.class)); 27 | } 28 | 29 | @Override 30 | public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { 31 | if (source == null) { 32 | return null; 33 | } 34 | if (!(source instanceof ArtifactKey)) { 35 | throw new IllegalStateException("Source must be an ArtifactKey"); 36 | } 37 | 38 | return artifactService.getByArtifactKey((ArtifactKey) source); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/link/convert/converters/ArtifactToStringSpringConverter.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.link.convert.converters; 2 | 3 | import java.util.Collections; 4 | import java.util.Set; 5 | 6 | import org.springframework.core.convert.TypeDescriptor; 7 | import org.springframework.core.convert.converter.GenericConverter; 8 | 9 | import fr.openwide.maven.artifact.notifier.core.business.artifact.model.Artifact; 10 | 11 | /** 12 | * Converts an Artifact to a String. 13 | */ 14 | public class ArtifactToStringSpringConverter implements GenericConverter { 15 | 16 | @Override 17 | public Set getConvertibleTypes() { 18 | return Collections.singleton(new ConvertiblePair(Artifact.class, String.class)); 19 | } 20 | 21 | @Override 22 | public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { 23 | if (source == null) { 24 | return null; 25 | } 26 | if (!(source instanceof Artifact)) { 27 | throw new IllegalStateException("Source must be an Artifact"); 28 | } 29 | 30 | return ((Artifact) source).getArtifactKey().getKey(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/link/convert/converters/ProjectToStringSpringConverter.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.link.convert.converters; 2 | 3 | import java.util.Collections; 4 | import java.util.Set; 5 | 6 | import org.springframework.core.convert.TypeDescriptor; 7 | import org.springframework.core.convert.converter.GenericConverter; 8 | 9 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 10 | 11 | /** 12 | * Converts a Project to a String. 13 | */ 14 | public class ProjectToStringSpringConverter implements GenericConverter { 15 | 16 | @Override 17 | public Set getConvertibleTypes() { 18 | return Collections.singleton(new ConvertiblePair(Project.class, String.class)); 19 | } 20 | 21 | @Override 22 | public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { 23 | if (source == null) { 24 | return null; 25 | } 26 | if (!(source instanceof Project)) { 27 | throw new IllegalStateException("Source must be an Project"); 28 | } 29 | 30 | return ((Project) source).getUri(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/link/convert/converters/StringToProjectSpringConverter.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.link.convert.converters; 2 | 3 | import java.util.Collections; 4 | import java.util.Set; 5 | 6 | import org.springframework.core.convert.TypeDescriptor; 7 | import org.springframework.core.convert.converter.GenericConverter; 8 | 9 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 10 | import fr.openwide.maven.artifact.notifier.core.business.project.service.IProjectService; 11 | 12 | /** 13 | * Converts a String (project uri) to a project. 14 | */ 15 | public class StringToProjectSpringConverter implements GenericConverter { 16 | 17 | private IProjectService projectService; 18 | 19 | public StringToProjectSpringConverter(IProjectService projectService) { 20 | this.projectService = projectService; 21 | } 22 | 23 | @Override 24 | public Set getConvertibleTypes() { 25 | return Collections.singleton(new ConvertiblePair(String.class, Project.class)); 26 | } 27 | 28 | @Override 29 | public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { 30 | if (source == null) { 31 | return null; 32 | } 33 | if (!(source instanceof String)) { 34 | throw new IllegalStateException("Source must be an String"); 35 | } 36 | 37 | return projectService.getByUri((String) source); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/link/service/MavenArtifactNotifierLinkParameterConversionService.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.link.service; 2 | 3 | import javax.annotation.PostConstruct; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | 7 | import fr.openwide.core.wicket.more.link.service.DefaultLinkParameterConversionService; 8 | import fr.openwide.maven.artifact.notifier.core.business.artifact.service.IArtifactService; 9 | import fr.openwide.maven.artifact.notifier.core.business.project.service.IProjectService; 10 | import fr.openwide.maven.artifact.notifier.web.application.navigation.link.convert.converters.ArtifactKeyToArtifactSpringConverter; 11 | import fr.openwide.maven.artifact.notifier.web.application.navigation.link.convert.converters.ProjectToStringSpringConverter; 12 | import fr.openwide.maven.artifact.notifier.web.application.navigation.link.convert.converters.StringToProjectSpringConverter; 13 | 14 | public class MavenArtifactNotifierLinkParameterConversionService extends DefaultLinkParameterConversionService { 15 | 16 | @Autowired 17 | private IArtifactService artifactService; 18 | 19 | @Autowired 20 | private IProjectService projectService; 21 | 22 | @Override 23 | @PostConstruct 24 | protected void initConverters() { 25 | addConverter(new ArtifactKeyToArtifactSpringConverter(artifactService)); 26 | 27 | addConverter(new StringToProjectSpringConverter(projectService)); 28 | addConverter(new ProjectToStringSpringConverter()); 29 | 30 | super.initConverters(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/AboutPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |
9 |
10 | 11 |
12 |
13 | 14 | 15 | 16 | 17 |
18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/AccessDeniedPage.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.page; 2 | 3 | import org.apache.wicket.request.mapper.parameter.PageParameters; 4 | 5 | import fr.openwide.maven.artifact.notifier.web.application.MavenArtifactNotifierSession; 6 | import fr.openwide.core.wicket.more.application.CoreWicketAuthenticatedApplication; 7 | import fr.openwide.core.wicket.more.markup.html.CoreWebPage; 8 | 9 | public class AccessDeniedPage extends CoreWebPage { 10 | 11 | private static final long serialVersionUID = 4583415457223655426L; 12 | 13 | public AccessDeniedPage() { 14 | super(new PageParameters()); 15 | } 16 | 17 | @Override 18 | protected void onInitialize() { 19 | super.onInitialize(); 20 | 21 | MavenArtifactNotifierSession.get().error(getString("access.denied")); 22 | redirect(CoreWicketAuthenticatedApplication.get().getSignInPageClass()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/DashboardPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |
9 |
10 | 11 |
12 |
13 |
14 |
15 | 16 |
17 |
18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/ForgottenPasswordPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |
9 |
10 |
11 | 12 |
13 |
14 | 15 | 16 | 20 | 21 |
22 |
23 |
24 |
25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/LoginSuccessPage.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.page; 2 | 3 | 4 | public class LoginSuccessPage extends AbstractLoginSuccessPage { 5 | 6 | private static final long serialVersionUID = -7329107409428194512L; 7 | 8 | public LoginSuccessPage() { 9 | } 10 | 11 | @Override 12 | protected void onInitialize() { 13 | super.onInitialize(); 14 | 15 | redirectToSavedPage(); 16 | } 17 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/Pac4jLoginSuccessPage.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.navigation.page; 2 | 3 | import fr.openwide.maven.artifact.notifier.web.application.MavenArtifactNotifierSession; 4 | 5 | public class Pac4jLoginSuccessPage extends AbstractLoginSuccessPage { 6 | 7 | private static final long serialVersionUID = -875304387617628398L; 8 | 9 | public Pac4jLoginSuccessPage() { 10 | } 11 | 12 | @Override 13 | protected void onInitialize() { 14 | super.onInitialize(); 15 | 16 | MavenArtifactNotifierSession.get().authenticatePac4j(); 17 | 18 | redirectToSavedPage(); 19 | } 20 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/RegisterPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/navigation/page/ViewProfilePage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 | 12 |

13 | 14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/behavior/StyleAttributeAppender.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.notification.behavior; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.apache.wicket.behavior.AttributeAppender; 6 | import org.apache.wicket.model.IModel; 7 | 8 | public class StyleAttributeAppender extends AttributeAppender { 9 | 10 | private static final long serialVersionUID = -1911156302254181459L; 11 | 12 | private static final String STYLE_ATTRIBUTE = "style"; 13 | 14 | public StyleAttributeAppender(IModel replaceModel) { 15 | super(STYLE_ATTRIBUTE, replaceModel); 16 | } 17 | 18 | public StyleAttributeAppender(Serializable value) { 19 | super(STYLE_ATTRIBUTE, value); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/AbstractHtmlNotificationPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

7 | 8 |

9 |
10 |

11 | 12 |

13 | 14 | 15 | 16 |
17 | 18 |
19 |
20 | 21 |
22 | 23 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/AbstractRegisteredEmailHtmlNotificationPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | . 10 |
11 |
12 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/ConfirmEmailHtmlNotificationPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |

8 | 9 |
10 |

11 | 12 |

13 | 14 | 15 | 16 | 17 |

18 |
19 |
20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/ConfirmRegistrationHtmlNotificationPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |

8 | 9 |
10 |

11 | 12 |

13 | 14 | 15 | 16 | 17 |

18 |
19 |
20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/CustomArtifactVersionTagPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/CustomArtifactVersionTagPanel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.notification.component; 2 | 3 | import org.apache.wicket.model.IModel; 4 | import org.apache.wicket.model.LoadableDetachableModel; 5 | 6 | import fr.openwide.maven.artifact.notifier.web.application.artifact.component.AbstractArtifactVersionTagPanel; 7 | 8 | public class CustomArtifactVersionTagPanel extends AbstractArtifactVersionTagPanel { 9 | 10 | private static final long serialVersionUID = 5430854844428861413L; 11 | 12 | private static final String STYLE_FINAL_VERSION_TAG = "padding: 2px 4px; background: #3498DB; color: #FFFFFF; display: inline-block; font-size: 12px; line-height: 14px; border-radius: 3px; vertical-align: baseline;"; 13 | 14 | private static final String STYLE_NON_FINAL_VERSION_TAG = "padding: 2px 4px; background: #F89456; color: #FFFFFF; display: inline-block; font-size: 12px; line-height: 14px; border-radius: 3px; vertical-align: baseline;"; 15 | 16 | public CustomArtifactVersionTagPanel(String id, IModel model) { 17 | super(id, model); 18 | IModel cssStyleModel = new LoadableDetachableModel() { 19 | private static final long serialVersionUID = 1L; 20 | 21 | @Override 22 | protected String load() { 23 | String version = getModelObject(); 24 | if (isFinalVersion(version)) { 25 | return STYLE_FINAL_VERSION_TAG; 26 | } 27 | return STYLE_NON_FINAL_VERSION_TAG; 28 | } 29 | }; 30 | 31 | add(new CustomLabel("latestVersion", model, cssStyleModel.getObject())); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/CustomLabel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.notification.component; 2 | 3 | import java.io.Serializable; 4 | 5 | import org.apache.wicket.markup.html.basic.Label; 6 | import org.apache.wicket.model.IModel; 7 | import org.apache.wicket.model.Model; 8 | 9 | import fr.openwide.maven.artifact.notifier.web.application.notification.behavior.StyleAttributeAppender; 10 | 11 | public class CustomLabel extends Label { 12 | 13 | private static final long serialVersionUID = 519232144606598731L; 14 | 15 | public CustomLabel(final String id, Serializable label, String style) { 16 | this(id, Model.of(label), style); 17 | } 18 | 19 | public CustomLabel(final String id, IModel model, String style) { 20 | super(id, model); 21 | add(new StyleAttributeAppender(style)); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/CustomWebMarkupContainer.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.notification.component; 2 | 3 | import org.apache.wicket.markup.html.WebMarkupContainer; 4 | 5 | import fr.openwide.maven.artifact.notifier.web.application.notification.behavior.StyleAttributeAppender; 6 | 7 | public class CustomWebMarkupContainer extends WebMarkupContainer { 8 | 9 | private static final long serialVersionUID = 3955262127059805260L; 10 | 11 | public CustomWebMarkupContainer(String id, String style) { 12 | super(id); 13 | add(new StyleAttributeAppender(style)); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/DeleteEmailHtmlNotificationPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |

8 | 9 |
10 |

11 | 12 |

13 | 14 |

15 | 16 | 17 | 18 | 19 |

20 |
21 |
22 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/NewVersionsHtmlNotificationPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | - 7 |

8 | 9 |
10 |

11 | 12 |

13 | 14 | 15 | 16 | 17 | 20 | 23 | 26 | 27 | 28 | 29 | 30 | 33 | 38 | 41 | 42 | 43 |
18 | 19 | 21 | 22 | 24 | 25 |
31 | 32 | 34 | 35 | 36 | 37 | 39 | 40 |
44 |
45 |
46 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/component/ResetPasswordHtmlNotificationPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |

8 | 9 |
10 |

11 | 12 |

13 | 14 | 15 | 16 | 17 |

18 |
19 |
20 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/page/ConfirmEmailNotificationPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |
9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/page/ConfirmRegistrationNotificationPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |
9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/notification/page/DeleteEmailNotificationPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 |
8 |
9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/component/ProjectArtifactsPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 |
9 | 10 | 11 | 12 |
13 | 17 | 19 |
20 |
21 | 22 |
23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 |
31 |
32 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/component/ProjectLinksPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

7 | 8 | 9 |
10 |
11 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/component/ProjectLinksPanel.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.project.component; 2 | 3 | import org.apache.wicket.model.IModel; 4 | 5 | import fr.openwide.core.wicket.markup.html.panel.GenericPanel; 6 | import fr.openwide.core.wicket.more.model.BindingModel; 7 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 8 | import fr.openwide.maven.artifact.notifier.core.util.binding.Binding; 9 | 10 | public class ProjectLinksPanel extends GenericPanel { 11 | 12 | private static final long serialVersionUID = -8479708798509150198L; 13 | 14 | public ProjectLinksPanel(String id, IModel projectModel) { 15 | super(id, projectModel); 16 | 17 | add(new ItemAdditionalInformationPanel("additionalInformationPanel", 18 | BindingModel.of(projectModel, Binding.project().additionalInformation()))); 19 | } 20 | 21 | @Override 22 | protected void onConfigure() { 23 | super.onConfigure(); 24 | setVisible( 25 | getModelObject().getAdditionalInformation().getWebsiteUrl() != null || 26 | getModelObject().getAdditionalInformation().getIssueTrackerUrl() != null || 27 | getModelObject().getAdditionalInformation().getScmUrl() != null || 28 | getModelObject().getAdditionalInformation().getChangelogUrl() != null || 29 | !getModelObject().getAdditionalInformation().getLicenses().isEmpty() 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/component/ProjectSearchPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 |
9 | 13 |
14 |
15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/component/ProjectSelect2AjaxAdapter.java: -------------------------------------------------------------------------------- 1 | package fr.openwide.maven.artifact.notifier.web.application.project.component; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.wicket.markup.html.form.IChoiceRenderer; 6 | import org.apache.wicket.spring.injection.annot.SpringBean; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | 10 | import com.google.common.collect.Lists; 11 | 12 | import fr.openwide.core.jpa.exception.ServiceException; 13 | import fr.openwide.core.wicket.more.markup.html.select2.AbstractLongIdGenericEntitySelect2AjaxAdapter; 14 | import fr.openwide.maven.artifact.notifier.core.business.project.model.Project; 15 | import fr.openwide.maven.artifact.notifier.core.business.project.service.IProjectService; 16 | 17 | public class ProjectSelect2AjaxAdapter extends AbstractLongIdGenericEntitySelect2AjaxAdapter { 18 | 19 | private static final long serialVersionUID = -2067969926451983702L; 20 | 21 | private static final Logger LOGGER = LoggerFactory.getLogger(ProjectSelect2AjaxAdapter.class); 22 | 23 | @SpringBean 24 | private IProjectService projectService; 25 | 26 | public ProjectSelect2AjaxAdapter(IChoiceRenderer choiceRenderer) { 27 | super(Project.class, choiceRenderer); 28 | } 29 | 30 | @Override 31 | public List getChoices(int start, int count, String term) { 32 | try { 33 | return projectService.searchAutocomplete(term, count, start); 34 | } catch (ServiceException e) { 35 | LOGGER.error("Error while searching for projects"); 36 | return Lists.newArrayListWithExpectedSize(0); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/form/ProjectVersionFormPopupPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 |
9 | 10 |
11 | 13 |
14 |
15 |
16 | 17 | 18 |
19 |
20 | 24 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/form/VersionAdditionalInformationFormComponentPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 |
8 | 10 |
11 |
12 |
13 | 14 |
15 | 17 |
18 |
19 |
20 | 21 |
22 | 24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/java/fr/openwide/maven/artifact/notifier/web/application/project/page/ProjectListPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

6 | 7 | 8 | 9 | 10 | 11 |

12 | 13 | 14 |
15 | 16 |
17 |
18 |
19 |
20 | 21 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/ehcache/ehcache-cache-web.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/artifact_version_notification.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>New releases - ${.now?date?iso_local} 3 | 4 | <#if BODY_TEXT!false> 5 | Hello, 6 | 7 | New releases have been deployed on Maven Central: 8 | 9 | <#list notifications as notification> 10 | <#assign uniqueId = notification.artifactVersion.artifact.group.groupId + ':' + notification.artifactVersion.artifact.artifactId> 11 | * ${uniqueId} - ${notification.artifactVersion.version} 12 | 13 | 14 | If you want to configure your notifications, sign in and change your settings on: 15 | ${unsubscribeUrl} 16 | 17 | -- 18 | artifact listener 19 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/artifact_version_notification_fr.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Nouvelles versions - ${.now?date?iso_local} 3 | 4 | <#if BODY_TEXT!false> 5 | Bonjour, 6 | 7 | De nouvelles versions ont été déployées sur Maven Central : 8 | 9 | <#list notifications as notification> 10 | <#assign uniqueId = notification.artifactVersion.artifact.group.groupId + ':' + notification.artifactVersion.artifact.artifactId> 11 | * ${uniqueId} - ${notification.artifactVersion.version} 12 | 13 | 14 | Si vous ne souhaitez plus recevoir de notifications par mail, vous pouvez vous désabonner à l'adresse suivante : 15 | ${unsubscribeUrl} 16 | 17 | -- 18 | artifact listener 19 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/confirm_email_notification.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Email confirmation 3 | 4 | <#if BODY_TEXT!false> 5 | Hello, 6 | 7 | ${email.user.displayName} has added your email address as an additional notification address on our artifact listener service. 8 | 9 | In order to confirm that you are actually interested in these notifications, please click on the following link: 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/confirm_email_notification_fr.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Confirmation 3 | 4 | <#if BODY_TEXT!false> 5 | Bonjour, 6 | 7 | ${email.user.displayName} a ajouté votre adresse email comme adresse de notification supplémentaire sur notre service artifact listener. 8 | 9 | Afin de confirmer que vous êtes effectivement intéressé par ces notifications, veuillez cliquer sur le lien suivant : 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/confirm_registration_notification.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Account registration confirmation 3 | 4 | <#if BODY_TEXT!false> 5 | Hello, 6 | 7 | You have created the account ${user.userName} on our artifact listener service. 8 | 9 | In order to validate your account, please click on the following link: 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/confirm_registration_notification_fr.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Confirmation d'inscription 3 | 4 | <#if BODY_TEXT!false> 5 | Bonjour, 6 | 7 | Vous avez créé le compte ${user.userName} sur notre service artifact listener. 8 | 9 | Afin de valider ce compte, veuillez cliquer sur le lien suivant : 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/delete_email_notification.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Confirmation 3 | 4 | <#if BODY_TEXT!false> 5 | Hello, 6 | 7 | You have expressed your wish to no longer receive our notifications on this email address. 8 | 9 | In order to confirm this application, please click on the following link: 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/delete_email_notification_fr.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Confirmation 3 | 4 | <#if BODY_TEXT!false> 5 | Bonjour, 6 | 7 | Vous nous avez fait part de votre souhait de ne plus recevoir de notifications sur cette adresse email. 8 | 9 | Afin de valider cette demande, veuillez cliquer sur le lien suivant : 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/reset_password_notification.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Password reset request 3 | 4 | <#if BODY_TEXT!false> 5 | Hello, 6 | 7 | You recently requested to reset your artifact listener password. 8 | 9 | To complete your request, please click on the following link: 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /maven-artifact-notifier-webapp/src/main/resources/notification/reset_password_notification_fr.ftl: -------------------------------------------------------------------------------- 1 | <#ftl strip_text=true> 2 | <#if SUBJECT!false>Réinitialisation de mot de passe 3 | 4 | <#if BODY_TEXT!false> 5 | Bonjour, 6 | 7 | Vous avez récemment demandé une réinitialisation du mot de passe de votre compte sur notre service artifact listener. 8 | 9 | Afin de compléter cette demande, veuillez cliquer sur le lien suivant : 10 | ${url} 11 | 12 | -- 13 | artifact listener 14 | -------------------------------------------------------------------------------- /travis/postgresql.sql: -------------------------------------------------------------------------------- 1 | CREATE USER maven_artifact_notifier_test WITH PASSWORD 'maven_artifact_notifier_test'; 2 | 3 | CREATE DATABASE maven_artifact_notifier_test WITH OWNER maven_artifact_notifier_test; 4 | --------------------------------------------------------------------------------