Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Aug 8, 2023
1 parent a885533 commit 27e75fd
Show file tree
Hide file tree
Showing 32 changed files with 43 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import java.util.UUID;
<%_ } _%>
/**
* Service Interface for managing {@link <% if (dtoMapstruct) { %><%= entityAbsolutePackage %>.domain.<% } %><%= persistClass %>}.
* Service Interface for managing {@link <%= entityAbsoluteClass %>}.
*/
public interface <%= entityClass %>Service {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ filterVariables.push({ filterType : oauthAwareReferenceFilterType,
});
_%>
/**
* Criteria class for the {@link <%= entityAbsolutePackage %>.domain.<%= persistClass %>} entity. This class is used
* Criteria class for the {@link <%= entityAbsoluteClass %>} entity. This class is used
* in {@link <%= entityAbsolutePackage %>.web.rest.<%= entityClass %>Resource} to receive all the possible filtering options from
* the Http GET request parameters.
* For example the following could be a valid request:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ import static org.springframework.data.elasticsearch.client.elc.QueryBuilders.*;
<%_ } _%>
/**
* Service Implementation for managing {@link <%= persistClass %>}.
* Service Implementation for managing {@link <%= entityAbsoluteClass %>}.
*/
@Service<% if (databaseTypeSql) { %>
@Transactional<% } %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ import static org.springframework.data.elasticsearch.client.elc.QueryBuilders.*;
<%_ } _%>
/**
* REST controller for managing {@link <%= entityAbsolutePackage %>.domain.<%= persistClass %>}.
* REST controller for managing {@link <%= entityAbsoluteClass %>}.
*/
@RestController
@RequestMapping("/api")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import com.datastax.oss.driver.api.mapper.annotations.Mapper;
import com.datastax.oss.driver.api.mapper.annotations.Select;
<%_ } _%>
import <%= packageName %>.domain.PersistentToken;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ if (!databaseTypeCassandra) { _%>
import java.time.LocalDate;
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package <%= packageName %>.repository;
<%_ if (databaseTypeSql && reactive) { _%>
import <%= packageName %>.domain.Authority;
<%_ } _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ if (databaseTypeCassandra) { _%>
import com.datastax.oss.driver.api.core.CqlIdentifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-%>
package <%= packageName %>.security;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j) { _%>
import <%= packageName %>.domain.Authority;
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-%>
package <%= packageName %>.service;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import tech.jhipster.config.JHipsterProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import <%= packageName %>.config.Constants;
import <%= packageName %>.domain.Authority;
<%_ } _%>
<%_ if (!databaseTypeNo) { _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { _%>
import <%= packageName %>.repository.AuthorityRepository;
<%_ if (authenticationTypeSession && !reactive) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import <%= packageName %>.config.Constants;
<% if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j) { %>
import <%= packageName %>.domain.Authority;<% } %>
<%_ if (!databaseTypeNo) { _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ } _%>
import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package <%= packageName %>.service.dto;
<%_ if (!databaseTypeNo) { _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ } _%>
import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package <%= packageName %>.service.mapper;
<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j) { _%>
import <%= packageName %>.domain.Authority;
<%_ } _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.service.dto.<%= user.adminUserDto %>;
import <%= packageName %>.service.dto.<%= user.dtoClass %>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import <%= packageName %>.domain.PersistentToken;
import <%= packageName %>.repository.PersistentTokenRepository;
<%_ } _%>
<%_ if (!reactive) { _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ } _%>
import <%= packageName %>.repository.UserRepository;
import <%= packageName %>.security.SecurityUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ public class PublicUserResource {
/**
* {@code GET /users} : get all users with only the public informations - calling this are allowed for anyone.
*<% if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { %>
<%_ if (reactive) { _%>
<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { _%>
*
<%_ if (reactive) { _%>
* @param request a {@link ServerHttpRequest} request.
<%_ } _%>
* @param pageable the pagination information.<% } %>
<%_ } _%>
* @param pageable the pagination information.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body all users.
<%_ } _%>
*/
@GetMapping("/users")
<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package <%= packageName %>.web.rest;
import <%= packageName %>.config.Constants;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.repository.UserRepository;
import <%= packageName %>.security.AuthoritiesConstants;
import <%= packageName %>.service.MailService;
Expand Down Expand Up @@ -90,7 +90,7 @@ import static org.springframework.data.elasticsearch.client.elc.QueryBuilders.*;
/**
* REST controller for managing users.
* <p>
* This class accesses the {@link <%= packageName %>.domain.<%= user.persistClass %>} entity, and needs to fetch its collection of authorities.
* This class accesses the {@link <%= user.entityAbsoluteClass %>} entity, and needs to fetch its collection of authorities.
* <p>
* For a normal use-case, it would be better to have an eager relationship between User and Authority,
* and send everything to the client side: there would be no View Model and DTO, a lot less code, and an outer-join
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import <%= packageName %>.IntegrationTest;
<%_ if (databaseTypeSql && reactive) { _%>
import <%= packageName %>.config.Constants;
<%_ } _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.repository.UserRepository;
import org.apache.commons.lang3.RandomStringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package <%= packageName %>.service;
import <%= packageName %>.config.Constants;
import <%= packageName %>.IntegrationTest;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import tech.jhipster.config.JHipsterProperties;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import <%= packageName %>.config.Constants;
import <%= packageName %>.domain.PersistentToken;
<%_ } _%>
<%_ if (!databaseTypeNo) { _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ } _%>
<%_ if ((databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) && authenticationTypeSession && !reactive) { _%>
import <%= packageName %>.repository.PersistentTokenRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-%>
package <%= packageName %>.service.mapper;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.service.dto.<%= user.adminUserDto %>;
import <%= packageName %>.service.dto.<%= user.dtoClass %>;
<%_ if (!authenticationTypeOauth2) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import <%= packageName %>.config.Constants;
<%_ if (authenticationTypeSession && !reactive) { _%>
import <%= packageName %>.domain.PersistentToken;
<%_ } _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j) { _%>
import <%= packageName %>.repository.AuthorityRepository;
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import <%= packageName %>.IntegrationTest;
<%_ if (databaseTypeSql && reactive) { _%>
import <%= packageName %>.config.Constants;
<%_ } _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.repository.UserRepository;
<%_ } _%>
import <%= packageName %>.web.rest.vm.LoginVM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import <%= packageName %>.config.Constants;
<%_ if (authenticationTypeOauth2) { _%>
import <%= packageName %>.config.TestSecurityConfiguration;
<%_ } _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.repository.UserRepository;
<%_ if (searchEngineElasticsearch) { _%>
import <%= packageName %>.repository.search.UserSearchRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import <%= packageName %>.config.Constants;
<%_ if (!databaseTypeCassandra && !databaseTypeCouchbase) { _%>
import <%= packageName %>.domain.Authority;
<%_ } _%>
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
<%_ if (databaseTypeSql && reactive) { _%>
import <%= packageName %>.repository.AuthorityRepository;
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ public class CacheConfiguration {
createCache(cm, <%= packageName %>.repository.UserRepository.USERS_BY_LOGIN_CACHE);
createCache(cm, <%= packageName %>.repository.UserRepository.USERS_BY_EMAIL_CACHE);
<%_ if (enableHibernateCache) { _%>
createCache(cm, <%= packageName %>.domain.<%= user.persistClass %>.class.getName());
createCache(cm, <%= user.entityAbsoluteClass %>.class.getName());
createCache(cm, <%= packageName %>.domain.Authority.class.getName());
createCache(cm, <%= packageName %>.domain.<%= user.persistClass %>.class.getName() + ".authorities");
createCache(cm, <%= user.entityAbsoluteClass %>.class.getName() + ".authorities");
<%_ if (authenticationTypeSession) { _%>
createCache(cm, <%= packageName %>.domain.PersistentToken.class.getName());
createCache(cm, <%= packageName %>.domain.<%= user.persistClass %>.class.getName() + ".persistentTokens");
createCache(cm, <%= user.entityAbsoluteClass %>.class.getName() + ".persistentTokens");
<%_ } _%>
<%_ } _%>
<%_ } _%>
Expand Down Expand Up @@ -778,12 +778,12 @@ public class CacheConfiguration {
createCache(cm, <%= packageName %>.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration);
createCache(cm, <%= packageName %>.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration);
<%_ if (enableHibernateCache) { _%>
createCache(cm, <%= packageName %>.domain.<%= user.persistClass %>.class.getName(), jcacheConfiguration);
createCache(cm, <%= user.entityAbsoluteClass %>.class.getName(), jcacheConfiguration);
createCache(cm, <%= packageName %>.domain.Authority.class.getName(), jcacheConfiguration);
createCache(cm, <%= packageName %>.domain.<%= user.persistClass %>.class.getName() + ".authorities", jcacheConfiguration);
createCache(cm, <%= user.entityAbsoluteClass %>.class.getName() + ".authorities", jcacheConfiguration);
<%_ if (authenticationTypeSession) { _%>
createCache(cm, <%= packageName %>.domain.PersistentToken.class.getName(), jcacheConfiguration);
createCache(cm, <%= packageName %>.domain.<%= user.persistClass %>.class.getName() + ".persistentTokens", jcacheConfiguration);
createCache(cm, <%= user.entityAbsoluteClass %>.class.getName() + ".persistentTokens", jcacheConfiguration);
<%_ } _%>
<%_ } _%>
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<&_ if (fragment.staticImportSection) { -&>
<%_ if (!embedded) { _%>
import static <%= packageName %>.config.Constants.ID_DELIMITER;
import static <%= packageName %>.domain.<%= persistClass %>.TYPE_NAME;
import static <%= entityAbsoluteClass %>.TYPE_NAME;
import static org.springframework.data.couchbase.core.mapping.id.GenerationStrategy.UNIQUE;
<%_ } _%>
<&_ } -&>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package <%= packageName %>.repository;

import <%= packageName %>.domain.PersistentToken;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import org.springframework.data.couchbase.repository.CouchbaseRepository;
import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import org.springframework.stereotype.Repository;
import java.util.UUID;
<%_ } _%>
import static <%= packageName %>.domain.<%= persistClass %>.TYPE_NAME;
import static <%= entityAbsoluteClass %>.TYPE_NAME;
/**
* Spring Data Couchbase repository for the <%= persistClass %> entity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-%>
package <%= packageName %>.repository.search;

import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.repository.<%= user.persistClass %>Repository;

<%_ if (reactive) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package <%= packageName %>.config.dbmigrations;
import <%= packageName %>.domain.Authority;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import <%= packageName %>.security.AuthoritiesConstants;
import <%= packageName %>.config.Constants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"ROLE_USER",
"ROLE_ADMIN"
],
"_class": "<%= packageName %>.domain.<%= user.persistClass %>"
"_class": "<%= user.entityAbsoluteClass %>"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"authorities": [
"ROLE_USER"
],
"_class": "<%= packageName %>.domain.<%= user.persistClass %>"
"_class": "<%= user.entityAbsoluteClass %>"
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import java.util.function.BiFunction;
import org.springframework.stereotype.Service;
import <%= packageName %>.domain.<%= user.persistClass %>;
import <%= user.entityAbsoluteClass %>;
import io.r2dbc.spi.Row;
Expand Down

0 comments on commit 27e75fd

Please sign in to comment.