Commit b2fe1e43 authored by Colin DAMON's avatar Colin DAMON

Mark generated classes as so

parent 6f3aa114
......@@ -217,8 +217,6 @@ For more information refer to [Using Docker and Docker-Compose][], this page als
To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information.
[jhipster homepage and latest documentation]: https://www.jhipster.tech
[jhipster 6.10.1 archive]: https://www.jhipster.tech/documentation-archive/v6.10.1
[using jhipster in development]: https://www.jhipster.tech/documentation-archive/v6.10.1/development/
[using docker and docker-compose]: https://www.jhipster.tech/documentation-archive/v6.10.1/docker-compose
[using jhipster in production]: https://www.jhipster.tech/documentation-archive/v6.10.1/production/
......@@ -226,12 +224,7 @@ To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`)
[code quality page]: https://www.jhipster.tech/documentation-archive/v6.10.1/code-quality/
[setting up continuous integration]: https://www.jhipster.tech/documentation-archive/v6.10.1/setting-up-ci/
[node.js]: https://nodejs.org/
[yarn]: https://yarnpkg.org/
[webpack]: https://webpack.github.io/
[angular cli]: https://cli.angular.io/
[browsersync]: https://www.browsersync.io/
[jest]: https://facebook.github.io/jest/
[jasmine]: https://jasmine.github.io/2.0/introduction.html
[protractor]: https://angular.github.io/protractor/
[leaflet]: https://leafletjs.com/
[definitelytyped]: https://definitelytyped.org/
......@@ -497,6 +497,11 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<configuration>
<excludes>
<exclude>com/ippon/borestop/domain/*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>pre-unit-tests</id>
......
package com.ippon.borestop;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.DefaultProfileUtil;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* This is a helper Java class that provides an alternative to creating a {@code web.xml}.
* This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc.
* This is a helper Java class that provides an alternative to creating a {@code web.xml}. This will be invoked only
* when the application is deployed to a Servlet container like Tomcat, JBoss etc.
*/
@Generated
public class ApplicationWebXml extends SpringBootServletInitializer {
@Override
......
package com.ippon.borestop;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.config.ApplicationProperties;
import io.github.jhipster.config.DefaultProfileUtil;
import io.github.jhipster.config.JHipsterConstants;
......@@ -17,6 +18,7 @@ import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.core.env.Environment;
@Generated
@SpringBootApplication
@EnableConfigurationProperties({ LiquibaseProperties.class, ApplicationProperties.class })
public class BorestopApp {
......
package com.ippon.borestop.aop.logging;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterConstants;
import java.util.Arrays;
import org.aspectj.lang.JoinPoint;
......@@ -19,6 +20,7 @@ import org.springframework.core.env.Profiles;
* By default, it only runs with the "dev" profile.
*/
@Aspect
@Generated
public class LoggingAspect {
private final Environment env;
......
package com.ippon.borestop.common.infrastructure;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.TYPE, ElementType.CONSTRUCTOR })
public @interface Generated {
}
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
......@@ -8,5 +9,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* Properties are configured in the {@code application.yml} file.
* See {@link io.github.jhipster.config.JHipsterProperties} for a good example.
*/
@Generated
@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
public class ApplicationProperties {}
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor;
import java.util.concurrent.Executor;
import org.slf4j.Logger;
......@@ -14,8 +15,9 @@ import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Configuration
@Generated
@EnableAsync
@Configuration
@EnableScheduling
public class AsyncConfiguration implements AsyncConfigurer {
private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class);
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterConstants;
import javax.sql.DataSource;
import org.slf4j.Logger;
......@@ -8,6 +9,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.config.java.AbstractCloudConfig;
import org.springframework.context.annotation.*;
@Generated
@Configuration
@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD)
public class CloudDatabaseConfiguration extends AbstractCloudConfig {
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
/**
* Application constants.
*/
@Generated
public final class Constants {
// Regex for acceptable logins
public static final String LOGIN_REGEX = "^(?>[a-zA-Z0-9!$&*+=?^_`{|}~.-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)|(?>[_.@A-Za-z0-9-]+)$";
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.h2.H2ConfigurationHelper;
import java.sql.SQLException;
......@@ -13,6 +14,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@Generated
@Configuration
@EnableJpaRepositories("com.ippon.borestop.repository")
@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware")
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
......@@ -8,6 +9,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* Configure the converters to use the ISO format for dates by default.
*/
@Generated
@Configuration
public class DateTimeFormatConfiguration implements WebMvcConfigurer {
......
......@@ -3,11 +3,13 @@ package com.ippon.borestop.config;
import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.ippon.borestop.common.infrastructure.Generated;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.zalando.problem.ProblemModule;
import org.zalando.problem.violations.ConstraintViolationProblemModule;
@Generated
@Configuration
public class JacksonConfiguration {
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.liquibase.SpringLiquibaseUtil;
import java.util.concurrent.Executor;
......@@ -17,6 +18,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
@Generated
@Configuration
public class LiquibaseConfiguration {
private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class);
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.locale.AngularCookieLocaleResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -7,6 +8,7 @@ import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
@Generated
@Configuration
public class LocaleConfiguration implements WebMvcConfigurer {
......
package com.ippon.borestop.config;
import com.ippon.borestop.aop.logging.LoggingAspect;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterConstants;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
@Generated
@Configuration
@EnableAspectJAutoProxy
public class LoggingAspectConfiguration {
......
......@@ -5,6 +5,7 @@ import static io.github.jhipster.config.logging.LoggingUtils.*;
import ch.qos.logback.classic.LoggerContext;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterProperties;
import java.util.HashMap;
import java.util.Map;
......@@ -15,6 +16,7 @@ import org.springframework.context.annotation.Configuration;
/*
* Configures the console and Logstash log appenders from the app properties
*/
@Generated
@Configuration
public class LoggingConfiguration {
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.security.*;
import com.ippon.borestop.security.jwt.*;
import org.springframework.context.annotation.Bean;
......@@ -18,6 +19,7 @@ import org.springframework.security.web.header.writers.ReferrerPolicyHeaderWrite
import org.springframework.web.filter.CorsFilter;
import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport;
@Generated
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@Import(SecurityProblemSupport.class)
......
package com.ippon.borestop.config;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import java.util.concurrent.TimeUnit;
......@@ -10,6 +11,7 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistra
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Generated
@Configuration
@Profile({ JHipsterConstants.SPRING_PROFILE_PRODUCTION })
public class StaticResourcesWebConfiguration implements WebMvcConfigurer {
......
......@@ -2,6 +2,7 @@ package com.ippon.borestop.config;
import static java.net.URLDecoder.decode;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import io.github.jhipster.config.h2.H2ConfigurationHelper;
......@@ -27,6 +28,7 @@ import org.springframework.web.filter.CorsFilter;
/**
* Configuration of web application with Servlet 3.0 APIs.
*/
@Generated
@Configuration
public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> {
private final Logger log = LoggerFactory.getLogger(WebConfigurer.class);
......
package com.ippon.borestop.config.audit;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.domain.PersistentAuditEvent;
import java.util.*;
import org.springframework.boot.actuate.audit.AuditEvent;
......@@ -7,6 +8,7 @@ import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.stereotype.Component;
@Component
@Generated
public class AuditEventConverter {
/**
......
package com.ippon.borestop.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ippon.borestop.common.infrastructure.Generated;
import java.io.Serializable;
import java.time.Instant;
import javax.persistence.Column;
......@@ -16,6 +17,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
* Base abstract class for entities which will hold definitions for created, last modified, created by,
* last modified by attributes.
*/
@Generated
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractAuditingEntity implements Serializable {
......
package com.ippon.borestop.domain;
import com.ippon.borestop.common.infrastructure.Generated;
import java.io.Serializable;
import java.util.Objects;
import javax.persistence.Column;
......@@ -13,6 +14,7 @@ import javax.validation.constraints.Size;
* An authority (a security role) used by Spring Security.
*/
@Entity
@Generated
@Table(name = "jhi_authority")
public class Authority implements Serializable {
private static final long serialVersionUID = 1L;
......
package com.ippon.borestop.domain;
import com.ippon.borestop.common.infrastructure.Generated;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashMap;
......@@ -13,6 +14,7 @@ import javax.validation.constraints.NotNull;
* @see org.springframework.boot.actuate.audit.AuditEvent
*/
@Entity
@Generated
@Table(name = "jhi_persistent_audit_event")
public class PersistentAuditEvent implements Serializable {
private static final long serialVersionUID = 1L;
......
package com.ippon.borestop.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.config.Constants;
import java.io.Serializable;
import java.time.Instant;
......@@ -19,6 +20,7 @@ import org.hibernate.annotations.BatchSize;
* A user.
*/
@Entity
@Generated
@Table(name = "jhi_user")
public class User extends AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
......
package com.ippon.borestop.repository;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.config.Constants;
import com.ippon.borestop.config.audit.AuditEventConverter;
import com.ippon.borestop.domain.PersistentAuditEvent;
......@@ -16,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
/**
* An implementation of Spring Boot's {@link AuditEventRepository}.
*/
@Generated
@Repository
public class CustomAuditEventRepository implements AuditEventRepository {
private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE";
......
package com.ippon.borestop.security;
import com.ippon.borestop.common.infrastructure.Generated;
/**
* Constants for Spring Security authorities.
*/
@Generated
public final class AuthoritiesConstants {
public static final String ADMIN = "ROLE_ADMIN";
......
package com.ippon.borestop.security;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.domain.User;
import com.ippon.borestop.repository.UserRepository;
import java.util.*;
......@@ -18,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
/**
* Authenticate a user from the database.
*/
@Generated
@Component("userDetailsService")
public class DomainUserDetailsService implements UserDetailsService {
private final Logger log = LoggerFactory.getLogger(DomainUserDetailsService.class);
......
package com.ippon.borestop.security;
import com.ippon.borestop.common.infrastructure.Generated;
import java.util.Optional;
import java.util.stream.Stream;
import org.springframework.security.core.Authentication;
......@@ -11,6 +12,7 @@ import org.springframework.security.core.userdetails.UserDetails;
/**
* Utility class for Spring Security.
*/
@Generated
public final class SecurityUtils {
private SecurityUtils() {}
......
package com.ippon.borestop.security;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.config.Constants;
import java.util.Optional;
import org.springframework.data.domain.AuditorAware;
......@@ -8,6 +9,7 @@ import org.springframework.stereotype.Component;
/**
* Implementation of {@link AuditorAware} based on Spring Security.
*/
@Generated
@Component
public class SpringSecurityAuditorAware implements AuditorAware<String> {
......
package com.ippon.borestop.security;
import com.ippon.borestop.common.infrastructure.Generated;
import org.springframework.security.core.AuthenticationException;
/**
* This exception is thrown in case of a not activated user trying to authenticate.
*/
@Generated
public class UserNotActivatedException extends AuthenticationException {
private static final long serialVersionUID = 1L;
......
package com.ippon.borestop.security.jwt;
import com.ippon.borestop.common.infrastructure.Generated;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.DefaultSecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
@Generated
public class JWTConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> {
private final TokenProvider tokenProvider;
......
package com.ippon.borestop.security.jwt;
import com.ippon.borestop.common.infrastructure.Generated;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
......@@ -15,6 +16,7 @@ import org.springframework.web.filter.GenericFilterBean;
* Filters incoming requests and installs a Spring Security principal if a header corresponding to a valid user is
* found.
*/
@Generated
public class JWTFilter extends GenericFilterBean {
public static final String AUTHORIZATION_HEADER = "Authorization";
......
package com.ippon.borestop.security.jwt;
import com.ippon.borestop.common.infrastructure.Generated;
import io.github.jhipster.config.JHipsterProperties;
import io.jsonwebtoken.*;
import io.jsonwebtoken.io.Decoders;
......@@ -19,6 +20,7 @@ import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
@Generated
@Component
public class TokenProvider {
private final Logger log = LoggerFactory.getLogger(TokenProvider.class);
......
package com.ippon.borestop.service;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.config.audit.AuditEventConverter;
import com.ippon.borestop.repository.PersistenceAuditEventRepository;
import io.github.jhipster.config.JHipsterProperties;
......@@ -21,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
* This is the default implementation to support SpringBoot Actuator {@code AuditEventRepository}.
*/
@Service
@Generated
@Transactional
public class AuditEventService {
private final Logger log = LoggerFactory.getLogger(AuditEventService.class);
......
package com.ippon.borestop.service;
import com.ippon.borestop.common.infrastructure.Generated;
@Generated
public class EmailAlreadyUsedException extends RuntimeException {
private static final long serialVersionUID = 1L;
......
package com.ippon.borestop.service;
import com.ippon.borestop.common.infrastructure.Generated;
@Generated
public class InvalidPasswordException extends RuntimeException {
private static final long serialVersionUID = 1L;
......
package com.ippon.borestop.service;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.domain.User;
import io.github.jhipster.config.JHipsterProperties;
import java.nio.charset.StandardCharsets;
......@@ -23,6 +24,7 @@ import org.thymeleaf.spring5.SpringTemplateEngine;
* We use the {@link Async} annotation to send emails asynchronously.
*/
@Service
@Generated
public class MailService {
private final Logger log = LoggerFactory.getLogger(MailService.class);
......
package com.ippon.borestop.service;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.config.Constants;
import com.ippon.borestop.domain.Authority;
import com.ippon.borestop.domain.User;
......@@ -26,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
* Service class for managing users.
*/
@Service
@Generated
@Transactional
public class UserService {
private final Logger log = LoggerFactory.getLogger(UserService.class);
......
package com.ippon.borestop.service;
import com.ippon.borestop.common.infrastructure.Generated;
@Generated
public class UsernameAlreadyUsedException extends RuntimeException {
private static final long serialVersionUID = 1L;
......
package com.ippon.borestop.service.dto;
import com.ippon.borestop.common.infrastructure.Generated;
/**
* A DTO representing a password change required data - current and new password.
*/
@Generated
public class PasswordChangeDTO {
private String currentPassword;
private String newPassword;
......
package com.ippon.borestop.service.dto;
import com.ippon.borestop.common.infrastructure.Generated;
import com.ippon.borestop.config.Constants;
import com.ippon.borestop.domain.Authority;
import com.ippon.borestop.domain.User;
......@@ -11,6 +12,7 @@ import javax.validation.constraints.*;
/**
* A DTO representing a user, with his authorities.
*/
@Generated
public class UserDTO {
private Long id;
......