add maxInMemorySizeInBytes
This commit is contained in:
parent
09067c11dd
commit
d7759fe4bd
|
@ -10,9 +10,10 @@ public class DepositSourceEntity {
|
||||||
private String scope;
|
private String scope;
|
||||||
private String pdfTransformerId;
|
private String pdfTransformerId;
|
||||||
private String rdaTransformerId;
|
private String rdaTransformerId;
|
||||||
|
private int maxInMemorySizeInBytes;
|
||||||
|
|
||||||
public String getRepositoryId() {
|
public String getRepositoryId() {
|
||||||
return repositoryId;
|
return this.repositoryId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRepositoryId(String repositoryId) {
|
public void setRepositoryId(String repositoryId) {
|
||||||
|
@ -20,7 +21,7 @@ public class DepositSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
return url;
|
return this.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUrl(String url) {
|
public void setUrl(String url) {
|
||||||
|
@ -28,7 +29,7 @@ public class DepositSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIssuerUrl() {
|
public String getIssuerUrl() {
|
||||||
return issuerUrl;
|
return this.issuerUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIssuerUrl(String issuerUrl) {
|
public void setIssuerUrl(String issuerUrl) {
|
||||||
|
@ -36,7 +37,7 @@ public class DepositSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getClientId() {
|
public String getClientId() {
|
||||||
return clientId;
|
return this.clientId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClientId(String clientId) {
|
public void setClientId(String clientId) {
|
||||||
|
@ -44,7 +45,7 @@ public class DepositSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getClientSecret() {
|
public String getClientSecret() {
|
||||||
return clientSecret;
|
return this.clientSecret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClientSecret(String clientSecret) {
|
public void setClientSecret(String clientSecret) {
|
||||||
|
@ -52,7 +53,7 @@ public class DepositSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getScope() {
|
public String getScope() {
|
||||||
return scope;
|
return this.scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScope(String scope) {
|
public void setScope(String scope) {
|
||||||
|
@ -60,7 +61,7 @@ public class DepositSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPdfTransformerId() {
|
public String getPdfTransformerId() {
|
||||||
return pdfTransformerId;
|
return this.pdfTransformerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPdfTransformerId(String pdfTransformerId) {
|
public void setPdfTransformerId(String pdfTransformerId) {
|
||||||
|
@ -68,10 +69,18 @@ public class DepositSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRdaTransformerId() {
|
public String getRdaTransformerId() {
|
||||||
return rdaTransformerId;
|
return this.rdaTransformerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRdaTransformerId(String rdaTransformerId) {
|
public void setRdaTransformerId(String rdaTransformerId) {
|
||||||
this.rdaTransformerId = rdaTransformerId;
|
this.rdaTransformerId = rdaTransformerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getMaxInMemorySizeInBytes() {
|
||||||
|
return this.maxInMemorySizeInBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxInMemorySizeInBytes(int maxInMemorySizeInBytes) {
|
||||||
|
this.maxInMemorySizeInBytes = maxInMemorySizeInBytes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,10 @@ public class FileTransformerSourceEntity {
|
||||||
private String clientId;
|
private String clientId;
|
||||||
private String clientSecret;
|
private String clientSecret;
|
||||||
private String scope;
|
private String scope;
|
||||||
|
private int maxInMemorySizeInBytes;
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
return url;
|
return this.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUrl(String url) {
|
public void setUrl(String url) {
|
||||||
|
@ -18,7 +19,7 @@ public class FileTransformerSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTransformerId() {
|
public String getTransformerId() {
|
||||||
return transformerId;
|
return this.transformerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransformerId(String transformerId) {
|
public void setTransformerId(String transformerId) {
|
||||||
|
@ -26,7 +27,7 @@ public class FileTransformerSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIssuerUrl() {
|
public String getIssuerUrl() {
|
||||||
return issuerUrl;
|
return this.issuerUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIssuerUrl(String issuerUrl) {
|
public void setIssuerUrl(String issuerUrl) {
|
||||||
|
@ -34,7 +35,7 @@ public class FileTransformerSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getClientId() {
|
public String getClientId() {
|
||||||
return clientId;
|
return this.clientId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClientId(String clientId) {
|
public void setClientId(String clientId) {
|
||||||
|
@ -42,7 +43,7 @@ public class FileTransformerSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getClientSecret() {
|
public String getClientSecret() {
|
||||||
return clientSecret;
|
return this.clientSecret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClientSecret(String clientSecret) {
|
public void setClientSecret(String clientSecret) {
|
||||||
|
@ -50,10 +51,18 @@ public class FileTransformerSourceEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getScope() {
|
public String getScope() {
|
||||||
return scope;
|
return this.scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScope(String scope) {
|
public void setScope(String scope) {
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getMaxInMemorySizeInBytes() {
|
||||||
|
return this.maxInMemorySizeInBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxInMemorySizeInBytes(int maxInMemorySizeInBytes) {
|
||||||
|
this.maxInMemorySizeInBytes = maxInMemorySizeInBytes;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -158,7 +158,10 @@ public class DepositServiceImpl implements DepositService {
|
||||||
exchangeFilterFunctions.add(apiKeyExchangeFilterFunction);
|
exchangeFilterFunctions.add(apiKeyExchangeFilterFunction);
|
||||||
exchangeFilterFunctions.add(logRequest());
|
exchangeFilterFunctions.add(logRequest());
|
||||||
exchangeFilterFunctions.add(logResponse());
|
exchangeFilterFunctions.add(logResponse());
|
||||||
}).build();
|
}).codecs(codecs -> codecs
|
||||||
|
.defaultCodecs()
|
||||||
|
.maxInMemorySize(source.getMaxInMemorySizeInBytes())
|
||||||
|
).build();
|
||||||
DepositClientImpl repository = new DepositClientImpl(webClient);
|
DepositClientImpl repository = new DepositClientImpl(webClient);
|
||||||
this.clients.put(repositoryIdByTenant, repository);
|
this.clients.put(repositoryIdByTenant, repository);
|
||||||
return repository;
|
return repository;
|
||||||
|
|
|
@ -109,7 +109,10 @@ public class FileTransformerServiceImpl implements FileTransformerService {
|
||||||
exchangeFilterFunctions.add(tokenExchangeFilterFunction);
|
exchangeFilterFunctions.add(tokenExchangeFilterFunction);
|
||||||
exchangeFilterFunctions.add(logRequest());
|
exchangeFilterFunctions.add(logRequest());
|
||||||
exchangeFilterFunctions.add(logResponse());
|
exchangeFilterFunctions.add(logResponse());
|
||||||
}).build());
|
}).codecs(codecs -> codecs
|
||||||
|
.defaultCodecs()
|
||||||
|
.maxInMemorySize(source.getMaxInMemorySizeInBytes())
|
||||||
|
).build());
|
||||||
this.clients.put(repositoryIdByTenant, repository);
|
this.clients.put(repositoryIdByTenant, repository);
|
||||||
return repository;
|
return repository;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ deposit:
|
||||||
client-id: ${IDP_APIKEY_CLIENT_ID}
|
client-id: ${IDP_APIKEY_CLIENT_ID}
|
||||||
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
||||||
scope: ${IDP_APIKEY_SCOPE}
|
scope: ${IDP_APIKEY_SCOPE}
|
||||||
|
maxInMemorySizeInBytes: 6554000
|
||||||
- url: http://dev04.local.cite.gr:55330/zenodo1
|
- url: http://dev04.local.cite.gr:55330/zenodo1
|
||||||
repositoryId: Zenodo1
|
repositoryId: Zenodo1
|
||||||
pdfTransformerId: docx-file-transformer
|
pdfTransformerId: docx-file-transformer
|
||||||
|
@ -16,3 +17,4 @@ deposit:
|
||||||
client-id: ${IDP_APIKEY_CLIENT_ID}
|
client-id: ${IDP_APIKEY_CLIENT_ID}
|
||||||
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
||||||
scope: ${IDP_APIKEY_SCOPE}
|
scope: ${IDP_APIKEY_SCOPE}
|
||||||
|
maxInMemorySizeInBytes: 6554000
|
|
@ -1,14 +1,16 @@
|
||||||
file-transformer:
|
file-transformer:
|
||||||
sources:
|
sources:
|
||||||
- url: http://dev04.local.cite.gr:55330/file/docx
|
- url: http://localhost:8084
|
||||||
transformerId: docx-file-transformer
|
transformerId: docx-file-transformer
|
||||||
issuer-url: ${IDP_ISSUER_URI_TOKEN}
|
issuer-url: ${IDP_ISSUER_URI_TOKEN}
|
||||||
client-id: ${IDP_APIKEY_CLIENT_ID}
|
client-id: ${IDP_APIKEY_CLIENT_ID}
|
||||||
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
||||||
scope: ${IDP_APIKEY_SCOPE}
|
scope: ${IDP_APIKEY_SCOPE}
|
||||||
|
maxInMemorySizeInBytes: 6554000
|
||||||
- url: http://dev04.local.cite.gr:55330/file/rdajson
|
- url: http://dev04.local.cite.gr:55330/file/rdajson
|
||||||
transformerId: rda-file-transformer
|
transformerId: rda-file-transformer
|
||||||
issuer-url: ${IDP_ISSUER_URI_TOKEN}
|
issuer-url: ${IDP_ISSUER_URI_TOKEN}
|
||||||
client-id: ${IDP_APIKEY_CLIENT_ID}
|
client-id: ${IDP_APIKEY_CLIENT_ID}
|
||||||
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
||||||
scope: ${IDP_APIKEY_SCOPE}
|
scope: ${IDP_APIKEY_SCOPE}
|
||||||
|
maxInMemorySizeInBytes: 6554000
|
Loading…
Reference in New Issue