config changes

This commit is contained in:
Efstratios Giannopoulos 2024-04-17 13:54:00 +03:00
parent 3d8ba6ea7e
commit 2f0056c62b
10 changed files with 30 additions and 26 deletions

View File

@ -257,7 +257,7 @@ public class ReferenceQuery extends QueryBase<ReferenceEntity> {
if (this.like != null && !this.like.isEmpty()) {
predicates.add(queryContext.CriteriaBuilder.or(queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceEntity._label), this.like),
queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceEntity._description), this.like),
queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceEntity._source), this.like)
queryUtilsService.ilike(queryContext.CriteriaBuilder, queryContext.Root.get(ReferenceEntity._reference), this.like)
));
}
if (this.isActives != null) {

View File

@ -233,7 +233,7 @@ public class ReferenceServiceImpl implements ReferenceService {
private List<Reference> fetchReferenceFromDb(ReferenceSearchLookup lookup){
ReferenceQuery query = lookup.enrich(this.queryFactory).authorize(AuthorizationFlags.OwnerOrDmpAssociatedOrPermission).sourceTypes(ReferenceSourceType.Internal).typeIds(lookup.getTypeId());
if (!this.conventionService.isNullOrEmpty(lookup.getLike())) query.like(lookup.getLike());
List<ReferenceEntity> data = query.collectAs(lookup.getProject());
return this.builderFactory.builder(ReferenceBuilder.class).authorize(AuthorizationFlags.OwnerOrDmpAssociatedOrPermission).build(lookup.getProject(), data);
}

View File

@ -3,6 +3,6 @@ package eu.eudat.service.transformer;
import gr.cite.tools.cache.CacheOptions;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "cache.transformer")
@ConfigurationProperties(prefix = "cache.file-transformer")
public class FileTransformerCacheOptions extends CacheOptions {
}

View File

@ -5,7 +5,7 @@ import org.springframework.boot.context.properties.bind.ConstructorBinding;
import java.util.List;
@ConfigurationProperties(prefix = "transformer")
@ConfigurationProperties(prefix = "file-transformer")
public class FileTransformerProperties {
private final List<TransformerSource> sources;

View File

@ -28,7 +28,7 @@ spring:
optional:classpath:config/locale.yml[.yml], optional:classpath:config/locale-${spring.profiles.active}.yml[.yml], optional:file:../config/locale-${spring.profiles.active}.yml[.yml],
optional:classpath:config/public-api.yml[.yml], optional:classpath:config/public-api-${spring.profiles.active}.yml[.yml], optional:file:../config/public-api-${spring.profiles.active}.yml[.yml],
optional:classpath:config/dashboard.yml[.yml], optional:classpath:config/dashboard-${spring.profiles.active}.yml[.yml], optional:file:../config/dashboard-${spring.profiles.active}.yml[.yml],
optional:classpath:config/transformer.yml[.yml], optional:classpath:config/transformer-${spring.profiles.active}.yml[.yml], optional:file:../config/transformer-${spring.profiles.active}.yml[.yml],
optional:classpath:config/file-transformer.yml[.yml], optional:classpath:config/file-transformer-${spring.profiles.active}.yml[.yml], optional:file:../config/file-transformer-${spring.profiles.active}.yml[.yml],
optional:classpath:config/authorization.yml[.yml], optional:classpath:config/authorization-${spring.profiles.active}.yml[.yml], optional:file:../config/authorization-${spring.profiles.active}.yml[.yml],
optional:classpath:config/metrics.yml[.yml], optional:classpath:config/metrics-${spring.profiles.active}.yml[.yml], optional:file:../config/metrics-${spring.profiles.active}.yml[.yml],
optional:classpath:config/lock.yml[.yml], optional:classpath:config/lock-${spring.profiles.active}.yml[.yml], optional:file:../config/lock-${spring.profiles.active}.yml[.yml]

View File

@ -38,7 +38,7 @@ cache:
maximumSize: 500
enableRecordStats: false
expireAfterWriteSeconds: 30
- names: [ "transformer" ]
- names: [ "fileTransformer" ]
allowNullValues: true
initialCapacity: 100
maximumSize: 500
@ -102,8 +102,8 @@ cache:
depositConfigById:
name: depositConfigById
keyPattern: deposit_config_by_id_$repositoryId$:v0
transformer:
name: transformer
fileTransformer:
name: fileTransformer
keyPattern: base:v0
token-exchange-key:
name: tokenExchangeKey

View File

@ -0,0 +1,18 @@
deposit:
sources:
- url: http://dev04.local.cite.gr:55330/zenodo
repositoryId: zenodo
pdfTransformerId: docx-file-transformer
rdaTransformerId: rda-file-transformer
issuer-url: ${IDP_ISSUER_URI_TOKEN}
client-id: ${IDP_APIKEY_CLIENT_ID}
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
scope: ${IDP_APIKEY_SCOPE}
- url: http://dev04.local.cite.gr:55330/zenodo1
repositoryId: zenodo1
pdfTransformerId: docx-file-transformer
rdaTransformerId: rda-file-transformer
issuer-url: ${IDP_ISSUER_URI_TOKEN}
client-id: ${IDP_APIKEY_CLIENT_ID}
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
scope: ${IDP_APIKEY_SCOPE}

View File

@ -1,18 +1,2 @@
deposit:
sources:
- url: http://dev04.local.cite.gr:55330/zenodo
repositoryId: Zenodo
pdfTransformerId: docx-file-transformer
rdaTransformerId: rda-file-transformer
issuer-url: ${IDP_ISSUER_URI_TOKEN}
client-id: ${IDP_APIKEY_CLIENT_ID}
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
scope: ${IDP_APIKEY_SCOPE}
- url: http://dev04.local.cite.gr:55330/zenodo1
repositoryId: Zenodo1
pdfTransformerId: docx-file-transformer
rdaTransformerId: rda-file-transformer
issuer-url: ${IDP_ISSUER_URI_TOKEN}
client-id: ${IDP_APIKEY_CLIENT_ID}
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
scope: ${IDP_APIKEY_SCOPE}
sources: []

View File

@ -1,4 +1,4 @@
transformer:
file-transformer:
sources:
- url: http://dev04.local.cite.gr:55330/file/docx
transformerId: docx-file-transformer

View File

@ -0,0 +1,2 @@
file-transformer:
sources: []