├── .editorconfig ├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ ├── dependencies-diff.yml │ ├── deploy.yml │ ├── integration-tests-h2.yml │ ├── integration-tests-mysql.yml │ ├── integration-tests-postgres.yml │ ├── populate-maven-cache.yml │ ├── provision-by-ansible.yml │ ├── provision-by-terraform.yml │ ├── static-analysis.yml │ ├── todos-extract-from-code.yml │ ├── todos-handle-issue-changes.yml │ └── unit-tests.yml ├── .gitignore ├── .mvn └── jvm.config ├── LICENSE.txt ├── NEWS.txt ├── README.md ├── docs ├── decisions-log.md ├── diagrams │ └── all-use-cases.puml ├── external-dependencies.md ├── import-series-flow.md ├── robotframework.md ├── use-cases.md └── wiremock.md ├── infra ├── ansible │ ├── bootstrap.yml │ ├── coder_rsa.enc │ ├── mise.toml │ ├── playbook.yml │ ├── prod.inventory │ ├── prod.yml │ ├── requirements.galaxy.yml │ ├── roles │ │ ├── mystamps-app │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── files │ │ │ │ └── mystamps.service │ │ │ ├── handlers │ │ │ │ └── main.yml │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ └── templates │ │ │ │ ├── application-prod.properties │ │ │ │ ├── mystamps-send-logs │ │ │ │ └── mystamps.conf │ │ ├── mystamps-backup │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ └── templates │ │ │ │ ├── my.cnf │ │ │ │ ├── mystamps-backup-db │ │ │ │ ├── mystamps-backup-remote │ │ │ │ └── remote-backup.sh │ │ ├── mystamps-nginx │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── files │ │ │ │ └── test │ │ │ │ │ ├── my-stamps.ru.crt │ │ │ │ │ └── my-stamps.ru.key │ │ │ ├── handlers │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ └── mystamps-user │ │ │ └── tasks │ │ │ └── main.yml │ └── vars │ │ └── prod.yml.enc ├── docker │ ├── .dockerignore │ ├── .env │ ├── Dockerfile │ ├── README.md │ ├── docker-compose.yml │ ├── local-data.yml │ ├── postgres.yml │ └── prod.yml ├── kubernetes │ ├── deployment.yml │ └── service.yml └── terraform │ ├── .terraform.lock.hcl │ ├── README.md │ ├── mise.toml │ ├── my-stamps.tf │ ├── terraform.tfvars.example │ └── versions.tf ├── mise.toml ├── pom.xml └── src ├── lombok.config ├── main ├── config │ ├── license_header.txt │ └── nginx │ │ ├── 503.en.html │ │ ├── 503.ru.html │ │ ├── mystamps-http.conf │ │ ├── mystamps-ssl.conf │ │ └── mystamps-static.conf ├── frontend │ ├── .npmrc │ ├── babel.config.js │ ├── jest.config.js │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── AddCatalogPriceForm.js │ │ │ ├── AddReleaseYearForm.js │ │ │ ├── HideImageForm.js │ │ │ ├── SeriesSaleImportForm.js │ │ │ ├── SeriesSalesList.js │ │ │ └── SimilarSeriesForm.js │ │ └── utils │ │ │ ├── CatalogUtils.js │ │ │ ├── CatalogUtils.test.js │ │ │ ├── DateUtils.js │ │ │ └── DateUtils.test.js │ └── webpack.config.js ├── java │ └── ru │ │ └── mystamps │ │ └── web │ │ ├── common │ │ ├── ControllerUtils.java │ │ ├── Currency.java │ │ ├── EntityWithParentDto.java │ │ ├── JdbcUtils.java │ │ ├── LinkEntityDto.java │ │ ├── LocaleUtils.java │ │ ├── Pager.java │ │ ├── RowMappers.java │ │ ├── SitemapInfoDto.java │ │ ├── SlugUtils.java │ │ └── package-info.java │ │ ├── config │ │ ├── ApplicationContext.java │ │ ├── DaoConfig.java │ │ ├── DispatcherServletContext.java │ │ ├── MvcConfig.java │ │ ├── ServicesConfig.java │ │ ├── TaskExecutorConfig.java │ │ └── package-info.java │ │ ├── feature │ │ ├── account │ │ │ ├── AccountConfig.java │ │ │ ├── AccountController.java │ │ │ ├── AccountDb.java │ │ │ ├── AccountUrl.java │ │ │ ├── AccountValidation.java │ │ │ ├── ActivateAccountDto.java │ │ │ ├── ActivateAccountForm.java │ │ │ ├── AddUserDbDto.java │ │ │ ├── AddUsersActivationDbDto.java │ │ │ ├── ExistingActivationKey.java │ │ │ ├── ExistingActivationKeyValidator.java │ │ │ ├── JdbcUserDao.java │ │ │ ├── JdbcUsersActivationDao.java │ │ │ ├── RegisterAccountDto.java │ │ │ ├── RegisterAccountForm.java │ │ │ ├── RowMappers.java │ │ │ ├── SendUsersActivationDto.java │ │ │ ├── UniqueLogin.java │ │ │ ├── UniqueLoginValidator.java │ │ │ ├── UserDao.java │ │ │ ├── UserDetails.java │ │ │ ├── UserService.java │ │ │ ├── UserServiceImpl.java │ │ │ ├── UsersActivationDao.java │ │ │ ├── UsersActivationDto.java │ │ │ ├── UsersActivationFullDto.java │ │ │ ├── UsersActivationService.java │ │ │ ├── UsersActivationServiceImpl.java │ │ │ └── package-info.java │ │ ├── category │ │ │ ├── AddCategoryDbDto.java │ │ │ ├── AddCategoryDto.java │ │ │ ├── AddCategoryForm.java │ │ │ ├── ApiCategoryService.java │ │ │ ├── Category.java │ │ │ ├── CategoryConfig.java │ │ │ ├── CategoryController.java │ │ │ ├── CategoryDao.java │ │ │ ├── CategoryDb.java │ │ │ ├── CategoryLinkEntityDtoConverter.java │ │ │ ├── CategoryService.java │ │ │ ├── CategoryServiceImpl.java │ │ │ ├── CategoryUrl.java │ │ │ ├── CategoryValidation.java │ │ │ ├── JdbcCategoryDao.java │ │ │ ├── SuggestionController.java │ │ │ ├── TogglzWithFallbackCategoryService.java │ │ │ ├── UniqueCategoryName.java │ │ │ ├── UniqueCategoryNameValidator.java │ │ │ ├── UniqueCategorySlug.java │ │ │ ├── UniqueCategorySlugValidator.java │ │ │ └── package-info.java │ │ ├── collection │ │ │ ├── AddCollectionDbDto.java │ │ │ ├── AddToCollectionDbDto.java │ │ │ ├── AddToCollectionDto.java │ │ │ ├── AddToCollectionForm.java │ │ │ ├── CollectionConfig.java │ │ │ ├── CollectionController.java │ │ │ ├── CollectionDao.java │ │ │ ├── CollectionInfoDto.java │ │ │ ├── CollectionService.java │ │ │ ├── CollectionServiceImpl.java │ │ │ ├── CollectionUrl.java │ │ │ ├── JdbcCollectionDao.java │ │ │ ├── MaxNumberOfStamps.java │ │ │ ├── MaxNumberOfStampsValidator.java │ │ │ ├── RowMappers.java │ │ │ ├── SeriesInCollectionDto.java │ │ │ ├── SeriesInCollectionWithPriceDto.java │ │ │ └── package-info.java │ │ ├── country │ │ │ ├── AddCountryDbDto.java │ │ │ ├── AddCountryDto.java │ │ │ ├── AddCountryForm.java │ │ │ ├── ApiCountryService.java │ │ │ ├── Country.java │ │ │ ├── CountryConfig.java │ │ │ ├── CountryController.java │ │ │ ├── CountryDao.java │ │ │ ├── CountryDb.java │ │ │ ├── CountryLinkEntityDtoConverter.java │ │ │ ├── CountryService.java │ │ │ ├── CountryServiceImpl.java │ │ │ ├── CountryUrl.java │ │ │ ├── CountryValidation.java │ │ │ ├── JdbcCountryDao.java │ │ │ ├── SuggestionController.java │ │ │ ├── TogglzWithFallbackCountryService.java │ │ │ ├── UniqueCountryName.java │ │ │ ├── UniqueCountryNameValidator.java │ │ │ ├── UniqueCountrySlug.java │ │ │ ├── UniqueCountrySlugValidator.java │ │ │ └── package-info.java │ │ ├── image │ │ │ ├── AddImageDataDbDto.java │ │ │ ├── CreateImagePreviewException.java │ │ │ ├── DatabaseImagePersistenceStrategy.java │ │ │ ├── FilesystemImagePersistenceStrategy.java │ │ │ ├── ImageConfig.java │ │ │ ├── ImageController.java │ │ │ ├── ImageDao.java │ │ │ ├── ImageDataDao.java │ │ │ ├── ImageDb.java │ │ │ ├── ImageDto.java │ │ │ ├── ImageInfoDto.java │ │ │ ├── ImagePersistenceException.java │ │ │ ├── ImagePersistenceStrategy.java │ │ │ ├── ImagePreviewStrategy.java │ │ │ ├── ImageService.java │ │ │ ├── ImageServiceImpl.java │ │ │ ├── ImageUrl.java │ │ │ ├── ImageValidation.java │ │ │ ├── JdbcImageDao.java │ │ │ ├── JdbcImageDataDao.java │ │ │ ├── ReplaceImageDataDbDto.java │ │ │ ├── RowMappers.java │ │ │ ├── ThumbnailatorImagePreviewStrategy.java │ │ │ ├── TimedImagePreviewStrategy.java │ │ │ └── package-info.java │ │ ├── participant │ │ │ ├── AddParticipantDbDto.java │ │ │ ├── AddParticipantDto.java │ │ │ ├── AddParticipantForm.java │ │ │ ├── EntityWithIdDto.java │ │ │ ├── JdbcParticipantDao.java │ │ │ ├── ParticipantConfig.java │ │ │ ├── ParticipantController.java │ │ │ ├── ParticipantDao.java │ │ │ ├── ParticipantDb.java │ │ │ ├── ParticipantService.java │ │ │ ├── ParticipantServiceImpl.java │ │ │ ├── ParticipantUrl.java │ │ │ ├── ParticipantValidation.java │ │ │ ├── RowMappers.java │ │ │ └── package-info.java │ │ ├── report │ │ │ ├── AdminDailyReport.java │ │ │ ├── ReportConfig.java │ │ │ ├── ReportController.java │ │ │ ├── ReportService.java │ │ │ ├── ReportServiceImpl.java │ │ │ ├── ReportUrl.java │ │ │ └── package-info.java │ │ ├── series │ │ │ ├── AddCatalogNumbersForm.java │ │ │ ├── AddCatalogPriceDbDto.java │ │ │ ├── AddCommentDbDto.java │ │ │ ├── AddCommentForm.java │ │ │ ├── AddImageDto.java │ │ │ ├── AddImageForm.java │ │ │ ├── AddReleaseYearDbDto.java │ │ │ ├── AddSeriesDbDto.java │ │ │ ├── AddSeriesDto.java │ │ │ ├── AddSeriesForm.java │ │ │ ├── AddSimilarSeriesDto.java │ │ │ ├── AddSimilarSeriesForm.java │ │ │ ├── ByteArrayMultipartFile.java │ │ │ ├── CatalogInfoDto.java │ │ │ ├── CatalogNumbers.java │ │ │ ├── CatalogNumbersValidator.java │ │ │ ├── CatalogUtils.java │ │ │ ├── DownloadImageInterceptor.java │ │ │ ├── DownloadResult.java │ │ │ ├── DownloaderService.java │ │ │ ├── HasImageOrImageUrl.java │ │ │ ├── HtmxSeriesController.java │ │ │ ├── HttpURLConnectionDownloaderService.java │ │ │ ├── JdbcSeriesDao.java │ │ │ ├── JdbcSeriesImageDao.java │ │ │ ├── JdbcStampsCatalogDao.java │ │ │ ├── ModifySeriesImageForm.java │ │ │ ├── NullableImageUrl.java │ │ │ ├── ReleaseDateIsNotInFuture.java │ │ │ ├── ReleaseDateIsNotInFutureValidator.java │ │ │ ├── ReplaceImageDto.java │ │ │ ├── RequireImageOrImageUrl.java │ │ │ ├── RequireImageOrImageUrlValidator.java │ │ │ ├── RestSeriesController.java │ │ │ ├── RowMappers.java │ │ │ ├── SelectItem.java │ │ │ ├── SelectOption.java │ │ │ ├── SeriesConfig.java │ │ │ ├── SeriesController.java │ │ │ ├── SeriesDao.java │ │ │ ├── SeriesDb.java │ │ │ ├── SeriesDto.java │ │ │ ├── SeriesFullInfoDto.java │ │ │ ├── SeriesImageDao.java │ │ │ ├── SeriesImageService.java │ │ │ ├── SeriesImageServiceImpl.java │ │ │ ├── SeriesInGalleryDto.java │ │ │ ├── SeriesInfoDto.java │ │ │ ├── SeriesLinkDto.java │ │ │ ├── SeriesService.java │ │ │ ├── SeriesServiceImpl.java │ │ │ ├── SeriesUrl.java │ │ │ ├── SeriesValidation.java │ │ │ ├── StampsCatalog.java │ │ │ ├── StampsCatalogDao.java │ │ │ ├── StampsCatalogService.java │ │ │ ├── StampsCatalogServiceImpl.java │ │ │ ├── TimedDownloaderService.java │ │ │ ├── importing │ │ │ │ ├── AddSeriesParsedDataDbDto.java │ │ │ │ ├── ExpandCatalogNumbersEditor.java │ │ │ │ ├── HasSiteParser.java │ │ │ │ ├── HasSiteParserValidator.java │ │ │ │ ├── ImportRequestDto.java │ │ │ │ ├── ImportRequestFullInfo.java │ │ │ │ ├── ImportRequestInfo.java │ │ │ │ ├── ImportSellerForm.java │ │ │ │ ├── ImportSeriesDbDto.java │ │ │ │ ├── ImportSeriesForm.java │ │ │ │ ├── ImportSeriesFormTrimmerFilter.java │ │ │ │ ├── ImportSeriesSalesForm.java │ │ │ │ ├── JdbcSeriesImportDao.java │ │ │ │ ├── RawParsedDataDto.java │ │ │ │ ├── RequestImportDto.java │ │ │ │ ├── RequestSeriesImportForm.java │ │ │ │ ├── RowMappers.java │ │ │ │ ├── SeriesExtractedInfo.java │ │ │ │ ├── SeriesImportConfig.java │ │ │ │ ├── SeriesImportController.java │ │ │ │ ├── SeriesImportDao.java │ │ │ │ ├── SeriesImportDb.java │ │ │ │ ├── SeriesImportService.java │ │ │ │ ├── SeriesImportServiceImpl.java │ │ │ │ ├── SeriesImportUrl.java │ │ │ │ ├── SeriesImportValidation.java │ │ │ │ ├── SeriesInfoExtractorService.java │ │ │ │ ├── SeriesInfoExtractorServiceImpl.java │ │ │ │ ├── SeriesParsedDataDto.java │ │ │ │ ├── TimedSeriesInfoExtractorService.java │ │ │ │ ├── UpdateImportRequestStatusDbDto.java │ │ │ │ ├── event │ │ │ │ │ ├── DownloadingSucceeded.java │ │ │ │ │ ├── DownloadingSucceededEventListener.java │ │ │ │ │ ├── EventsConfig.java │ │ │ │ │ ├── ImportRequestCreated.java │ │ │ │ │ ├── ImportRequestCreatedEventListener.java │ │ │ │ │ ├── ParsingFailed.java │ │ │ │ │ ├── ParsingFailedEventListener.java │ │ │ │ │ ├── RetryDownloading.java │ │ │ │ │ ├── RetryDownloadingEventListener.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── extractor │ │ │ │ │ ├── JdbcSiteParserDao.java │ │ │ │ │ ├── JsoupSiteParser.java │ │ │ │ │ ├── SeriesInfo.java │ │ │ │ │ ├── SiteParser.java │ │ │ │ │ ├── SiteParserConfiguration.java │ │ │ │ │ ├── SiteParserDao.java │ │ │ │ │ ├── SiteParserService.java │ │ │ │ │ ├── SiteParserServiceImpl.java │ │ │ │ │ ├── TimedSiteParser.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ └── sale │ │ │ │ │ ├── JdbcSeriesSalesImportDao.java │ │ │ │ │ ├── RequestSeriesSaleImportForm.java │ │ │ │ │ ├── RowMappers.java │ │ │ │ │ ├── SeriesSaleExtractedInfo.java │ │ │ │ │ ├── SeriesSaleImportController.java │ │ │ │ │ ├── SeriesSaleParsedDataDto.java │ │ │ │ │ ├── SeriesSalesImportConfig.java │ │ │ │ │ ├── SeriesSalesImportDao.java │ │ │ │ │ ├── SeriesSalesImportService.java │ │ │ │ │ ├── SeriesSalesImportServiceImpl.java │ │ │ │ │ ├── SeriesSalesImportUrl.java │ │ │ │ │ ├── SeriesSalesParsedDataDbDto.java │ │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── sale │ │ │ │ ├── AddSeriesSalesDbDto.java │ │ │ │ ├── AddSeriesSalesDto.java │ │ │ │ ├── AddSeriesSalesForm.java │ │ │ │ ├── JdbcSeriesSalesDao.java │ │ │ │ ├── RowMappers.java │ │ │ │ ├── SeriesCondition.java │ │ │ │ ├── SeriesSaleDto.java │ │ │ │ ├── SeriesSalesConfig.java │ │ │ │ ├── SeriesSalesDao.java │ │ │ │ ├── SeriesSalesDb.java │ │ │ │ ├── SeriesSalesService.java │ │ │ │ ├── SeriesSalesServiceImpl.java │ │ │ │ ├── SeriesSalesValidation.java │ │ │ │ └── package-info.java │ │ └── site │ │ │ ├── AddSuspiciousActivityDbDto.java │ │ │ ├── CronService.java │ │ │ ├── CronServiceImpl.java │ │ │ ├── CspController.java │ │ │ ├── ErrorController.java │ │ │ ├── JdbcSuspiciousActivityDao.java │ │ │ ├── MailService.java │ │ │ ├── MailServiceImpl.java │ │ │ ├── ResourceUrl.java │ │ │ ├── RobotsTxtController.java │ │ │ ├── RowMappers.java │ │ │ ├── SiteConfig.java │ │ │ ├── SiteController.java │ │ │ ├── SiteDb.java │ │ │ ├── SiteService.java │ │ │ ├── SiteServiceImpl.java │ │ │ ├── SiteUrl.java │ │ │ ├── SitemapController.java │ │ │ ├── SuspiciousActivityDao.java │ │ │ ├── SuspiciousActivityDto.java │ │ │ ├── SuspiciousActivityService.java │ │ │ ├── SuspiciousActivityServiceImpl.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ └── support │ │ ├── beanvalidation │ │ ├── BothOrNoneRequired.java │ │ ├── BothOrNoneRequiredValidator.java │ │ ├── ConstraintViolationUtils.java │ │ ├── DenyValues.java │ │ ├── DenyValuesValidator.java │ │ ├── FieldsMatch.java │ │ ├── FieldsMatchValidator.java │ │ ├── FieldsMismatch.java │ │ ├── FieldsMismatchValidator.java │ │ ├── Group.java │ │ ├── ImageFile.java │ │ ├── ImageFileValidator.java │ │ ├── MaxFileSize.java │ │ ├── MaxFileSizeValidator.java │ │ ├── NotEmptyFile.java │ │ ├── NotEmptyFileValidator.java │ │ ├── NotEmptyFilename.java │ │ ├── NotEmptyFilenameValidator.java │ │ ├── NotNullIfFirstField.java │ │ ├── NotNullIfFirstFieldValidator.java │ │ ├── Price.java │ │ └── package-info.java │ │ ├── liquibase │ │ ├── LiquibaseSupport.java │ │ └── package-info.java │ │ ├── mailgun │ │ ├── ApiMailgunEmailSendingStrategy.java │ │ ├── EmailSendingException.java │ │ ├── MailgunEmail.java │ │ ├── MailgunEmailSendingStrategy.java │ │ └── package-info.java │ │ ├── spring │ │ ├── boot │ │ │ ├── ApplicationBootstrap.java │ │ │ ├── ErrorPagesCustomizer.java │ │ │ ├── JettyWebServerFactoryCustomizer.java │ │ │ ├── ThymeleafViewResolverInitializingBean.java │ │ │ └── package-info.java │ │ ├── jdbc │ │ │ ├── MapIntegerIntegerResultSetExtractor.java │ │ │ ├── MapStringIntegerResultSetExtractor.java │ │ │ ├── MapStringStringResultSetExtractor.java │ │ │ └── package-info.java │ │ ├── mvc │ │ │ ├── BigDecimalConverter.java │ │ │ ├── PatchRequest.java │ │ │ ├── ReplaceRepeatingSpacesEditor.java │ │ │ ├── RestExceptionHandler.java │ │ │ ├── ValidationErrors.java │ │ │ └── package-info.java │ │ └── security │ │ │ ├── AuthenticationFailureListener.java │ │ │ ├── Authority.java │ │ │ ├── ContentSecurityPolicyHeaderWriter.java │ │ │ ├── CustomUserDetails.java │ │ │ ├── CustomUserDetailsService.java │ │ │ ├── HasAuthority.java │ │ │ ├── LogCsrfEventAndShow403PageForAccessDenied.java │ │ │ ├── SecurityConfig.java │ │ │ ├── SecurityContextUtils.java │ │ │ ├── SessionLocaleResolverAwareFilter.java │ │ │ ├── StringAuthority.java │ │ │ ├── UserMdcLoggingFilter.java │ │ │ └── package-info.java │ │ ├── thymeleaf │ │ ├── GroupByParent.java │ │ └── package-info.java │ │ └── togglz │ │ ├── Features.java │ │ ├── TogglzConfig.java │ │ └── package-info.java ├── javascript │ ├── collection │ │ └── info.js │ ├── participant │ │ └── add.js │ └── series │ │ ├── add.js │ │ └── info.js ├── resources │ ├── application-postgres.properties │ ├── application-test.properties │ ├── application-travis.properties │ ├── application.properties │ ├── liquibase │ │ ├── changelog.xml │ │ ├── initial-state.xml │ │ ├── sql │ │ │ ├── test-country-italy.sql │ │ │ ├── test-hash-from-sha1-to-bcrypt.sql │ │ │ ├── test-series-with-catalogs-numbers.sql │ │ │ ├── test-user-admin.sql │ │ │ ├── test-user-coder.sql │ │ │ └── test-users-activations.sql │ │ ├── test-data.xml │ │ ├── test-data │ │ │ ├── collections_series.xml │ │ │ ├── series_import_parsed_data.xml │ │ │ ├── series_import_parsed_image_urls.xml │ │ │ ├── series_import_requests.xml │ │ │ ├── series_sales_import_parsed_data.xml │ │ │ └── transaction_participants.xml │ │ └── version │ │ │ ├── 0.3.xml │ │ │ ├── 0.3 │ │ │ ├── 2014-02-11--categories.xml │ │ │ ├── 2014-05-28--release_month_and_day.xml │ │ │ ├── 2014-06-12--ru_country_name.xml │ │ │ ├── 2014-08-16--users_activation_lang.xml │ │ │ ├── 2014-08-30--collections.xml │ │ │ ├── 2014-09-17--category_slug.xml │ │ │ ├── 2014-09-17--country_slug.xml │ │ │ └── 2014-09-28--collection_slug.xml │ │ │ ├── 0.4.1.xml │ │ │ ├── 0.4.1 │ │ │ ├── 2019-07-21--series_sales_transaction_url_length.xml │ │ │ ├── 2019-08-06--test_user_with_series_in_collection.xml │ │ │ └── 2019-08-31--test_similar_series.xml │ │ │ ├── 0.4.2.xml │ │ │ ├── 0.4.2 │ │ │ ├── 2019-11-17--drop_unique_series_from_collection.xml │ │ │ └── 2019-11-27--add_collections_series_id.xml │ │ │ ├── 0.4.3.xml │ │ │ ├── 0.4.3 │ │ │ ├── 2020-03-07--site_parser_params_value_length.xml │ │ │ ├── 2020-03-08--add_alt_price_to_series_sales_import_parsed_data.xml │ │ │ ├── 2020-03-11--cleanup_togglz_features.xml │ │ │ ├── 2020-03-11--fix-nullable-series_import_requests-url.xml │ │ │ ├── 2020-03-12--michel_catalog_code_length.xml │ │ │ └── 2020-03-21--add_release_day_to_series_import_parsed_data.xml │ │ │ ├── 0.4.4.xml │ │ │ ├── 0.4.4 │ │ │ ├── 2020-05-02--hidden_series_images.xml │ │ │ ├── 2020-05-04--collections_series_condition.xml │ │ │ ├── 2020-05-04--series_sale_condition.xml │ │ │ ├── 2020-05-23--modify_condition_field.xml │ │ │ ├── 2020-06-01--yvert_code_length.xml │ │ │ └── 2020-06-03--series_sales_import_parsed_data_condition.xml │ │ │ ├── 0.4.5.xml │ │ │ ├── 0.4.5 │ │ │ └── 2020-08-21--series_comment_length.xml │ │ │ ├── 0.4.6.xml │ │ │ ├── 0.4.6 │ │ │ ├── 2021-01-30--series_comments.xml │ │ │ └── 2021-01-31--make-comment-field-non-nullable.xml │ │ │ ├── 0.4.7.xml │ │ │ ├── 0.4.7 │ │ │ ├── 2021-07-18--series_import_parsed_image_urls.xml │ │ │ ├── 2021-11-28--series_and_nullable_perforated_field.xml │ │ │ ├── 2022-09-08--re_apply_column_comments.xml │ │ │ └── 2023-07-27--collection_added_at.xml │ │ │ ├── 0.4.8.xml │ │ │ ├── 0.4.8 │ │ │ └── 2024-01-25--rename_site_parser_params_value_column.xml │ │ │ ├── 0.4.xml │ │ │ └── 0.4 │ │ │ ├── 2014-10-28--decimal_price.xml │ │ │ ├── 2015-06-22--image_url.xml │ │ │ ├── 2015-07-07--salt_and_hash.xml │ │ │ ├── 2015-10-14--http-method.xml │ │ │ ├── 2015-11-13--nullable_columns.xml │ │ │ ├── 2016-01-02--non_unique_catalog_numbers.xml │ │ │ ├── 2016-01-04--unique_series_in_collection.xml │ │ │ ├── 2016-01-14--unique_slug_in_countries.xml │ │ │ ├── 2016-02-19--csrf_events.xml │ │ │ ├── 2016-07-22--unique_slug_in_categories.xml │ │ │ ├── 2016-08-18--unique_slug_in_collections.xml │ │ │ ├── 2016-08-22--series_sales.xml │ │ │ ├── 2016-08-27--fix_series_sales_price.xml │ │ │ ├── 2016-09-28--add_constraints_to_series-first-price.xml │ │ │ ├── 2016-09-28--add_creator_data_to_series_sales.xml │ │ │ ├── 2016-10-10--change_series_sales_date_type.xml │ │ │ ├── 2016-11-29--add-unique-key-transaction_participants-table.xml │ │ │ ├── 2016-12-05--make_name_ru_optional.xml │ │ │ ├── 2017-01-06--top_categories.xml │ │ │ ├── 2017-01-25--united_kingdom_country.xml │ │ │ ├── 2017-01-29--add_updater_data_to_collections.xml │ │ │ ├── 2017-05-11--image_preview.xml │ │ │ ├── 2017-05-29--test_image.xml │ │ │ ├── 2017-10-23--image_filename.xml │ │ │ ├── 2017-10-30--scott_code_length.xml │ │ │ ├── 2017-10-31--non_nullable_catalog_codes.xml │ │ │ ├── 2017-10-31--series_sales_null_second_currency.xml │ │ │ ├── 2017-11-08--import_series.xml │ │ │ ├── 2017-11-09--categories_aliases.xml │ │ │ ├── 2017-11-09--countries_aliases.xml │ │ │ ├── 2017-11-09--series_import_parsed_data_release_year_field.xml │ │ │ ├── 2017-11-09--series_import_requests_url_length.xml │ │ │ ├── 2017-11-14--separate_buyers_and_sellers.xml │ │ │ ├── 2017-11-15--group_participants.xml │ │ │ ├── 2017-11-22--import_request_series_id.xml │ │ │ ├── 2017-12-18--unique_series_id_in_import_requests.xml │ │ │ ├── 2017-12-21--solovyov_catalog.xml │ │ │ ├── 2017-12-21--zagorski_catalog.xml │ │ │ ├── 2017-12-30--series_import_requests_url_length2.xml │ │ │ ├── 2018-01-01--add_perforated_to_parsed_data.xml │ │ │ ├── 2018-01-01--add_quantity_to_parsed_data.xml │ │ │ ├── 2018-01-04--series_sales_import_parsed_data.xml │ │ │ ├── 2018-02-09--add_seller_info_to_parsed_data.xml │ │ │ ├── 2018-03-11--series_remove_currency_fields.xml │ │ │ ├── 2018-06-09--add_number_of_stamps_to_collections_series.xml │ │ │ ├── 2018-06-15--add_price_to_collections_series.xml │ │ │ ├── 2018-06-18--test_paid_user.xml │ │ │ ├── 2018-07-05--series_import_parsed_data_michel_numbers_field.xml │ │ │ ├── 2018-07-15--series_import_parsed_data_group_id_field.xml │ │ │ ├── 2018-10-16--similar_series.xml │ │ │ ├── 2018-12-03--site_parsers.xml │ │ │ ├── 2018-12-20--nullify_currency_without_price.xml │ │ │ └── 2019-05-25--test_participant_buyer_and_seller.xml │ ├── ru │ │ └── mystamps │ │ │ └── i18n │ │ │ ├── MailTemplates.properties │ │ │ ├── MailTemplates_ru.properties │ │ │ ├── Messages.properties │ │ │ ├── Messages_ru.properties │ │ │ ├── SpringSecurityMessages.properties │ │ │ ├── SpringSecurityMessages_ru.properties │ │ │ ├── ValidationMessages.properties │ │ │ └── ValidationMessages_ru.properties │ ├── sql │ │ ├── category_dao_queries.properties │ │ ├── collection_dao_queries.properties │ │ ├── country_dao_queries.properties │ │ ├── image_dao_queries.properties │ │ ├── series_dao_queries.properties │ │ ├── series_image_dao_queries.properties │ │ ├── series_import_request_dao_queries.properties │ │ ├── series_sales_dao_queries.properties │ │ ├── series_sales_import_dao_queries.properties │ │ ├── site_parser_dao_queries.properties │ │ ├── stamps_catalog_dao_queries.properties │ │ ├── suspicious_activity_dao_queries.properties │ │ ├── transaction_participants_dao_queries.properties │ │ ├── user_dao_queries.properties │ │ └── users_activation_dao_queries.properties │ └── test │ │ ├── spring │ │ └── test-data.properties │ │ └── test.png ├── scripts │ ├── ci │ │ ├── ansible │ │ │ ├── deploy.yml │ │ │ ├── mystamps.inventory │ │ │ ├── mystamps_rsa.enc │ │ │ └── prod_vars.yml.enc │ │ ├── connect-todos-to-issues.sh │ │ ├── deploy.sh │ │ └── pdd-json-to-tsv.sh │ ├── execute-command.sh │ └── show-spring-boot-version-diff.sh └── webapp │ ├── WEB-INF │ ├── static │ │ └── styles │ │ │ └── main.css │ └── views │ │ ├── account │ │ ├── activate.html │ │ ├── auth.html │ │ └── register.html │ │ ├── category │ │ ├── add.html │ │ ├── info.html │ │ └── list.html │ │ ├── collection │ │ ├── estimation.html │ │ └── info.html │ │ ├── country │ │ ├── add.html │ │ ├── info.html │ │ └── list.html │ │ ├── error │ │ └── status-code.html │ │ ├── participant │ │ └── add.html │ │ ├── series │ │ ├── add.html │ │ ├── import │ │ │ ├── info.html │ │ │ ├── list.html │ │ │ └── request.html │ │ ├── info.html │ │ ├── partial │ │ │ └── comment.html │ │ └── search_result.html │ │ └── site │ │ ├── events.html │ │ └── index.html │ └── favicon.ico └── test ├── groovy └── ru │ └── mystamps │ └── web │ ├── common │ ├── LocaleUtilsTest.groovy │ ├── PagerTest.groovy │ └── SlugUtilsTest.groovy │ └── feature │ ├── account │ └── UsersActivationServiceImplTest.groovy │ ├── image │ ├── DatabaseImagePersistenceStrategyTest.groovy │ ├── FilesystemImagePersistenceStrategyTest.groovy │ └── ImageServiceImplTest.groovy │ ├── series │ ├── CatalogUtilsTest.groovy │ ├── SeriesServiceImplTest.groovy │ └── importing │ │ ├── SeriesImportServiceImplTest.groovy │ │ └── SeriesInfoExtractorServiceImplTest.groovy │ └── site │ ├── CronServiceImplTest.groovy │ ├── SiteServiceImplTest.groovy │ └── SuspiciousActivityServiceImplTest.groovy ├── java └── ru │ └── mystamps │ └── web │ ├── feature │ ├── category │ │ └── JdbcCategoryDaoTest.java │ ├── country │ │ └── JdbcCountryDaoTest.java │ └── series │ │ └── importing │ │ └── extractor │ │ └── JsoupSiteParserTest.java │ ├── service │ └── TestObjects.java │ ├── support │ └── spring │ │ └── security │ │ └── ContentSecurityPolicyHeaderWriterTest.java │ └── tests │ ├── DateUtils.java │ └── Random.java ├── resources ├── db │ ├── categories-fauna.sql │ ├── categories-sport.sql │ ├── collections-coder.sql │ ├── countries-france.sql │ ├── countries-italy.sql │ ├── series-1-fauna-qty5.sql │ ├── series-2-sport-qty3.sql │ ├── series-3-sport-qty7.sql │ ├── series-4-italy-qty5.sql │ ├── series-5-france-qty4.sql │ ├── series-6-france-qty6.sql │ └── users-coder.sql ├── empty.jpg └── logback-test.xml ├── robotframework ├── account │ ├── activation │ │ ├── logic.robot │ │ ├── misc-anonymous.robot │ │ ├── misc-user.robot │ │ └── validation.robot │ ├── authentication │ │ ├── logic.robot │ │ ├── misc-user.robot │ │ └── validation.robot │ └── registration │ │ ├── logic.robot │ │ ├── misc-anonymous.robot │ │ ├── misc-user.robot │ │ └── validation.robot ├── auth.steps.robot ├── category │ ├── access.robot │ └── creation │ │ ├── logic.robot │ │ ├── misc.robot │ │ └── validation.robot ├── collection │ ├── access.robot │ ├── add-series │ │ ├── logic.robot │ │ ├── validation-paid.robot │ │ └── validation-user.robot │ ├── estimation │ │ ├── access.robot │ │ └── logic.robot │ └── remove-series │ │ └── logic.robot ├── country │ ├── access.robot │ └── creation │ │ ├── logic.robot │ │ ├── misc.robot │ │ └── validation.robot ├── participant │ └── creation │ │ ├── logic.robot │ │ ├── misc.robot │ │ └── validation.robot ├── selenium.utils.robot ├── series │ ├── access.robot │ ├── add-comment │ │ ├── logic.robot │ │ └── validation.robot │ ├── add-image │ │ ├── logic.robot │ │ └── validation.robot │ ├── add-numbers │ │ └── logic.robot │ ├── add-price │ │ └── logic.robot │ ├── add-year │ │ └── logic.robot │ ├── creation │ │ ├── logic-admin.robot │ │ ├── logic-user.robot │ │ ├── misc.robot │ │ ├── validation-admin.robot │ │ └── validation-user.robot │ ├── import │ │ ├── access.robot │ │ ├── import-misc.robot │ │ ├── import-validation.robot │ │ ├── request-logic.robot │ │ └── request-validation.robot │ ├── sales │ │ ├── creation │ │ │ ├── logic.robot │ │ │ ├── misc.robot │ │ │ └── validation.robot │ │ └── import │ │ │ ├── logic.robot │ │ │ └── validation.robot │ ├── search │ │ ├── logic-anonymous.robot │ │ ├── logic-user.robot │ │ └── validation.robot │ └── similar │ │ └── logic.robot ├── site │ ├── change-lang │ │ └── logic.robot │ ├── csp │ │ └── report-logic.robot │ ├── error-page │ │ └── misc.robot │ └── main-page │ │ ├── misc-admin.robot │ │ ├── misc-anonymous.robot │ │ └── misc-user.robot └── togglz │ ├── access-anonymous.robot │ ├── access-user.robot │ └── misc.robot └── wiremock ├── __files └── series │ ├── import │ └── request-logic │ │ ├── catalog-numbers-in-description.html │ │ ├── charset-windows-1251.html │ │ ├── existing-seller.html │ │ ├── new-seller.html │ │ └── simple.html │ └── sales │ └── import │ └── logic │ ├── empty.html │ └── existing-seller.html └── mappings ├── mailgun └── send-message.json └── series ├── empty-jpeg-file.json ├── import └── request-logic │ ├── catalog-numbers-in-description.json │ ├── charset-windows-1251.json │ ├── existing-seller.json │ ├── new-seller.json │ └── simple.json ├── not-image-file.json ├── response-301.json ├── response-400.json ├── response-404.json └── sales └── import └── logic ├── empty.json └── existing-seller.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Universal configuration for most of the editors. 2 | # https://editorconfig.org 3 | 4 | # For descriptions of the options see: 5 | # https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties 6 | 7 | # top-most EditorConfig file 8 | root = true 9 | 10 | [*.{sh,js,sql,css,xml,html,java,groovy,properties,robot}] 11 | indent_style = tab 12 | indent_size = 4 13 | charset = utf-8 14 | end_of_line = lf 15 | insert_final_newline = true 16 | trim_trailing_whitespace = false 17 | 18 | [*.{yml,json,conf,tf}] 19 | indent_style = space 20 | indent_size = 2 21 | 22 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' are comments. 2 | # Each line is a file pattern followed by one or more owners. 3 | # For more information about this file, see: https://github.blog/2017-07-06-introducing-code-owners/ 4 | 5 | # Set default owner for everything in the repo. 6 | * @php-coder 7 | -------------------------------------------------------------------------------- /.mvn/jvm.config: -------------------------------------------------------------------------------- 1 | -Dorg.slf4j.simpleLogger.log.com.gargoylesoftware.htmlunit.DefaultCssErrorHandler=error 2 | -Dorg.slf4j.simpleLogger.log.com.gargoylesoftware.htmlunit.html.DefaultElementFactory=warn 3 | -Dorg.slf4j.simpleLogger.log.com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl=error 4 | -Dorg.slf4j.simpleLogger.showLogName=false 5 | -------------------------------------------------------------------------------- /docs/use-cases.md: -------------------------------------------------------------------------------- 1 | # Use Cases 2 | 3 | A visitor has one of the following roles: 4 | - anonymous (non-authenticated) 5 | - user 6 | - paid user 7 | - admin 8 | 9 | "Paid user" and "admin" extend "user" role and implicitly have all its permissions. 10 | 11 | ![A list of use cases](https://github.com/php-coder/mystamps/blob/generated-assets/docs/diagrams/all-use-cases.png) 12 | 13 | -------------------------------------------------------------------------------- /infra/ansible/bootstrap.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Ubuntu 16.04. doesn't install python 2.x anymore and we have to install 4 | # it manually to be able to run Ansible playbooks. 5 | 6 | - name: Updating packages cache 7 | raw: '[ -x /usr/bin/python2.7 ] || apt-get update' 8 | 9 | - name: Installing python 10 | raw: '[ -x /usr/bin/python2.7 ] || apt-get install -y python2.7-minimal' 11 | -------------------------------------------------------------------------------- /infra/ansible/mise.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | ansible = "3.4.0" 3 | python = "3.10.16" 4 | -------------------------------------------------------------------------------- /infra/ansible/playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | gather_facts: no 4 | become: yes 5 | become_method: sudo 6 | vars: 7 | profile: 'test' 8 | user_db_password: 'q1' 9 | mailgun_api_password: 'q3' 10 | # required for Ubuntu 16.04. which installs Python 2.x to a non-standard path 11 | ansible_python_interpreter: "/usr/bin/python2.7" 12 | 13 | pre_tasks: 14 | 15 | - name: Bootstrapping server 16 | include: bootstrap.yml 17 | 18 | - name: Removing nano 19 | apt: 20 | package: nano 21 | state: absent 22 | 23 | - name: Creating /data directory 24 | file: 25 | path: /data 26 | state: directory 27 | owner: root 28 | group: root 29 | mode: '0755' 30 | 31 | roles: 32 | - role: php-coder.oraclejdk 33 | - role: mystamps-user 34 | - role: mystamps-app 35 | - role: php-coder.nginx 36 | vars: 37 | remove_default_vhost: yes 38 | state: stopped 39 | - role: mystamps-nginx 40 | - role: mystamps-backup 41 | when: profile == 'prod' 42 | -------------------------------------------------------------------------------- /infra/ansible/prod.inventory: -------------------------------------------------------------------------------- 1 | # Ansible inventory file 2 | # See: https://docs.ansible.com/ansible/3/user_guide/intro_inventory.html 3 | 4 | [prod] 5 | my-stamps.ru ansible_host=46.101.232.167 6 | 7 | [all:vars] 8 | # https://docs.ansible.com/ansible/3/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks 9 | # https://docs.ansible.com/ansible/3/reference_appendices/interpreter_discovery.html 10 | ansible_python_interpreter=/usr/bin/python3 11 | -------------------------------------------------------------------------------- /infra/ansible/prod.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | gather_facts: no 4 | remote_user: coder 5 | become: yes 6 | become_method: sudo 7 | vars: 8 | profile: 'prod' 9 | vars_files: 10 | - './vars/prod.yml' 11 | 12 | pre_tasks: 13 | 14 | - name: Removing nano 15 | apt: 16 | package: nano 17 | state: absent 18 | 19 | - name: Creating /data directory 20 | file: 21 | path: /data 22 | state: directory 23 | owner: root 24 | group: root 25 | mode: '0755' 26 | 27 | roles: 28 | - php-coder.oraclejdk 29 | - mystamps-user 30 | - role: mystamps-app 31 | tags: app 32 | - role: php-coder.nginx 33 | vars: 34 | remove_default_vhost: yes 35 | state: stopped 36 | - role: mystamps-nginx 37 | tags: ssl 38 | - role: mystamps-backup 39 | when: profile == 'prod' 40 | tags: backup 41 | -------------------------------------------------------------------------------- /infra/ansible/requirements.galaxy.yml: -------------------------------------------------------------------------------- 1 | - src: php-coder.oraclejdk 2 | version: '1.3' 3 | - src: php-coder.nginx 4 | version: '1.2' 5 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-app/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | admin_email: coder 3 | # possible values: test and prod 4 | profile: test 5 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-app/files/mystamps.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = MyStamps site 3 | After = syslog.target 4 | 5 | [Service] 6 | User = mystamps 7 | WorkingDirectory = /data/mystamps 8 | EnvironmentFile = /data/mystamps/mystamps.conf 9 | ExecStart = /usr/bin/java $JAVA_OPTS -jar /data/mystamps/mystamps.war 10 | SuccessExitStatus = 143 11 | 12 | [Install] 13 | WantedBy = multi-user.target 14 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-app/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Reloading systemd service 4 | systemd: 5 | daemon_reload: yes 6 | 7 | - name: Restarting mystamps service 8 | service: 9 | name: mystamps 10 | state: restarted 11 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-app/templates/mystamps-send-logs: -------------------------------------------------------------------------------- 1 | # /etc/cron.d/mystamps-send-logs file for sending some useful logs to admin 2 | MAILTO='{{ admin_email }}' 3 | # 4 | # min hour dom mon dow user command 5 | 0 5 * * * mystamps journalctl --unit mystamps --since yesterday --until today --output cat 6 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-app/templates/mystamps.conf: -------------------------------------------------------------------------------- 1 | # This file is being read and used by /etc/systemd/system/mystamps.service 2 | SPRING_PROFILES_ACTIVE={{ profile }} 3 | JAVA_OPTS='-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heap-dumps -XX:+UseCompressedOops -Dsun.rmi.dgc.client.gcInterval=86400000 -Dsun.rmi.dgc.server.gcInterval=86400000 -Djava.security.egd=file:/dev/./urandom -Xmx128m -Xss256k' 4 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-backup/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | admin_email: coder 3 | user_db_password: p@ssword 4 | # Target urls should be in a format that is supported by duplicity(1): 5 | # https://www.nongnu.org/duplicity/vers8/duplicity.1.html#sect7 6 | uploads_target_url: file:///tmp/uploads 7 | mysql_backups_target_url: file:///tmp/mysql-backups 8 | # Passphrase for GPG to encrypt archives 9 | gpg_passphrase: 10 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-backup/templates/my.cnf: -------------------------------------------------------------------------------- 1 | [client] 2 | user = mystamps 3 | password = {{ user_db_password }} 4 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-backup/templates/mystamps-backup-db: -------------------------------------------------------------------------------- 1 | # /etc/cron.d/mystamps-backup-db file for backuping my-stamps.ru database 2 | MAILTO='{{ admin_email }}' 3 | # 4 | # min hour dom mon dow user command 5 | 30 0 * * * mystamps umask 027; mysqldump --single-transaction mystamps | bzip2 >/data/backups/mysql_backup_mystamps_$(date +\%Y\%m\%d-\%H\%M\%S).sql.bz2 2>&1 6 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-backup/templates/mystamps-backup-remote: -------------------------------------------------------------------------------- 1 | # /etc/cron.d/mystamps-backup-remote file for backuping my-stamps.ru data to remote host 2 | MAILTO='{{ admin_email }}' 3 | # 4 | # min hour dom mon dow user command 5 | 45 0 * * * root /data/bin/remote-backup.sh uploads 2>&1 6 | 50 0 * * * root /data/bin/remote-backup.sh mysql-backups 2>&1 7 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-backup/templates/remote-backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Treat unset variables and parameters as an error when performing parameter expansion 4 | set -o nounset 5 | 6 | # Exit immediately if command returns a non-zero status 7 | set -o errexit 8 | 9 | # Return value of a pipeline is the value of the last command to exit with a non-zero status 10 | set -o pipefail 11 | 12 | 13 | UPLOADS_DST='{{ uploads_target_url }}' 14 | MYSQL_BACKUPS_DST='{{ mysql_backups_target_url }}' 15 | PASSPHRASE='{{ gpg_passphrase }}' 16 | DUPLICITY_CMD='duplicity --no-compression --full-if-older-than 1W' 17 | 18 | case "${1:-}" in 19 | 'uploads') 20 | su mystamps 2>&1 \ 21 | -c "${DUPLICITY_CMD} --name=uploads --no-encryption /data/uploads ${UPLOADS_DST}" 22 | su mystamps 2>&1 \ 23 | -c "duplicity remove-all-but-n-full 2 --force ${UPLOADS_DST}" 24 | ;; 25 | 'mysql-backups') 26 | PASSPHRASE="$PASSPHRASE" su mystamps 2>&1 \ 27 | -c "${DUPLICITY_CMD} --name=mysql-backups /data/backups ${MYSQL_BACKUPS_DST}" 28 | PASSPHRASE="$PASSPHRASE" su mystamps 2>&1 \ 29 | -c "duplicity remove-all-but-n-full 2 --force ${MYSQL_BACKUPS_DST}" 30 | ;; 31 | *) 32 | echo 2>&1 "Usage: $(dirname "$0") (uploads|mysql-backups)" 33 | exit 1 34 | esac 35 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-nginx/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # possible values: test and prod 3 | profile: test 4 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-nginx/files/test/my-stamps.ru.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDATCCAemgAwIBAgIJALTWADgGEENQMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV 3 | BAMMDG15LXN0YW1wcy5ydTAeFw0xNjA2MjMxMTQ2MTBaFw0yNjA2MjExMTQ2MTBa 4 | MBcxFTATBgNVBAMMDG15LXN0YW1wcy5ydTCCASIwDQYJKoZIhvcNAQEBBQADggEP 5 | ADCCAQoCggEBANjO9+/4ViDn/et8hZ0sxJFst1Uc9H+JJ7mermfyNFaRKYdnFpOL 6 | BC/64wjbepxXber2kPw3yvMYT/W3Tn4TH0tl9wZZKB/37JTSneMdVF9G+F1YmieB 7 | aVsu6rjmV2DBbpnvkdt/z3lbVK0AJMJXENh+FLQbMn4yzgsTmjPnw+Gvo/qZdPpw 8 | mvGbyq8ygwrgMUIwnBrzogQYWHP3CIal3s+5f3z1wSF7A3NPFxYCSpAsSYy/DgMo 9 | UTR+Ha+mMaYEfOiqM8FX7XaQ1a7TZxCvC+0vig1yBbJ7sScTB3N7+Ya5eTssRH3e 10 | yb2Mks8LNPsMjHZZDQep/SsMfSdRzNV26JUCAwEAAaNQME4wHQYDVR0OBBYEFLqw 11 | DjmaDxpI+n01DOjo3CRHNk3kMB8GA1UdIwQYMBaAFLqwDjmaDxpI+n01DOjo3CRH 12 | Nk3kMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAGjXEL+noC08/DTC 13 | RmR8wnY4p3+LgC4+nGRw1mTqiaL/llnaCZ7PoKLs9DQToDKtZ/IgMWfQ82/i0NyP 14 | w+hjUOIeF7OY+gHKSj0nhu2yVSXEbceV4pWByN5gr1JSXT036w+BvoJw7mMch6nY 15 | FLzqe78Rf7cZ46lzmlOdkzroQKA/xqnt1EgJjmRFwFhw400k+Z8X8wOpW7+/nKFG 16 | A5TebgQI7TBjIRuUvHIszN+aB4+aU/4Iv5qxy5niKC+Nkajb8Gl7gc9JdN5h2TSZ 17 | dA2cFHGKfYJcqMjVYqm1JxlL4f2RM+ebX5fzOE1UA9fay4nm1uYHx+3ch4FNGs7e 18 | I/Y9CKo= 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-nginx/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Restarting nginx service 4 | service: 5 | name: nginx 6 | state: restarted 7 | -------------------------------------------------------------------------------- /infra/ansible/roles/mystamps-user/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Creating group 4 | group: 5 | name: mystamps 6 | state: present 7 | 8 | - name: Creating user 9 | user: 10 | name: mystamps 11 | group: mystamps 12 | home: /data/mystamps 13 | createhome: yes 14 | comment: 'MyStamps' 15 | state: present 16 | 17 | -------------------------------------------------------------------------------- /infra/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | # ignore everything except WAR files 2 | * 3 | !*.war 4 | -------------------------------------------------------------------------------- /infra/docker/.env: -------------------------------------------------------------------------------- 1 | # Sets the project name so it won't be depend on a directory name. 2 | # https://docs.docker.com/compose/reference/envvars/#compose_project_name 3 | COMPOSE_PROJECT_NAME=mystamps 4 | -------------------------------------------------------------------------------- /infra/docker/README.md: -------------------------------------------------------------------------------- 1 | ## Run MyStamps in Docker 2 | 3 | MyStamps application can be run as a Docker container. While there are many 4 | possible configurations, we support only those that are typically used: 5 | 6 | * **a single container** where the application is running with `test` profile. 7 | In this mode, it also runs in-memory database H2. This is roughly the same as 8 | executing `mvn spring-boot:run` command but inside a Docker container. 9 | 10 | * Create a WAR file and build the image `phpcoder/mystamps:latest`: 11 | ```console 12 | $ mvn package dockerfile:build 13 | ``` 14 | * Run a container with `docker compose`: 15 | ```console 16 | $ cd infra/docker 17 | $ docker compose up -d 18 | ``` 19 | or with a plain Docker: 20 | ```console 21 | $ docker run -d -p 8080:8080 --cap-drop all phpcoder/mystamps:latest 22 | ``` 23 | 24 | -------------------------------------------------------------------------------- /infra/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | web: 3 | image: phpcoder/mystamps:0.4.7 4 | cap_drop: 5 | - 'ALL' 6 | ports: 7 | - '8080:8080' 8 | -------------------------------------------------------------------------------- /infra/docker/local-data.yml: -------------------------------------------------------------------------------- 1 | # Customize configuration from docker-compose.yml and prod.yml to run the 2 | # application with local data. 3 | # 4 | # In order to get the effective configuration, run 5 | # docker compose -f docker-compose.yml -f prod.yml -f local-data.yml config 6 | # 7 | 8 | services: 9 | web: 10 | # Useful for debugging Liquibase 11 | #environment: 12 | # LOGGING_LEVEL_LIQUIBASE: DEBUG 13 | volumes: 14 | # to use a WAR file from filesystem and avoid to build image every time 15 | - ../../target/mystamps.war:/data/mystamps/mystamps.war:ro 16 | db: 17 | volumes: 18 | - ./mysql_backup_mystamps.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz:ro 19 | -------------------------------------------------------------------------------- /infra/kubernetes/deployment.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | labels: 5 | app: mystamps 6 | name: mystamps 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | app: mystamps 12 | template: 13 | metadata: 14 | labels: 15 | app: mystamps 16 | spec: 17 | containers: 18 | - image: phpcoder/mystamps:0.4.7 19 | name: mystamps 20 | -------------------------------------------------------------------------------- /infra/kubernetes/service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app: mystamps 6 | name: mystamps 7 | spec: 8 | ports: 9 | - port: 8080 10 | protocol: TCP 11 | targetPort: 8080 12 | selector: 13 | app: mystamps 14 | type: LoadBalancer 15 | -------------------------------------------------------------------------------- /infra/terraform/mise.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | terraform = "1.12.0" 3 | -------------------------------------------------------------------------------- /infra/terraform/terraform.tfvars.example: -------------------------------------------------------------------------------- 1 | do_token = "" 2 | uptimerobot_token = "" 3 | mailgun_token = "" 4 | -------------------------------------------------------------------------------- /infra/terraform/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.11" 3 | 4 | required_providers { 5 | digitalocean = { 6 | source = "digitalocean/digitalocean" 7 | version = "2.55.0" 8 | } 9 | uptimerobot = { 10 | source = "vexxhost/uptimerobot" 11 | version = "0.8.2" 12 | } 13 | mailgun = { 14 | source = "wgebis/mailgun" 15 | version = "0.7.7" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /mise.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | java = "adoptopenjdk-8.0.442" 3 | maven = "3.6.3" 4 | 5 | # 6 | # Project tasks 7 | # 8 | # See for details: 9 | # - https://mise.jdx.dev/tasks/ 10 | # - https://mise.jdx.dev/tasks/toml-tasks.html 11 | # - https://mise.jdx.dev/tasks/file-tasks.html 12 | # - https://mise.jdx.dev/tasks/running-tasks.html 13 | # - https://mise.jdx.dev/tasks/task-configuration.html 14 | # 15 | 16 | [tasks.clean] 17 | description = "Remove generated files" 18 | run = "mvn clean" 19 | 20 | [tasks.boot] 21 | description = "Run application" 22 | run = "mvn spring-boot:run" 23 | alias = [ "run", "bootRun" ] 24 | 25 | [tasks.fast] 26 | description = "Run application (but skips some checks)" 27 | run = "mvn spring-boot:run -Denforcer.skip=true -DskipMinify=true -Dmaven.resources.skip=true -Dmaven.test.skip=true" 28 | -------------------------------------------------------------------------------- /src/lombok.config: -------------------------------------------------------------------------------- 1 | # see https://projectlombok.org/features/configuration for details 2 | config.stopBubbling = true 3 | -------------------------------------------------------------------------------- /src/main/config/license_header.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) ${copyright.years} ${author.name} <${author.email}> 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; either version 2 of the License, or 6 | (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 | -------------------------------------------------------------------------------- /src/main/config/nginx/mystamps-http.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name my-stamps.ru www.my-stamps.ru; 4 | server_tokens off; 5 | 6 | return 301 https://$host$request_uri; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/config/nginx/mystamps-ssl.conf: -------------------------------------------------------------------------------- 1 | map $http_accept_language $lang { 2 | default 'en'; 3 | '~*ru' 'ru'; 4 | } 5 | 6 | server { 7 | listen 443 ssl default_server; 8 | server_name my-stamps.ru www.my-stamps.ru; 9 | server_tokens off; 10 | error_log /data/logs/nginx.log notice; 11 | proxy_buffers 128 4k; 12 | 13 | ssl_certificate /etc/ssl/my-stamps.ru.crt; 14 | ssl_certificate_key /etc/ssl/my-stamps.ru.key; 15 | 16 | location @maintenance { 17 | root /data/nginx; 18 | add_header Retry-After 180 always; # 3 min 19 | add_header Strict-Transport-Security max-age=2592000 always; # 1 month 20 | try_files /503.$lang.html =502; 21 | } 22 | 23 | location /image/ { 24 | return 301 https://stamps.filezz.ru$request_uri; 25 | } 26 | 27 | location ~* \.(ico|css|js)$ { 28 | return 301 https://stamps.filezz.ru$request_uri; 29 | } 30 | 31 | location / { 32 | error_page 502 =503 @maintenance; 33 | 34 | # enable HSTS for 1 month; add this header also to the error responses 35 | add_header Strict-Transport-Security max-age=2592000 always; 36 | 37 | proxy_set_header X-Forwarded-For $remote_addr; 38 | proxy_pass http://127.0.0.1:8080; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/config/nginx/mystamps-static.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | server_name stamps.filezz.ru; 4 | server_tokens off; 5 | error_log /data/logs/nginx-static.log notice; 6 | proxy_buffers 128 4k; 7 | 8 | ssl_certificate /etc/ssl/my-stamps.ru.crt; 9 | ssl_certificate_key /etc/ssl/my-stamps.ru.key; 10 | 11 | location / { 12 | return 301 https://my-stamps.ru; 13 | } 14 | 15 | location /image/ { 16 | # enable hsts for 1 month; add this header also to the error responses 17 | add_header Strict-Transport-Security max-age=2592000 always; 18 | 19 | proxy_set_header X-Forwarded-For $remote_addr; 20 | proxy_pass http://127.0.0.1:8080; 21 | } 22 | 23 | location ~* \.(ico|css|js)$ { 24 | # enable hsts for 1 month; add this header also to the error responses 25 | add_header Strict-Transport-Security max-age=2592000 always; 26 | 27 | proxy_set_header X-Forwarded-For $remote_addr; 28 | proxy_pass http://127.0.0.1:8080; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/frontend/.npmrc: -------------------------------------------------------------------------------- 1 | # Don't send audit report during npm install 2 | # See https://docs.npmjs.com/misc/config#audit 3 | audit = false 4 | 5 | # Don't check npm for updates 6 | # See https://docs.npmjs.com/misc/config#update-notifier 7 | update-notifier = false 8 | 9 | # Allow only patch upgrade for dependencies installed with --save/--save-dev 10 | # See https://docs.npmjs.com/misc/config#save-prefix 11 | save-prefix = ~ 12 | -------------------------------------------------------------------------------- /src/main/frontend/babel.config.js: -------------------------------------------------------------------------------- 1 | // Note that this configuration is used by Webpack (babel-loader) and Jest 2 | module.exports = { 3 | presets: [ "@babel/preset-react", "@babel/preset-env" ] 4 | }; 5 | -------------------------------------------------------------------------------- /src/main/frontend/jest.config.js: -------------------------------------------------------------------------------- 1 | // @todo #1484 Document Jest usage 2 | module.exports = { 3 | // https://jestjs.io/docs/en/configuration#watchman-boolean 4 | "watchman": false, 5 | // required to use ECMAScript Modules (ESM) 6 | // @todo #1484 Find a better way to use ESM with Jest and replace jest-esm-transformer 7 | "transform": { 8 | "\\.js$": "jest-esm-transformer" 9 | }, 10 | // See: https://github.com/facebook/jest/issues/5064#issuecomment-401451361 11 | // @todo #1484 Remove usage of jest-standard-reporter once facebook/jest#5064 is resolved 12 | "reporters": [ "jest-standard-reporter" ] 13 | } 14 | -------------------------------------------------------------------------------- /src/main/frontend/src/utils/DateUtils.js: -------------------------------------------------------------------------------- 1 | // 2 | // IMPORTANT: 3 | // You must update ResourceUrl.RESOURCES_VERSION each time whenever you're modified this file! 4 | // 5 | 6 | var DateUtils = { 7 | 8 | /** @public */ 9 | formatDateToDdMmYyyy: function(date) { 10 | return date 11 | .toISOString() // "2018-06-12T16:59:54.451Z" 12 | .split(/[-:T]/) // [ "2018", "06", "12", "17", "00", "26.244Z" ] 13 | .slice(0, 3) // [ "2018", "06", "12" ] 14 | .reverse() // [ "12", "06", "2018" ] 15 | .join('.'); // "12.06.2018" 16 | } 17 | 18 | } 19 | 20 | window.DateUtils = DateUtils; 21 | -------------------------------------------------------------------------------- /src/main/frontend/src/utils/DateUtils.test.js: -------------------------------------------------------------------------------- 1 | import './DateUtils.js' 2 | 3 | describe('DateUtils.formatDateToDdMmYyyy()', () => { 4 | 5 | it('should return a string in a format dd.mm.yyyy', () => { 6 | // given 7 | const date = new Date('2018-06-12T16:59:54.451Z'); 8 | // when 9 | const result = DateUtils.formatDateToDdMmYyyy(date); 10 | // then 11 | expect(result).toBe('12.06.2018'); 12 | }); 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/common/Currency.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.common; 19 | 20 | public enum Currency { 21 | EUR, USD, GBP, RUB, CZK, BYN, UAH; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/common/EntityWithParentDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.common; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | import lombok.ToString; 23 | 24 | @Getter 25 | @ToString 26 | @RequiredArgsConstructor 27 | public class EntityWithParentDto { 28 | // id or slug 29 | private final String id; 30 | private final String name; 31 | private final String parentName; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/common/LinkEntityDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.common; 19 | 20 | import lombok.AllArgsConstructor; 21 | import lombok.Getter; 22 | import lombok.NoArgsConstructor; 23 | import lombok.ToString; 24 | 25 | @Getter 26 | @ToString 27 | @AllArgsConstructor 28 | @NoArgsConstructor 29 | public class LinkEntityDto { 30 | private Integer id; 31 | private String slug; 32 | private String name; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/common/SitemapInfoDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.common; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | import lombok.ToString; 23 | 24 | import java.util.Date; 25 | 26 | @Getter 27 | @ToString 28 | @RequiredArgsConstructor 29 | public class SitemapInfoDto { 30 | private final String id; 31 | private final Date updatedAt; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/common/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The code that is common for many packages. 3 | */ 4 | package ru.mystamps.web.common; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/config/DispatcherServletContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.config; 19 | 20 | import org.springframework.context.annotation.Configuration; 21 | import org.springframework.context.annotation.Import; 22 | 23 | @Configuration 24 | @Import(MvcConfig.class) 25 | public class DispatcherServletContext { 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/config/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring MVC application configuration. 3 | */ 4 | package ru.mystamps.web.config; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/account/ActivateAccountDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.account; 19 | 20 | public interface ActivateAccountDto { 21 | String getLogin(); 22 | String getPassword(); 23 | String getName(); 24 | String getActivationKey(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/account/RegisterAccountDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.account; 19 | 20 | public interface RegisterAccountDto { 21 | String getEmail(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/account/UserDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.account; 19 | 20 | import java.util.Date; 21 | 22 | public interface UserDao { 23 | long countByLogin(String login); 24 | long countActivatedSince(Date date); 25 | UserDetails findUserDetailsByLogin(String login); 26 | Integer add(AddUserDbDto user); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/account/UserService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.account; 19 | 20 | import java.util.Date; 21 | 22 | public interface UserService { 23 | void registerUser(ActivateAccountDto dto); 24 | UserDetails findUserDetailsByLogin(String login); 25 | long countByLogin(String login); 26 | long countRegisteredSince(Date yesterday); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/account/UsersActivationDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.account; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | 23 | import java.util.Date; 24 | 25 | @Getter 26 | @RequiredArgsConstructor 27 | public class UsersActivationDto { 28 | private final String email; 29 | private final Date createdAt; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/account/UsersActivationFullDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.account; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | 23 | import java.util.Date; 24 | 25 | @Getter 26 | @RequiredArgsConstructor 27 | public class UsersActivationFullDto { 28 | private final String activationKey; 29 | private final String email; 30 | private final Date createdAt; 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/account/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move account package one level up 2 | /** 3 | * User account (registration and activation). 4 | */ 5 | package ru.mystamps.web.feature.account; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/category/AddCategoryDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.category; 19 | 20 | public interface AddCategoryDto { 21 | String getName(); 22 | String getNameRu(); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/category/CategoryDb.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.category; 19 | 20 | final class CategoryDb { 21 | 22 | static final class Category { 23 | static final int NAME_LENGTH = 50; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/category/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move category package one level up 2 | /** 3 | * Categories of the stamp series. 4 | */ 5 | package ru.mystamps.web.feature.category; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/collection/AddCollectionDbDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.collection; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | import lombok.ToString; 23 | 24 | import java.util.Date; 25 | 26 | @Getter 27 | @Setter 28 | @ToString 29 | public class AddCollectionDbDto { 30 | private Integer ownerId; 31 | private String slug; 32 | private Date updatedAt; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/collection/AddToCollectionDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.collection; 19 | 20 | import ru.mystamps.web.common.Currency; 21 | 22 | import java.math.BigDecimal; 23 | 24 | public interface AddToCollectionDto { 25 | Integer getNumberOfStamps(); 26 | BigDecimal getPrice(); 27 | Currency getCurrency(); 28 | Integer getSeriesId(); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/collection/CollectionInfoDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.collection; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | 23 | @Getter 24 | @RequiredArgsConstructor 25 | public class CollectionInfoDto { 26 | private final Integer id; 27 | private final String slug; 28 | private final String ownerName; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/collection/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move collection package one level up 2 | /** 3 | * Collections of users. 4 | */ 5 | package ru.mystamps.web.feature.collection; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/country/AddCountryDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.country; 19 | 20 | public interface AddCountryDto { 21 | String getName(); 22 | String getNameRu(); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/country/CountryDb.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.country; 19 | 20 | final class CountryDb { 21 | 22 | static final class Country { 23 | static final int NAME_LENGTH = 50; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/country/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move country package one level up 2 | /** 3 | * Countries of the stamps. 4 | */ 5 | package ru.mystamps.web.feature.country; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/AddImageDataDbDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.image; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | 23 | @Getter 24 | @Setter 25 | public class AddImageDataDbDto { 26 | private Integer imageId; 27 | private byte[] content; 28 | private boolean preview; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/ImageDataDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.image; 19 | 20 | public interface ImageDataDao { 21 | ImageDto findByImageId(Integer imageId, boolean preview); 22 | Integer add(AddImageDataDbDto imageData); 23 | void replace(ReplaceImageDataDbDto imageData); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/ImageDb.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.image; 19 | 20 | final class ImageDb { 21 | 22 | static final class Images { 23 | static final int FILENAME_LENGTH = 255; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/ImageDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.image; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | 23 | @Getter 24 | @RequiredArgsConstructor 25 | public class ImageDto { 26 | private final String type; 27 | private final byte[] data; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/ImagePreviewStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.image; 19 | 20 | public interface ImagePreviewStrategy { 21 | byte[] createPreview(byte[] image); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/ImageValidation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.image; 19 | 20 | public final class ImageValidation { 21 | 22 | /** Maximum uploading image size in kilobytes. */ 23 | public static final long MAX_IMAGE_SIZE = 700; 24 | 25 | private ImageValidation() { 26 | } 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/ReplaceImageDataDbDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.image; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | 23 | @Getter 24 | @Setter 25 | public class ReplaceImageDataDbDto { 26 | private Integer imageId; 27 | private byte[] content; 28 | private boolean preview; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/image/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move image package one level up 2 | /** 3 | * Images. 4 | */ 5 | package ru.mystamps.web.feature.image; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/participant/AddParticipantDbDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.participant; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | import lombok.ToString; 23 | 24 | @Getter 25 | @Setter 26 | @ToString 27 | public class AddParticipantDbDto { 28 | private String name; 29 | private String url; 30 | private Integer groupId; 31 | private Boolean buyer; 32 | private Boolean seller; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/participant/AddParticipantDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.participant; 19 | 20 | public interface AddParticipantDto { 21 | String getName(); 22 | String getUrl(); 23 | Integer getGroupId(); 24 | Boolean getBuyer(); 25 | Boolean getSeller(); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/participant/EntityWithIdDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.participant; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | import lombok.ToString; 23 | 24 | @Getter 25 | @ToString 26 | @RequiredArgsConstructor 27 | public class EntityWithIdDto { 28 | private final Integer id; 29 | private final String name; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/participant/ParticipantDb.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.participant; 19 | 20 | final class ParticipantDb { 21 | 22 | static final class TransactionParticipant { 23 | static final int NAME_LENGTH = 50; 24 | static final int URL_LENGTH = 255; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/participant/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move participant package one level up 2 | /** 3 | * Transaction participants (buyers and sellers). 4 | */ 5 | package ru.mystamps.web.feature.participant; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/report/ReportService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.report; 19 | 20 | /** 21 | * @author Maxim Shestakov 22 | */ 23 | public interface ReportService { 24 | String prepareDailyStatistics(AdminDailyReport report); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/report/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move report package one level up 2 | /** 3 | * Daily reports. 4 | */ 5 | package ru.mystamps.web.feature.report; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/AddCatalogPriceDbDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | 23 | import java.math.BigDecimal; 24 | import java.util.Date; 25 | 26 | @Getter 27 | @Setter 28 | public class AddCatalogPriceDbDto { 29 | private Integer seriesId; 30 | private BigDecimal price; 31 | private Date updatedAt; 32 | private Integer updatedBy; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/AddCommentDbDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | 23 | import java.util.Date; 24 | 25 | @Getter 26 | @Setter 27 | public class AddCommentDbDto { 28 | private Integer seriesId; 29 | private Integer userId; 30 | private String comment; 31 | private Date createdAt; 32 | private Date updatedAt; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/AddImageDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | import org.springframework.web.multipart.MultipartFile; 21 | 22 | public interface AddImageDto { 23 | MultipartFile getImage(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/AddReleaseYearDbDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | 23 | import java.util.Date; 24 | 25 | @Getter 26 | @Setter 27 | public class AddReleaseYearDbDto { 28 | private Integer seriesId; 29 | private Integer releaseYear; 30 | private Date updatedAt; 31 | private Integer updatedBy; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/AddSimilarSeriesDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | public interface AddSimilarSeriesDto { 21 | Integer getSeriesId(); 22 | Integer getSimilarSeriesId(); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/DownloaderService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | public interface DownloaderService { 21 | DownloadResult download(String url); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/NullableImageUrl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | /** 21 | * Interface of the form that has image URL field and supports its zeroed. 22 | */ 23 | public interface NullableImageUrl { 24 | void setImageUrl(String url); 25 | 26 | default void nullifyImageUrl() { 27 | setImageUrl(null); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/ReplaceImageDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | import org.springframework.web.multipart.MultipartFile; 21 | 22 | public interface ReplaceImageDto { 23 | Integer getImageId(); 24 | MultipartFile getImage(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/SelectOption.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | 23 | @Getter 24 | @RequiredArgsConstructor 25 | public class SelectOption { 26 | private final String name; 27 | private final String value; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/SeriesDb.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | final class SeriesDb { 21 | 22 | static final class Series { 23 | static final int COMMENT_LENGTH = 1024; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/SeriesImageDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | public interface SeriesImageDao { 21 | void hideImage(Integer seriesId, Integer imageId); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/SeriesImageService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | public interface SeriesImageService { 21 | void hideImage(Integer seriesId, Integer imageId); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/StampsCatalog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series; 19 | 20 | public enum StampsCatalog { 21 | MICHEL, 22 | SCOTT, 23 | YVERT, 24 | GIBBONS, 25 | SOLOVYOV, 26 | ZAGORSKI 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/ImportRequestDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | import lombok.ToString; 23 | 24 | @Getter 25 | @ToString 26 | @RequiredArgsConstructor 27 | public class ImportRequestDto { 28 | private final String url; 29 | private final String status; 30 | private final Integer seriesId; 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/ImportRequestInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing; 19 | 20 | import lombok.Getter; 21 | import lombok.RequiredArgsConstructor; 22 | import lombok.ToString; 23 | 24 | @Getter 25 | @ToString 26 | @RequiredArgsConstructor 27 | public class ImportRequestInfo { 28 | private final Integer requestId; 29 | private final String url; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/RequestImportDto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing; 19 | 20 | public interface RequestImportDto { 21 | String getUrl(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/SeriesImportValidation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing; 19 | 20 | import ru.mystamps.web.feature.series.importing.SeriesImportDb.SeriesImportRequest; 21 | 22 | final class SeriesImportValidation { 23 | 24 | static final int IMPORT_REQUEST_URL_MAX_LENGTH = SeriesImportRequest.URL_LENGTH; 25 | 26 | private SeriesImportValidation() { 27 | } 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/SeriesInfoExtractorService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing; 19 | 20 | public interface SeriesInfoExtractorService { 21 | SeriesExtractedInfo extract(String pageUrl, RawParsedDataDto data); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/event/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Application events and handlers that are related to a series import process. 3 | */ 4 | package ru.mystamps.web.feature.series.importing.event; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/extractor/SiteParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing.extractor; 19 | 20 | public interface SiteParser { 21 | SeriesInfo parse(String htmlPage); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/extractor/SiteParserDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing.extractor; 19 | 20 | import java.util.List; 21 | 22 | public interface SiteParserDao { 23 | Integer findParserIdForUrl(String url); 24 | List findParserNames(); 25 | SiteParserConfiguration findConfigurationForParser(Integer parserId); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/extractor/SiteParserService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing.extractor; 19 | 20 | import java.util.List; 21 | 22 | public interface SiteParserService { 23 | SiteParser findForUrl(String url); 24 | List findParserNames(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/extractor/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Utility classes for parsing and extracting data about series from HTML documents. 3 | */ 4 | package ru.mystamps.web.feature.series.importing.extractor; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Series import from the external sites. 3 | */ 4 | package ru.mystamps.web.feature.series.importing; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/sale/SeriesSalesImportDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing.sale; 19 | 20 | public interface SeriesSalesImportDao { 21 | void addParsedData(Integer requestId, SeriesSalesParsedDataDbDto data); 22 | SeriesSaleParsedDataDto findParsedDataByRequestId(Integer requestId); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/sale/SeriesSalesImportService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.importing.sale; 19 | 20 | public interface SeriesSalesImportService { 21 | SeriesSaleExtractedInfo downloadAndParse(String url); 22 | void saveParsedData(Integer requestId, SeriesSalesParsedDataDbDto seriesSalesParsedData); 23 | SeriesSaleParsedDataDto getParsedData(Integer requestId); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/importing/sale/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Classes related to the import of the series sales. 3 | */ 4 | package ru.mystamps.web.feature.series.importing.sale; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move series package one level up 2 | /** 3 | * Stamps series. 4 | */ 5 | package ru.mystamps.web.feature.series; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/sale/SeriesCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.sale; 19 | 20 | public enum SeriesCondition { 21 | MNH, 22 | MNHOG, 23 | MVLH, 24 | CTO, 25 | CANCELLED; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/sale/SeriesSalesDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.sale; 19 | 20 | import java.util.List; 21 | 22 | public interface SeriesSalesDao { 23 | void add(AddSeriesSalesDbDto dto); 24 | List findSeriesSales(Integer seriesId); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/sale/SeriesSalesDb.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.sale; 19 | 20 | final class SeriesSalesDb { 21 | 22 | static final class SeriesSales { 23 | static final int TRANSACTION_URL_LENGTH = 767; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/sale/SeriesSalesService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.sale; 19 | 20 | import java.util.List; 21 | 22 | public interface SeriesSalesService { 23 | void add(AddSeriesSalesDto dto, Integer seriesId, Integer userId); 24 | List findSales(Integer seriesId); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/sale/SeriesSalesValidation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.series.sale; 19 | 20 | import ru.mystamps.web.feature.series.sale.SeriesSalesDb.SeriesSales; 21 | 22 | public final class SeriesSalesValidation { 23 | 24 | public static final int SERIES_SALES_URL_MAX_LENGTH = SeriesSales.TRANSACTION_URL_LENGTH; 25 | 26 | private SeriesSalesValidation() { 27 | } 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/series/sale/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Information about sale/purchase of the series. 3 | */ 4 | package ru.mystamps.web.feature.series.sale; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/site/CronService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.site; 19 | 20 | import ru.mystamps.web.feature.report.AdminDailyReport; 21 | 22 | public interface CronService { 23 | int PURGE_AFTER_DAYS = 3; 24 | 25 | void sendDailyStatistics(); 26 | AdminDailyReport getDailyReport(); 27 | void purgeUsersActivations(); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/site/MailService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.site; 19 | 20 | import ru.mystamps.web.feature.account.SendUsersActivationDto; 21 | import ru.mystamps.web.feature.report.AdminDailyReport; 22 | 23 | public interface MailService { 24 | void sendActivationKeyToUser(SendUsersActivationDto activation); 25 | void sendDailyStatisticsToAdmin(AdminDailyReport report); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/site/SuspiciousActivityDao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2025 Slava Semushin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | package ru.mystamps.web.feature.site; 19 | 20 | import java.util.Date; 21 | import java.util.List; 22 | 23 | public interface SuspiciousActivityDao { 24 | void add(AddSuspiciousActivityDbDto activity); 25 | long countAll(); 26 | long countByTypeSince(String type, Date date); 27 | List findAll(int page, int recordsPerPage); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/feature/site/package-info.java: -------------------------------------------------------------------------------- 1 | // @todo #927 Move site package to one level up 2 | /** 3 | * Assorted site-specific things. 4 | * 5 | * The many aspects of the site that are too small to be extracted into a separate feature package. 6 | * Also all of them are specific to the site and can't be re-used somewhere else. Here is the list 7 | * of the things that belongs to this package: 8 | *
    9 | *
  • main and error pages
  • 10 | *
  • robots.txt and sitemap.xml files
  • 11 | *
  • recurring maintenance tasks
  • 12 | *
  • all mailing-related activities (for instance, sending a daily report to admin)
  • 13 | *
  • tracking of the suspicious activity
  • 14 | *
15 | */ 16 | package ru.mystamps.web.feature.site; 17 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Root package for the my-stamps.ru web site. 3 | */ 4 | package ru.mystamps.web; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/beanvalidation/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Implementations of the custom JSR-303 compatible validators. 4 | */ 5 | package ru.mystamps.web.support.beanvalidation; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/liquibase/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration with Liquibase. 3 | */ 4 | package ru.mystamps.web.support.liquibase; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/mailgun/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Mail sending. 3 | * 4 | * The code from this package must not be coupled with the application. 5 | * Think about it as a library that could be consumed from different applications. 6 | */ 7 | package ru.mystamps.web.support.mailgun; 8 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/spring/boot/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration with Spring Boot. 4 | */ 5 | package ru.mystamps.web.support.spring.boot; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/spring/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Helpers and utilities to work with JDBC through Spring's JdbcTemplate. 3 | */ 4 | package ru.mystamps.web.support.spring.jdbc; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/spring/mvc/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration with Spring MVC. 3 | */ 4 | package ru.mystamps.web.support.spring.mvc; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/spring/security/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration with Spring Security. 4 | */ 5 | package ru.mystamps.web.support.spring.security; 6 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/thymeleaf/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration with Thymeleaf. 3 | */ 4 | package ru.mystamps.web.support.thymeleaf; 5 | -------------------------------------------------------------------------------- /src/main/java/ru/mystamps/web/support/togglz/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Integration with Togglz 3 | * (for using feature flags). 4 | */ 5 | package ru.mystamps.web.support.togglz; 6 | -------------------------------------------------------------------------------- /src/main/javascript/collection/info.js: -------------------------------------------------------------------------------- 1 | // 2 | // IMPORTANT: 3 | // You must update ResourceUrl.RESOURCES_VERSION each time whenever you're modified this file! 4 | // 5 | 6 | function initPage(statByCategories, statByCountries) { 7 | var chartsVersion = '49'; 8 | google.charts.load(chartsVersion, {'packages':['corechart']}); 9 | google.charts.setOnLoadCallback(function drawCharts() { 10 | drawChart('categories-chart', createDataTable(statByCategories)); 11 | drawChart('countries-chart', createDataTable(statByCountries)); 12 | }); 13 | } 14 | 15 | function drawChart(containerId, dataTable) { 16 | var options = { 17 | pieHole: 0.3 18 | }; 19 | var chart = new google.visualization.PieChart(document.getElementById(containerId)); 20 | chart.draw(dataTable, options); 21 | } 22 | 23 | function createDataTable(stat) { 24 | var table = new google.visualization.DataTable(); 25 | table.addColumn('string', 'Category/Country'); 26 | table.addColumn('number', 'Quantity of stamps'); 27 | 28 | // {a: 5} => [a, 5] 29 | Object.keys(stat).forEach(function transformToList(key) { 30 | var value = stat[key]; 31 | table.addRow([key, value]); 32 | }); 33 | 34 | return table; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/javascript/participant/add.js: -------------------------------------------------------------------------------- 1 | // 2 | // IMPORTANT: 3 | // You must update ResourceUrl.RESOURCES_VERSION each time whenever you're modified this file! 4 | // 5 | 6 | function initPage() { 7 | $('#url').on('change', function tryToSetParticipantGroup() { 8 | var currentGroup = $('#group option:selected').val(); 9 | if (currentGroup != '') { 10 | // don't change what has been selected already to prevent 11 | // overwriting user's choice 12 | return; 13 | } 14 | 15 | try { 16 | var url = new URL($(this).val()); 17 | var newGroupName = url.hostname.replace(/^www\./, ''); 18 | $('#group option') 19 | .filter(function findGroupByName() { 20 | return this.text.replace(/^www\./, '') == newGroupName; 21 | }) 22 | .prop('selected', true); 23 | 24 | } catch (ignoredError) { 25 | // if we aren't able to parse URL, it's a non-fatal error: maybe 26 | // user provided an invalid URL? Anyway, user always can select 27 | // group manually. 28 | } 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/javascript/series/info.js: -------------------------------------------------------------------------------- 1 | // 2 | // IMPORTANT: 3 | // You must update ResourceUrl.RESOURCES_VERSION each time whenever you're modified this file! 4 | // 5 | 6 | function populateTransactionDateWithTodayDate() { 7 | var today = DateUtils.formatDateToDdMmYyyy(new Date()); 8 | $('#date').val(today); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/sql/test-country-italy.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Auto-generated by Maven, based on values from src/main/resources/test/spring/test-data.properties 3 | -- 4 | 5 | -- Used below as country's owner 6 | INSERT INTO users(login, role, name, registered_at, activated_at, hash, salt, email) VALUES 7 | ('test0', 'USER', 'Italy Country Owner', NOW(), NOW(), '@old_valid_user_password_hash@', '@old_valid_user_password_salt@', 'test0@example.org'); 8 | 9 | -- Used at least by src/test/robotframework/country/creation/validation.robot 10 | INSERT INTO countries(name, created_at, created_by, updated_at, updated_by) VALUES 11 | ( 12 | 'Italy', 13 | NOW(), 14 | (SELECT id FROM users WHERE login = 'test0'), 15 | NOW(), 16 | (SELECT id FROM users WHERE login = 'test0') 17 | ); 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/sql/test-hash-from-sha1-to-bcrypt.sql: -------------------------------------------------------------------------------- 1 | UPDATE users 2 | SET hash='@valid_user_password_hash@' 3 | WHERE hash='@old_valid_user_password_hash@' AND role = 'USER'; 4 | 5 | UPDATE users 6 | SET hash='@valid_admin_password_hash@' 7 | WHERE hash='@old_valid_admin_password_hash@' AND role = 'ADMIN'; 8 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/sql/test-user-admin.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Auto-generated by Maven, based on values from src/main/resources/test/spring/test-data.properties 3 | -- 4 | 5 | INSERT INTO users(login, role, name, registered_at, activated_at, hash, salt, email) VALUES 6 | ('@valid_admin_login@', 'ADMIN', 'Site Admin', NOW(), NOW(), '@old_valid_admin_password_hash@', '@old_valid_admin_password_salt@', 'admin@localhost'); 7 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/sql/test-user-coder.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Auto-generated by Maven, based on values from src/main/resources/test/spring/test-data.properties 3 | -- 4 | 5 | INSERT INTO users(login, role, name, registered_at, activated_at, hash, salt, email) VALUES 6 | ('@valid_user_login@', 'USER', '@valid_user_name@', NOW(), NOW(), '@old_valid_user_password_hash@', '@old_valid_user_password_salt@', 'coder@rock.home'); 7 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/sql/test-users-activations.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Auto-generated by Maven, based on values from src/main/resources/test/spring/test-data.properties 3 | -- 4 | 5 | -- Used only in src/test/robotframework/account/activation/logic.robot 6 | INSERT INTO users_activation(act_key, email, created_at) VALUES 7 | ('@not_activated_user1_act_key@', 'test1@example.org', NOW()), 8 | ('@not_activated_user2_act_key@', 'test2@example.org', NOW()); 9 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/test-data.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/test-data/series_import_parsed_image_urls.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/test-data/transaction_participants.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.3.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.3/2014-08-16--users_activation_lang.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | Adds lang column to users_activation table (with default value "en") 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Marks users_activation.lang field as NOT NULL 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.1.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.1/2019-07-21--series_sales_transaction_url_length.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Must match to the series_import_requests.url field 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.2.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.3.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.3/2020-03-07--site_parser_params_value_length.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.3/2020-03-08--add_alt_price_to_series_sales_import_parsed_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.3/2020-03-11--fix-nullable-series_import_requests-url.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.3/2020-03-12--michel_catalog_code_length.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.3/2020-03-21--add_release_day_to_series_import_parsed_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.4.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.4/2020-05-02--hidden_series_images.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.4/2020-05-04--collections_series_condition.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.4/2020-05-04--series_sale_condition.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.4/2020-06-01--yvert_code_length.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.4/2020-06-03--series_sales_import_parsed_data_condition.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.5.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.5/2020-08-21--series_comment_length.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.6.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.6/2021-01-31--make-comment-field-non-nullable.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.7.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.7/2021-11-28--series_and_nullable_perforated_field.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.7/2023-07-27--collection_added_at.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | UPDATE collections_series cs 18 | SET added_at = ( 19 | SELECT c.updated_at 20 | FROM collections c 21 | WHERE c.id = cs.collection_id 22 | ) 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4.8.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2015-10-14--http-method.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Add method column to suspicious_activities table 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-01-04--unique_series_in_collection.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-01-14--unique_slug_in_countries.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | SELECT COUNT(*) 13 | FROM countries 14 | GROUP BY slug 15 | HAVING COUNT(*) > 1 16 | UNION SELECT 0 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-02-19--csrf_events.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-07-22--unique_slug_in_categories.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | SELECT COUNT(*) 13 | FROM categories 14 | GROUP BY slug 15 | HAVING COUNT(*) > 1 16 | UNION SELECT 0 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-08-18--unique_slug_in_collections.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | SELECT COUNT(*) 13 | FROM collections 14 | GROUP BY slug 15 | HAVING COUNT(*) > 1 16 | UNION SELECT 0 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-08-27--fix_series_sales_price.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-09-28--add_constraints_to_series-first-price.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-10-10--change_series_sales_date_type.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-11-29--add-unique-key-transaction_participants-table.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2016-12-05--make_name_ru_optional.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-01-25--united_kingdom_country.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-05-11--image_preview.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-05-29--test_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-10-23--image_filename.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-10-30--scott_code_length.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-10-31--series_sales_null_second_currency.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Sets to NULL the second_currency field if the second_price isn't specified 10 | 11 | 12 | 13 | UPDATE series_sales 14 | SET second_currency = NULL 15 | WHERE second_price IS NULL AND second_currency IS NOT NULL 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-11-09--countries_aliases.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-11-09--series_import_parsed_data_release_year_field.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-11-22--import_request_series_id.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2017-12-18--unique_series_id_in_import_requests.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2018-01-01--add_perforated_to_parsed_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2018-01-01--add_quantity_to_parsed_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2018-02-09--add_seller_info_to_parsed_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2018-06-15--add_price_to_collections_series.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2018-07-15--series_import_parsed_data_group_id_field.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 8:a99506d469794b03a4353a411aeb9b65 12 | 13 | 14 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2018-10-16--similar_series.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2018-12-20--nullify_currency_without_price.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | UPDATE series_sales_import_parsed_data 13 | SET currency = NULL 14 | WHERE currency IS NOT NULL AND price IS NULL 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/liquibase/version/0.4/2019-05-25--test_participant_buyer_and_seller.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Creates buyers and sellers examples 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/ru/mystamps/i18n/SpringSecurityMessages.properties: -------------------------------------------------------------------------------- 1 | # Customized messages for Spring Security 2 | AbstractUserDetailsAuthenticationProvider.badCredentials = Invalid login or password 3 | 4 | -------------------------------------------------------------------------------- /src/main/resources/ru/mystamps/i18n/SpringSecurityMessages_ru.properties: -------------------------------------------------------------------------------- 1 | # Собственные сообщения для Spring Security 2 | AbstractUserDetailsAuthenticationProvider.badCredentials = Неправильный логин или пароль 3 | 4 | -------------------------------------------------------------------------------- /src/main/resources/sql/series_image_dao_queries.properties: -------------------------------------------------------------------------------- 1 | series_images.mark_as_hidden = \ 2 | UPDATE series_images \ 3 | SET hidden = TRUE \ 4 | WHERE series_id = :series_id AND image_id = :image_id 5 | -------------------------------------------------------------------------------- /src/main/resources/sql/series_sales_import_dao_queries.properties: -------------------------------------------------------------------------------- 1 | series_sales_import.add_series_sales_parsed_data = \ 2 | INSERT \ 3 | INTO series_sales_import_parsed_data \ 4 | ( request_id \ 5 | , seller_id \ 6 | , seller_group_id \ 7 | , seller_url \ 8 | , seller_name \ 9 | , price \ 10 | , currency \ 11 | , alt_price \ 12 | , alt_currency \ 13 | , cond \ 14 | , created_at \ 15 | , updated_at \ 16 | ) \ 17 | VALUES \ 18 | ( :request_id \ 19 | , :seller_id \ 20 | , :seller_group_id \ 21 | , :seller_url \ 22 | , :seller_name \ 23 | , :price \ 24 | , :currency \ 25 | , :alt_price \ 26 | , :alt_currency \ 27 | , :condition \ 28 | , :created_at \ 29 | , :updated_at \ 30 | ) 31 | 32 | series_sales_import.find_series_sale_parsed_data_by_request_id = \ 33 | SELECT seller_id \ 34 | , seller_group_id \ 35 | , seller_url \ 36 | , seller_name \ 37 | , price \ 38 | , currency \ 39 | , alt_price \ 40 | , alt_currency \ 41 | , cond \ 42 | FROM series_sales_import_parsed_data \ 43 | WHERE request_id = :request_id 44 | -------------------------------------------------------------------------------- /src/main/resources/sql/site_parser_dao_queries.properties: -------------------------------------------------------------------------------- 1 | site_parser.find_like_matched_url = \ 2 | SELECT parser_id AS id \ 3 | FROM site_parser_params \ 4 | WHERE name = 'matched_url' \ 5 | AND val = :url \ 6 | OR :url LIKE CONCAT(val, '%') 7 | 8 | site_parser.find_names = \ 9 | SELECT name \ 10 | FROM site_parsers \ 11 | ORDER BY id 12 | 13 | site_parser_param.find_all_with_parser_name = \ 14 | SELECT name \ 15 | , val \ 16 | FROM site_parser_params \ 17 | WHERE parser_id = :parser_id \ 18 | UNION ALL \ 19 | SELECT 'name' AS name \ 20 | , name AS val \ 21 | FROM site_parsers \ 22 | WHERE id = :parser_id 23 | -------------------------------------------------------------------------------- /src/main/resources/sql/user_dao_queries.properties: -------------------------------------------------------------------------------- 1 | user.count_users_by_login = \ 2 | SELECT COUNT(*) \ 3 | FROM users \ 4 | WHERE LOWER(login) = :login 5 | 6 | user.count_activated_since = \ 7 | SELECT COUNT(*) \ 8 | FROM users \ 9 | WHERE activated_at >= :date 10 | 11 | user.find_user_details_by_login = \ 12 | SELECT u.id \ 13 | , u.login \ 14 | , u.name \ 15 | , u.hash \ 16 | , u.role \ 17 | , c.slug AS collection_slug \ 18 | FROM users u \ 19 | JOIN collections c \ 20 | ON c.user_id = u.id \ 21 | WHERE u.login = :login 22 | 23 | user.create = \ 24 | INSERT \ 25 | INTO users \ 26 | ( login \ 27 | , role \ 28 | , name \ 29 | , email \ 30 | , registered_at \ 31 | , activated_at \ 32 | , hash \ 33 | ) \ 34 | VALUES \ 35 | ( :login \ 36 | , :role \ 37 | , :name \ 38 | , :email \ 39 | , :registered_at \ 40 | , :activated_at \ 41 | , :hash \ 42 | ) 43 | -------------------------------------------------------------------------------- /src/main/resources/sql/users_activation_dao_queries.properties: -------------------------------------------------------------------------------- 1 | users_activation.find_by_activation_key = \ 2 | SELECT email \ 3 | , created_at \ 4 | FROM users_activation \ 5 | WHERE act_key = :activation_key 6 | 7 | users_activation.find_older_than = \ 8 | SELECT act_key AS activation_key \ 9 | , email \ 10 | , created_at \ 11 | FROM users_activation \ 12 | WHERE created_at < :date 13 | 14 | users_activation.count_by_activation_key = \ 15 | SELECT COUNT(*) \ 16 | FROM users_activation \ 17 | WHERE act_key = :activation_key 18 | 19 | users_activation.count_created_since = \ 20 | SELECT COUNT(*) \ 21 | FROM users_activation \ 22 | WHERE created_at >= :date 23 | 24 | users_activation.remove_by_activation_key = \ 25 | DELETE \ 26 | FROM users_activation \ 27 | WHERE act_key = :activation_key 28 | 29 | users_activation.create = \ 30 | INSERT \ 31 | INTO users_activation \ 32 | ( act_key \ 33 | , email \ 34 | , lang \ 35 | , created_at \ 36 | ) \ 37 | VALUES \ 38 | ( :activation_key \ 39 | , :email \ 40 | , :lang \ 41 | , :created_at \ 42 | ) 43 | -------------------------------------------------------------------------------- /src/main/resources/test/spring/test-data.properties: -------------------------------------------------------------------------------- 1 | # 2 | # See also src/main/resources/liquibase/sql/test-*.sql 3 | # 4 | 5 | # this user should always exist 6 | # (used at least by account/authentication/logic.robot) 7 | valid_user_login = coder 8 | valid_user_name = Test Suite 9 | valid_user_password = test 10 | 11 | # Password: test 12 | valid_user_password_hash = $2a$10$8Rxlvw8r7r7a.w5rxOJYY.XbBE71ivvGjlnE6w/G73A58l1I76VRK 13 | 14 | # these users should be just registered but not activated 15 | # (used only in src/test/robotframework/account/activation/logic.robot) 16 | not_activated_user1_act_key = 7777744444 17 | not_activated_user2_act_key = 4444477777 18 | 19 | # this privileged user should always exist 20 | valid_admin_login = admin 21 | valid_admin_password = test 22 | 23 | # Password: test 24 | valid_admin_password_hash = $2a$10$cKJAEhYAZs3cIgUHQOHhBOsLDmUUNSLrCk51V4lleWTsUsuYqfPZe 25 | 26 | # Obsolete and used only to allow old migrations keep working 27 | old_valid_admin_password_salt = cEjinQJY3v 28 | old_valid_admin_password_hash = 27e04fc489395d3167d8dd71fc47e466ee190aee 29 | old_valid_user_password_salt = cEjinQJY3v 30 | old_valid_user_password_hash = 27e04fc489395d3167d8dd71fc47e466ee190aee 31 | 32 | -------------------------------------------------------------------------------- /src/main/resources/test/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/php-coder/mystamps/6dbfeb74392633bb6219d8d89cb60e4de88ebb43/src/main/resources/test/test.png -------------------------------------------------------------------------------- /src/main/scripts/ci/ansible/mystamps.inventory: -------------------------------------------------------------------------------- 1 | # Ansible inventory file 2 | # See: https://docs.ansible.com/ansible/3/user_guide/intro_inventory.html 3 | 4 | [prod] 5 | my-stamps.ru 6 | 7 | [all:vars] 8 | # https://docs.ansible.com/ansible/3/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks 9 | # https://docs.ansible.com/ansible/3/reference_appendices/interpreter_discovery.html 10 | ansible_python_interpreter=/usr/bin/python3 11 | -------------------------------------------------------------------------------- /src/main/scripts/ci/ansible/prod_vars.yml.enc: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 37633135383264346165663932623034666631326537333763313133613037636239656538626166 3 | 3732393862613738613264323061663336303036363033370a366133636534326133316362623962 4 | 33323763643562343338616336663537663134646661326364313232643961366461353365353231 5 | 3237623430313338640a666432323135643761643933613862356265346264313436333266626135 6 | 63643432336631306333643465393565643933613333303261303034343839343234366663626263 7 | 64323834626533393366623037623132646563623737616535303832313836666136363362323236 8 | 65316538646331653366313762313835346462366164366336313066343131643763313639616639 9 | 63363164393233613437373261383030326363656263313934663839623838343437316336623730 10 | 33353035373939373231303066373537366432643335336230373361656533633634646166356639 11 | 34613361346436663238383964383466333366646566393431656236356537366363336564646564 12 | 63316232643163363834623835346361343761393836306364313239336137393133396166646438 13 | 62613262623266626364613234353538636639666239343634616362626666383433356432376238 14 | 6432 15 | -------------------------------------------------------------------------------- /src/main/scripts/ci/pdd-json-to-tsv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Algorithm: 4 | # 1) sort by ticket and id 5 | # 2) prepend a header (that will be used by GitHub for preview) 6 | # 3) transform a list of objects to many object: [{}, {}] => {}, {} 7 | # 4) transform each object to a list: {}, {} => [], [] 8 | # 4a) surround .body with quotes and escape double quotes inside by doubling them (this is what @csv filter does). 9 | # Required to be able to view at GitHub. See also: 10 | # https://docs.github.com/en/repositories/working-with-files/using-files/working-with-non-code-files#rendering-csv-and-tsv-data 11 | # 5) transform lists to TSV rows 12 | 13 | exec jq --raw-output '.puzzles | sort_by([ .ticket | tonumber ], .id) | [ { "id":"Id", "ticket":"Ticket", "body":"Title", "file":"File", "lines":"Lines" } ] + . | .[] | [ .id, .ticket, ([ .body ] | @csv), .file, .lines ] | @tsv' 14 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/series/partial/comment.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | Comment 5 |
6 |
8 | My favorite series. 9 |
10 |
11 | -------------------------------------------------------------------------------- /src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/php-coder/mystamps/6dbfeb74392633bb6219d8d89cb60e4de88ebb43/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /src/test/resources/db/categories-fauna.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates category "Fauna" with id=2 and name in Russian 3 | -- 4 | -- depends on: users-coder.sql 5 | -- 6 | INSERT INTO categories(id, name, name_ru, slug, created_at, created_by, updated_at, updated_by) 7 | SELECT 2, 'Fauna', 'Фауна', 'fauna', CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 8 | -------------------------------------------------------------------------------- /src/test/resources/db/categories-sport.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates category "Sport" with id=1 3 | -- 4 | -- depends on: users-coder.sql 5 | -- 6 | INSERT INTO categories(id, name, slug, created_at, created_by, updated_at, updated_by) 7 | SELECT 1, 'Sport', 'sport', CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 8 | -------------------------------------------------------------------------------- /src/test/resources/db/collections-coder.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates collection with id=1 for user "coder" 3 | -- 4 | -- depends on: users-coder.sql 5 | -- 6 | INSERT INTO collections(id, user_id, slug, updated_at, updated_by) 7 | SELECT 1, id, 'coder', CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 8 | -------------------------------------------------------------------------------- /src/test/resources/db/countries-france.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates country "France" with id=2 3 | -- 4 | -- depends on: users-coder.sql 5 | -- 6 | INSERT INTO countries(id, name, slug, created_at, created_by, updated_at, updated_by) 7 | SELECT 2, 'France', 'france', CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 8 | -------------------------------------------------------------------------------- /src/test/resources/db/countries-italy.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates country "Italy" with id=1 and name in Russian 3 | -- 4 | -- depends on: users-coder.sql 5 | -- 6 | INSERT INTO countries(id, name, name_ru, slug, created_at, created_by, updated_at, updated_by) 7 | SELECT 1, 'Italy', 'Италия', 'italy', CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 8 | -------------------------------------------------------------------------------- /src/test/resources/db/series-1-fauna-qty5.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates a series with id=1, in Fauna category and 5 stamps 3 | -- 4 | -- depends on: users-coder.sql 5 | -- depends on: categories-fauna.sql 6 | -- 7 | INSERT INTO series(id, quantity, perforated, category_id, created_at, created_by, updated_at, updated_by) 8 | SELECT 1, 5, TRUE, (SELECT id FROM categories WHERE slug = 'fauna'), CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 9 | -------------------------------------------------------------------------------- /src/test/resources/db/series-2-sport-qty3.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates a series with id=2, in Sport category and 3 stamps 3 | -- 4 | -- depends on: users-coder.sql 5 | -- depends on: categories-sport.sql 6 | -- 7 | INSERT INTO series(id, quantity, perforated, category_id, created_at, created_by, updated_at, updated_by) 8 | SELECT 2, 3, TRUE, (SELECT id FROM categories WHERE slug = 'sport'), CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 9 | -------------------------------------------------------------------------------- /src/test/resources/db/series-3-sport-qty7.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates a series with id=3, in Sport category and 7 stamps 3 | -- 4 | -- depends on: users-coder.sql 5 | -- depends on: categories-sport.sql 6 | -- 7 | INSERT INTO series(id, quantity, perforated, category_id, created_at, created_by, updated_at, updated_by) 8 | SELECT 3, 7, TRUE, (SELECT id FROM categories WHERE slug = 'sport'), CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 9 | -------------------------------------------------------------------------------- /src/test/resources/db/series-4-italy-qty5.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates a series with id=4, issued in Italy and having 5 stamps 3 | -- 4 | -- depends on: users-coder.sql 5 | -- depends on: categories-sport.sql 6 | -- depends on: countries-italy.sql 7 | -- 8 | INSERT INTO series(id, quantity, perforated, category_id, country_id, created_at, created_by, updated_at, updated_by) 9 | SELECT 4, 5, TRUE, (SELECT id FROM categories WHERE slug = 'sport'), (SELECT id FROM countries WHERE slug = 'italy'), CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 10 | -------------------------------------------------------------------------------- /src/test/resources/db/series-5-france-qty4.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates a series with id=5, issued in France and having 4 stamps 3 | -- 4 | -- depends on: users-coder.sql 5 | -- depends on: categories-sport.sql 6 | -- depends on: countries-france.sql 7 | -- 8 | INSERT INTO series(id, quantity, perforated, category_id, country_id, created_at, created_by, updated_at, updated_by) 9 | SELECT 5, 4, TRUE, (SELECT id FROM categories WHERE slug = 'sport'), (SELECT id FROM countries WHERE slug = 'france'), CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 10 | -------------------------------------------------------------------------------- /src/test/resources/db/series-6-france-qty6.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates a series with id=6, issued in France and having 6 stamps 3 | -- 4 | -- depends on: users-coder.sql 5 | -- depends on: categories-sport.sql 6 | -- depends on: countries-france.sql 7 | -- 8 | INSERT INTO series(id, quantity, perforated, category_id, country_id, created_at, created_by, updated_at, updated_by) 9 | SELECT 6, 6, TRUE, (SELECT id FROM categories WHERE slug = 'sport'), (SELECT id FROM countries WHERE slug = 'france'), CURRENT_TIMESTAMP(), id, CURRENT_TIMESTAMP(), id FROM users WHERE login = 'coder'; 10 | -------------------------------------------------------------------------------- /src/test/resources/db/users-coder.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- creates user "coder" with id=1 3 | -- 4 | INSERT INTO users(id, login, role, name, email, hash, registered_at, activated_at) 5 | VALUES(1, 'coder', 'USER', 'Coder', 'coder@example.com', '', CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP()); 6 | -------------------------------------------------------------------------------- /src/test/resources/empty.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/php-coder/mystamps/6dbfeb74392633bb6219d8d89cb60e4de88ebb43/src/test/resources/empty.jpg -------------------------------------------------------------------------------- /src/test/robotframework/account/activation/misc-user.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify miscellaneous aspects of account activation from user 3 | Library SeleniumLibrary 4 | Resource ../../auth.steps.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Test Setup Before Test 8 | Force Tags account activation misc 9 | 10 | *** Test Cases *** 11 | User cannot activate account again 12 | Page Should Contain You have already activated account 13 | Page Should Not Contain Element id:activate-account-form 14 | 15 | *** Keywords *** 16 | Before Test Suite 17 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 18 | Register Keyword To Run On Failure Log Source 19 | Log In As login=coder password=test 20 | 21 | Before Test 22 | Go To ${SITE_URL}/account/activate 23 | 24 | -------------------------------------------------------------------------------- /src/test/robotframework/account/authentication/logic.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify account authentication scenarios 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags account authentication logic 7 | 8 | *** Test Cases *** 9 | Successful authentication 10 | Input Text id:login coder 11 | Input Text id:password test 12 | Submit Form id:auth-account-form 13 | Location Should Be ${SITE_URL}/ 14 | Page Should Contain Link link:Test Suite 15 | Page Should Contain Button value:Sign out 16 | 17 | Log out 18 | Go To ${SITE_URL}/account/auth 19 | Submit Form id:logout-form 20 | Location Should Be ${SITE_URL}/ 21 | Page Should Contain Link link:Sign in 22 | Page Should Contain Link link:Register 23 | 24 | *** Keywords *** 25 | Before Test Suite 26 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 27 | Register Keyword To Run On Failure Log Source 28 | 29 | -------------------------------------------------------------------------------- /src/test/robotframework/account/authentication/misc-user.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify account authentication scenarios 3 | Library SeleniumLibrary 4 | Resource ../../auth.steps.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Test Setup Before Test 8 | Force Tags account authentication misc 9 | 10 | *** Test Cases *** 11 | User cannot authenticate again 12 | Page Should Contain You have already authenticated 13 | Page Should Not Contain Element id:auth-account-form 14 | 15 | *** Keywords *** 16 | Before Test Suite 17 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 18 | Register Keyword To Run On Failure Log Source 19 | Log In As login=coder password=test 20 | 21 | Before Test 22 | Go To ${SITE_URL}/account/auth 23 | 24 | -------------------------------------------------------------------------------- /src/test/robotframework/account/authentication/validation.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify account authentication validation scenarios 3 | Library SeleniumLibrary 4 | Resource ../../selenium.utils.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags account authentication validation 8 | 9 | *** Test Cases *** 10 | Authenticate with empty credentials 11 | [Setup] Disable Client Validation auth-account-form 12 | Input Text id:login ${EMPTY} 13 | Input Text id:password ${EMPTY} 14 | Submit Form id:auth-account-form 15 | Element Text Should Be id:form.errors Invalid login or password 16 | 17 | Authenticate with invalid credentials 18 | Input Text id:login test 19 | Input Text id:password test 20 | Submit Form id:auth-account-form 21 | Element Text Should Be id:form.errors Invalid login or password 22 | 23 | *** Keywords *** 24 | Before Test Suite 25 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 26 | Register Keyword To Run On Failure Log Source 27 | 28 | -------------------------------------------------------------------------------- /src/test/robotframework/account/registration/misc-anonymous.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify miscellaneous aspects of account registration from anonymous user 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags account registration misc 7 | 8 | *** Test Cases *** 9 | Email should be striped from leading and trailing spaces 10 | Input Text id:email ${SPACE * 2}test${SPACE * 2} 11 | Submit Form id:register-account-form 12 | Textfield Value Should Be id:email test 13 | 14 | *** Keywords *** 15 | Before Test Suite 16 | Open Browser ${SITE_URL}/account/register ${BROWSER} 17 | Register Keyword To Run On Failure Log Source 18 | 19 | -------------------------------------------------------------------------------- /src/test/robotframework/account/registration/misc-user.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify miscellaneous aspects of account registration from user 3 | Library SeleniumLibrary 4 | Resource ../../auth.steps.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Test Setup Before Test 8 | Force Tags account registration misc 9 | 10 | *** Test Cases *** 11 | User cannot register account again 12 | Page Should Contain You have already registered 13 | Page Should Not Contain Element id:register-account-form 14 | 15 | *** Keywords *** 16 | Before Test Suite 17 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 18 | Register Keyword To Run On Failure Log Source 19 | Log In As login=coder password=test 20 | 21 | Before Test 22 | Go To ${SITE_URL}/account/register 23 | 24 | -------------------------------------------------------------------------------- /src/test/robotframework/auth.steps.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Common steps for users authentication 3 | 4 | *** Keywords *** 5 | Log In As 6 | [Documentation] Log in as a user 7 | [Arguments] ${login} ${password} ${openPage}=${false} 8 | Run Keyword If ${openPage} Go To ${SITE_URL}/account/auth 9 | Input Text id:login ${login} 10 | Input Password id:password ${password} 11 | Submit Form id:auth-account-form 12 | 13 | Log Out 14 | [Documentation] Logout the current user 15 | Submit Form id:logout-form 16 | -------------------------------------------------------------------------------- /src/test/robotframework/category/access.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify access to category related pages (including non-existing) 3 | Library SeleniumLibrary 4 | Resource ../selenium.utils.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags category access 8 | 9 | *** Test Cases *** 10 | Anonymous user cannot create category 11 | Go To ${SITE_URL}/category/add 12 | Element Text Should Be id:error-code 403 13 | Element Text Should Be id:error-msg Forbidden 14 | 15 | Opening a page of non-existing category show an error 16 | Go To ${SITE_URL}/category/category-404-error-test 17 | Element Text Should Be id:error-code 404 18 | Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found 19 | 20 | *** Keywords *** 21 | Before Test Suite 22 | Open Browser about:blank ${BROWSER} 23 | Register Keyword To Run On Failure Log Source 24 | 25 | -------------------------------------------------------------------------------- /src/test/robotframework/collection/access.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify access to collection related pages (including non-existing) 3 | Library SeleniumLibrary 4 | Resource ../selenium.utils.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags collection access 8 | 9 | *** Test Cases *** 10 | Opening a page of non-existing collection show an error 11 | Go To ${SITE_URL}/collection/collection-404-error-test 12 | Element Text Should Be id:error-code 404 13 | Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found 14 | 15 | *** Keywords *** 16 | Before Test Suite 17 | Open Browser about:blank ${BROWSER} 18 | Register Keyword To Run On Failure Log Source 19 | 20 | -------------------------------------------------------------------------------- /src/test/robotframework/country/access.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify access to country related pages (including non-existing) 3 | Library SeleniumLibrary 4 | Resource ../selenium.utils.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags country access 8 | 9 | *** Test Cases *** 10 | Anonymous user cannot create country 11 | Go To ${SITE_URL}/country/add 12 | Element Text Should Be id:error-code 403 13 | Element Text Should Be id:error-msg Forbidden 14 | 15 | Opening a page of non-existing country show an error 16 | Go To ${SITE_URL}/country/country-404-error-test 17 | Element Text Should Be id:error-code 404 18 | Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found 19 | 20 | *** Keywords *** 21 | Before Test Suite 22 | Open Browser about:blank ${BROWSER} 23 | Register Keyword To Run On Failure Log Source 24 | 25 | -------------------------------------------------------------------------------- /src/test/robotframework/participant/creation/misc.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify miscellaneous aspects of participant creation 3 | Library SeleniumLibrary 4 | Resource ../../auth.steps.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags participant misc 8 | 9 | *** Test Cases *** 10 | Name and url should be stripped from leading and trailing spaces 11 | Input Text id:name ${SPACE * 2}f${SPACE * 2} 12 | Input Text id:url ${SPACE * 2}url${SPACE * 2} 13 | Submit Form id:add-participant-form 14 | Textfield Value Should Be id:name f 15 | Textfield Value Should Be id:url url 16 | 17 | *** Keywords *** 18 | Before Test Suite 19 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 20 | Register Keyword To Run On Failure Log Source 21 | Log In As login=admin password=test 22 | Go To ${SITE_URL}/participant/add 23 | 24 | -------------------------------------------------------------------------------- /src/test/robotframework/series/access.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify access to series related pages (including non-existing) 3 | Library SeleniumLibrary 4 | Resource ../selenium.utils.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags series access 8 | 9 | *** Test Cases *** 10 | Anonymous user cannot create series 11 | Go To ${SITE_URL}/series/add 12 | Element Text Should Be id:error-code 403 13 | Element Text Should Be id:error-msg Forbidden 14 | 15 | Opening a page of non-existing series show an error 16 | Go To ${SITE_URL}/series/999 17 | Element Text Should Be id:error-code 404 18 | Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found 19 | 20 | *** Keywords *** 21 | Before Test Suite 22 | Open Browser about:blank ${BROWSER} 23 | Register Keyword To Run On Failure Log Source 24 | 25 | -------------------------------------------------------------------------------- /src/test/robotframework/series/add-comment/logic.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify scenarios of adding a comment to a series 3 | Library SeleniumLibrary 4 | Resource ../../auth.steps.robot 5 | Resource ../../selenium.utils.robot 6 | Suite Setup Before Test Suite 7 | Suite Teardown Close Browser 8 | Force Tags series add-comment logic htmx 9 | 10 | *** Test Cases *** 11 | Add a comment 12 | Input Text id:new-comment A comment 13 | Submit Form id:add-comment-form 14 | Wait Until Page Contains Element id:comment 15 | Element Text Should Be id:comment A comment 16 | 17 | *** Keywords *** 18 | Before Test Suite 19 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 20 | Register Keyword To Run On Failure Log Source 21 | Log In As login=coder password=test 22 | Go To ${SITE_URL}/series/4 23 | -------------------------------------------------------------------------------- /src/test/robotframework/series/add-year/logic.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify scenarios of adding a release year to a series 3 | Library SeleniumLibrary 4 | Resource ../../auth.steps.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags series add-year logic htmx 8 | 9 | *** Test Cases *** 10 | Add a release year 11 | Select From List By Value id:release-year 1995 12 | Submit Form id:add-release-year-form 13 | Wait Until Page Does Not Contain id:add-release-year-form 14 | Wait Until Page Contains Element id:issue_date 15 | Element Text Should Be id:issue_date 1995 16 | 17 | *** Keywords *** 18 | Before Test Suite 19 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 20 | Register Keyword To Run On Failure Log Source 21 | Log In As login=admin password=test 22 | Go To ${SITE_URL}/series/4 23 | -------------------------------------------------------------------------------- /src/test/robotframework/series/import/access.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify access to import series related pages 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags series import-series access 7 | 8 | *** Test Cases *** 9 | Anonymous user cannot request series import 10 | Go To ${SITE_URL}/series/import/request 11 | Element Text Should Be id:error-code 403 12 | Element Text Should Be id:error-msg Forbidden 13 | 14 | Anonymous user cannot access the status of the series import 15 | Go To ${SITE_URL}/series/import/request/1 16 | Element Text Should Be id:error-code 403 17 | Element Text Should Be id:error-msg Forbidden 18 | 19 | Anonymous user cannot see a list of import requests 20 | Go To ${SITE_URL}/series/import/requests 21 | Element Text Should Be id:error-code 403 22 | Element Text Should Be id:error-msg Forbidden 23 | 24 | *** Keywords *** 25 | Before Test Suite 26 | Open Browser about:blank ${BROWSER} 27 | Register Keyword To Run On Failure Log Source 28 | 29 | -------------------------------------------------------------------------------- /src/test/robotframework/series/import/import-validation.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Validation of a series import 3 | Library SeleniumLibrary 4 | Resource ../../auth.steps.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags series import-series validation htmx 8 | 9 | *** Test Cases *** 10 | Price and currency should be optional when seller information isn't provided 11 | Go To ${SITE_URL}/series/import/request/2 12 | Textfield Value Should Be id:seller-name Issue 1256 13 | Input Text id:seller-name ${EMPTY} 14 | Textfield Value Should Be id:seller-url http://example.com/issue/1256 15 | Input Text id:seller-url ${EMPTY} 16 | Submit Form id:create-series-form 17 | Element Text Should Be id:category_name Prehistoric animals 18 | 19 | *** Keywords *** 20 | Before Test Suite 21 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 22 | Register Keyword To Run On Failure Log Source 23 | Log In As login=admin password=test 24 | -------------------------------------------------------------------------------- /src/test/robotframework/series/sales/creation/misc.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify miscellaneous aspects of adding series sales 3 | Library SeleniumLibrary 4 | Resource ../../../auth.steps.robot 5 | Resource ../../../selenium.utils.robot 6 | Suite Setup Before Test Suite 7 | Suite Teardown Close Browser 8 | Force Tags series sales misc htmx 9 | 10 | *** Test Cases *** 11 | Url should be stripped from leading and trailing spaces 12 | [Setup] Disable Client Validation add-series-sales-form 13 | Input Text id:url ${SPACE * 2}bad-value${SPACE * 2} 14 | Submit Form id:add-series-sales-form 15 | Textfield Value Should Be id:url bad-value 16 | 17 | *** Keywords *** 18 | Before Test Suite 19 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 20 | Register Keyword To Run On Failure Log Source 21 | Log In As login=admin password=test 22 | Go To ${SITE_URL}/series/1 23 | -------------------------------------------------------------------------------- /src/test/robotframework/series/search/validation.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify series search validation scenarios 3 | Library SeleniumLibrary 4 | Resource ../../selenium.utils.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags series search validation 8 | 9 | *** Test Cases *** 10 | Search the series with empty required field 11 | [Setup] Disable Client Validation search-series-form 12 | Submit Form id:search-series-form 13 | Element Text Should Be id:catalogNumber.errors Value must not be empty 14 | 15 | *** Keywords *** 16 | Before Test Suite 17 | Open Browser ${SITE_URL}/ ${BROWSER} 18 | Register Keyword To Run On Failure Log Source 19 | -------------------------------------------------------------------------------- /src/test/robotframework/series/similar/logic.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify logic for similar series 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags series similar-series logic 7 | 8 | *** Test Cases *** 9 | Similar series should be linked to each other 10 | Go To ${SITE_URL}/series/4 11 | Page Should Contain Element css:#similar-series [href="/series/5"] 12 | Go To ${SITE_URL}/series/5 13 | Page Should Contain Element css:#similar-series [href="/series/4"] 14 | 15 | *** Keywords *** 16 | Before Test Suite 17 | Open Browser about:blank ${BROWSER} 18 | Register Keyword To Run On Failure Log Source 19 | -------------------------------------------------------------------------------- /src/test/robotframework/site/change-lang/logic.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify change language scenario 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags main-page lang logic 7 | 8 | *** Test Cases *** 9 | Language should be changed after switching language 10 | Element Text Should Be id:logo My stamps 11 | Click Link id:change-lang-link 12 | Element Text Should Be id:logo Мои марки 13 | 14 | *** Keywords *** 15 | Before Test Suite 16 | Open Browser ${SITE_URL}/ ${BROWSER} 17 | Register Keyword To Run On Failure Log Source 18 | -------------------------------------------------------------------------------- /src/test/robotframework/site/csp/report-logic.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify CSP report submission scenario 3 | Library HttpRequestLibrary 4 | Force Tags site csp logic 5 | 6 | *** Test Cases *** 7 | CSP report should be accepted 8 | Create Session server ${SITE_URL} 9 | Post Request server /site/csp/reports data="{}" 10 | Response Code Should Be server 204 11 | -------------------------------------------------------------------------------- /src/test/robotframework/site/error-page/misc.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify error pages 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags error-page misc 7 | 8 | *** Test Cases *** 9 | Client should see a custom page for Bad Request error 10 | Title Should Be 400: bad request 11 | Element Text Should Be id:error-code 400 12 | Element Text Should Be id:error-msg Bad request 13 | 14 | *** Keywords *** 15 | Before Test Suite 16 | Open Browser ${SITE_URL}/series/info ${BROWSER} 17 | Register Keyword To Run On Failure Log Source 18 | 19 | -------------------------------------------------------------------------------- /src/test/robotframework/togglz/access-anonymous.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify access to Togglz console from anonymous user 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags togglz access 7 | 8 | *** Test Cases *** 9 | Anonymous user don't have access to Togglz console 10 | Go To ${SITE_URL}/togglz 11 | Element Text Should Be id:error-code 403 12 | Element Text Should Be id:error-msg Forbidden 13 | 14 | *** Keywords *** 15 | Before Test Suite 16 | Open Browser about:blank ${BROWSER} 17 | Register Keyword To Run On Failure Log Source 18 | 19 | -------------------------------------------------------------------------------- /src/test/robotframework/togglz/access-user.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify access to Togglz console from user 3 | Library SeleniumLibrary 4 | Resource ../auth.steps.robot 5 | Suite Setup Before Test Suite 6 | Suite Teardown Close Browser 7 | Force Tags togglz access 8 | 9 | *** Test Cases *** 10 | User don't have access to Togglz console 11 | Go To ${SITE_URL}/togglz 12 | Element Text Should Be id:error-code 403 13 | Element Text Should Be id:error-msg Forbidden 14 | 15 | *** Keywords *** 16 | Before Test Suite 17 | Open Browser ${SITE_URL}/account/auth ${BROWSER} 18 | Register Keyword To Run On Failure Log Source 19 | Log In As login=coder password=test 20 | 21 | -------------------------------------------------------------------------------- /src/test/robotframework/togglz/misc.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Verify that togglz works 3 | Library SeleniumLibrary 4 | Suite Setup Before Test Suite 5 | Suite Teardown Close Browser 6 | Force Tags togglz misc 7 | 8 | *** Test Cases *** 9 | Extra characters should never be shown if Togglz works 10 | Page Should Not Contain Element id:always-disabled-element 11 | 12 | *** Keywords *** 13 | Before Test Suite 14 | Open Browser ${SITE_URL} ${BROWSER} 15 | Register Keyword To Run On Failure Log Source 16 | -------------------------------------------------------------------------------- /src/test/wiremock/__files/series/import/request-logic/catalog-numbers-in-description.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Series info (catalog numbers in description) 6 | 7 | 8 | Image: series image 9 |
10 | Info: Спорт, 17 марок, Mi# 2242-2246 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/test/wiremock/__files/series/import/request-logic/charset-windows-1251.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/php-coder/mystamps/6dbfeb74392633bb6219d8d89cb60e4de88ebb43/src/test/wiremock/__files/series/import/request-logic/charset-windows-1251.html -------------------------------------------------------------------------------- /src/test/wiremock/__files/series/import/request-logic/existing-seller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Series info (existing seller) 6 | 7 | 8 | Image: series image
9 | Seller: Eicca Toppinen
10 | Price: 111 RUB (1.5 EUR)
11 | 15 | Info: Спорт, 3 марки 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/test/wiremock/__files/series/import/request-logic/new-seller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Series info (new seller) 6 | 7 | 8 | Image: series image
9 | Seller: Lando Livianus
10 | Price: 320.5 RUB
11 | 15 | Info: Спорт, 7 марок 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/test/wiremock/__files/series/import/request-logic/simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | test 5 | 6 | 7 | test 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/test/wiremock/__files/series/sales/import/logic/empty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Empty page 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/test/wiremock/__files/series/sales/import/logic/existing-seller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Series sale (existing seller) 6 | 7 | 8 | Seller: Eicca Toppinen
9 | Price: 350 (6.3 EUR)
10 | 11 | 12 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/mailgun/send-message.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/mailgun/send-message" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json" 10 | }, 11 | "jsonBody": { 12 | "id": "<20190507194211.0.B96DD98C0E6AAA9A@wiremock.localhost>", 13 | "message": "Queued. Thank you." 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/empty-jpeg-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/empty-jpeg-file" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "image/jpeg", 10 | "Content-Length": "0" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/import/request-logic/catalog-numbers-in-description.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/import/request-logic/catalog-numbers-in-description.html" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "text/html" 10 | }, 11 | "bodyFileName": "series/import/request-logic/catalog-numbers-in-description.html" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/import/request-logic/charset-windows-1251.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/import/request-logic/charset-windows-1251.html" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "text/html;charset=windows-1251" 10 | }, 11 | "bodyFileName": "series/import/request-logic/charset-windows-1251.html" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/import/request-logic/existing-seller.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/import/request-logic/existing-seller.html" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "text/html" 10 | }, 11 | "bodyFileName": "series/import/request-logic/existing-seller.html" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/import/request-logic/new-seller.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/import/request-logic/new-seller.html" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "text/html" 10 | }, 11 | "bodyFileName": "series/import/request-logic/new-seller.html" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/import/request-logic/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/import/request-logic/simple.html" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "text/html" 10 | }, 11 | "bodyFileName": "series/import/request-logic/simple.html" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/not-image-file.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/not-image-file" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json" 10 | }, 11 | "jsonBody": "test" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/response-301.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/response-301" 5 | }, 6 | "response": { 7 | "status": 301, 8 | "headers": { 9 | "Location": "http://127.0.0.1:8080" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/response-400.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/response-400" 5 | }, 6 | "response": { 7 | "status": 400 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/response-404.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/response-404" 5 | }, 6 | "response": { 7 | "status": 404 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/sales/import/logic/empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/sales/import/logic/empty.html" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "text/html" 10 | }, 11 | "bodyFileName": "series/sales/import/logic/empty.html" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/wiremock/mappings/series/sales/import/logic/existing-seller.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/series/sales/import/logic/existing-seller.html" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "text/html" 10 | }, 11 | "bodyFileName": "series/sales/import/logic/existing-seller.html" 12 | } 13 | } 14 | --------------------------------------------------------------------------------