Merge branch 'feature/SUPPORT-9359' into develop
This commit is contained in:
commit
d494ea4c06
3 changed files with 7 additions and 11 deletions
|
|
@ -20,8 +20,8 @@ public abstract class AbstractIdmValidatorService implements IdmValidatorService
|
||||||
protected RestTemplate restTemplate;
|
protected RestTemplate restTemplate;
|
||||||
protected SecurityContext securityContext;
|
protected SecurityContext securityContext;
|
||||||
|
|
||||||
@Value("${ervu.url}")
|
@Value("${idm.url}")
|
||||||
protected String ervuUrl;
|
protected String idmUrl;
|
||||||
|
|
||||||
protected AbstractIdmValidatorService(RestTemplate restTemplate, SecurityContext securityContext) {
|
protected AbstractIdmValidatorService(RestTemplate restTemplate, SecurityContext securityContext) {
|
||||||
this.restTemplate = restTemplate;
|
this.restTemplate = restTemplate;
|
||||||
|
|
@ -30,8 +30,7 @@ public abstract class AbstractIdmValidatorService implements IdmValidatorService
|
||||||
|
|
||||||
protected boolean checkExistsByQuery(String endpoint, String queryParamName, String queryParamValue) {
|
protected boolean checkExistsByQuery(String endpoint, String queryParamName, String queryParamValue) {
|
||||||
URI uri = UriComponentsBuilder
|
URI uri = UriComponentsBuilder
|
||||||
.fromHttpUrl(ervuUrl)
|
.fromHttpUrl(idmUrl)
|
||||||
.path(PathConstant.IDM_PATH)
|
|
||||||
.pathSegment(PathConstant.PERSONS_PATH)
|
.pathSegment(PathConstant.PERSONS_PATH)
|
||||||
.path(endpoint)
|
.path(endpoint)
|
||||||
.queryParam(queryParamName, queryParamValue)
|
.queryParam(queryParamName, queryParamValue)
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ public class AccountFetchService implements EntityFetchService<Account> {
|
||||||
private final RestTemplate restTemplate;
|
private final RestTemplate restTemplate;
|
||||||
private final ObjectMapper mapper;
|
private final ObjectMapper mapper;
|
||||||
private final SecurityContext securityContext;
|
private final SecurityContext securityContext;
|
||||||
@Value("${ervu.url}")
|
@Value("${idm.url}")
|
||||||
private String ervuUrl;
|
private String idmUrl;
|
||||||
@ObjectRef
|
@ObjectRef
|
||||||
public EditableGridColumn editableGridColumnRef;
|
public EditableGridColumn editableGridColumnRef;
|
||||||
|
|
||||||
|
|
@ -77,8 +77,7 @@ public class AccountFetchService implements EntityFetchService<Account> {
|
||||||
headers.setBearerAuth(securityContext.getToken());
|
headers.setBearerAuth(securityContext.getToken());
|
||||||
HttpEntity<SearchRequest> httpEntity = new HttpEntity<>(request, headers);
|
HttpEntity<SearchRequest> httpEntity = new HttpEntity<>(request, headers);
|
||||||
|
|
||||||
URI uri = UriComponentsBuilder.fromHttpUrl(ervuUrl)
|
URI uri = UriComponentsBuilder.fromHttpUrl(idmUrl)
|
||||||
.path(PathConstant.IDM_PATH)
|
|
||||||
.pathSegment(PathConstant.ACCOUNTS_PATH, "search", "v1")
|
.pathSegment(PathConstant.ACCOUNTS_PATH, "search", "v1")
|
||||||
.build()
|
.build()
|
||||||
.toUri();
|
.toUri();
|
||||||
|
|
@ -118,8 +117,7 @@ public class AccountFetchService implements EntityFetchService<Account> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Account fetchAccountById(Object id) {
|
private Account fetchAccountById(Object id) {
|
||||||
URI uri = UriComponentsBuilder.fromHttpUrl(ervuUrl)
|
URI uri = UriComponentsBuilder.fromHttpUrl(idmUrl)
|
||||||
.path(PathConstant.IDM_PATH)
|
|
||||||
.pathSegment(PathConstant.ACCOUNTS_PATH, id.toString(), "v1")
|
.pathSegment(PathConstant.ACCOUNTS_PATH, id.toString(), "v1")
|
||||||
.build()
|
.build()
|
||||||
.toUri();
|
.toUri();
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ package ru.micord.ervu.account_applications.service.constant;
|
||||||
public final class PathConstant {
|
public final class PathConstant {
|
||||||
public static final String ACCOUNTS_PATH = "accounts";
|
public static final String ACCOUNTS_PATH = "accounts";
|
||||||
public static final String PERSONS_PATH = "persons";
|
public static final String PERSONS_PATH = "persons";
|
||||||
public static final String IDM_PATH = "/service/idm";
|
|
||||||
|
|
||||||
private PathConstant() {
|
private PathConstant() {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue