Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/faaast-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
3 changes: 1 addition & 2 deletions charts/faaast-service/values.full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ core:
assetConnectionReadMaxThreadPoolSize: 1000
assetConnectionReadTimeout: 5000
assetConnectionWriteMaxThreadPoolSize: 1000
callbackAddress: "https://invalid.local:443/mypath"
requestHandlerThreadPoolSize: 2
submodelRegistries:
- "http://example.com/MySubmodelRegistry"
Expand Down Expand Up @@ -137,7 +136,7 @@ endpoints:
corsEnabled: true
corsExposedHeaders: "X-Custom-Header"
corsMaxAge: 1000
hostname: "localhost"
hostname: "https://example.invalid"
httpVersion: "HTTP_2"
pathPrefix: "/api/v3.0"
includeErrorDetails: true
Expand Down
1 change: 0 additions & 1 deletion charts/faaast-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ core: {}
# core:
# operationTimeout: 60000 # ms, 0 = no timeout
# assetConnectionReadTimeout: 30000 # ms
# callbackAddress: "https://faaast.example.com"
# validationOnLoad:
# validateConstraints: true
# idShortUniqueness: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ public AssetConnectionManager getAssetConnectionManager() {
}


@Override
public List<Endpoint> getEndpoints() {
return endpoints;
}


public ServiceConfig getConfig() {
return config;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import de.fraunhofer.iosb.ilt.faaast.service.model.exception.ResourceNotFoundException;
import de.fraunhofer.iosb.ilt.faaast.service.persistence.Persistence;
import de.fraunhofer.iosb.ilt.faaast.service.typing.TypeInfo;
import java.util.List;
import org.eclipse.digitaltwin.aas4j.v3.model.Reference;


Expand Down Expand Up @@ -98,4 +99,12 @@
* @return the AssetConnectionManager of the service
*/
public AssetConnectionManager getAssetConnectionManager();


/**
* Returns the endpoints of the service.
*
* @return the endpoints of the service
*/
public List<Endpoint> getEndpoints();

Check warning on line 109 in core/src/main/java/de/fraunhofer/iosb/ilt/faaast/service/ServiceContext.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Provide the parametrized type for this generic.

See more on https://sonarcloud.io/project/issues?id=FraunhoferIOSB_FAAAST-Service&issues=AZ5zCavdHM3zXMa0yjp1&open=AZ5zCavdHM3zXMa0yjp1&pullRequest=1447
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public class CoreConfig {
private RegistrySynchronizationConfig registrySynchronization;
private double minInflateRatio;
private long operationTimeout;
private String callbackAddress;

public CoreConfig() {
this.assetConnectionRetryInterval = DEFAULT_ASSET_CONNECTION_RETRY_INTERVAL;
Expand Down Expand Up @@ -238,16 +237,6 @@ public void setOperationTimeout(long operationTimeout) {
}


public String getCallbackAddress() {
return callbackAddress;
}


public void setCallbackAddress(String callbackAddress) {
this.callbackAddress = callbackAddress;
}


@Override
public int hashCode() {
return Objects.hash(assetConnectionRetryInterval,
Expand All @@ -262,8 +251,7 @@ public int hashCode() {
submodelRegistries,
registrySynchronization,
minInflateRatio,
operationTimeout,
callbackAddress);
operationTimeout);
}


Expand Down Expand Up @@ -291,8 +279,7 @@ public boolean equals(Object obj) {
&& Objects.equals(this.submodelRegistries, other.submodelRegistries)
&& Objects.equals(this.registrySynchronization, other.registrySynchronization)
&& Objects.equals(this.minInflateRatio, other.minInflateRatio)
&& Objects.equals(this.operationTimeout, other.operationTimeout)
&& Objects.equals(callbackAddress, other.callbackAddress);
&& Objects.equals(this.operationTimeout, other.operationTimeout);
}

public static class Builder extends ExtendableBuilder<CoreConfig, Builder> {
Expand Down Expand Up @@ -411,12 +398,6 @@ public Builder operationTimeout(long value) {
}


public Builder callbackAddress(String value) {
getBuildingInstance().setCallbackAddress(value);
return getSelf();
}


@Override
protected Builder getSelf() {
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ public static String base64Encode(String value) {
* @return encoded value
*/
public static byte[] base64Encode(byte[] value) {
return Base64.getEncoder().encode(value);
return Objects.nonNull(value)
? Base64.getEncoder().encode(value)
: new byte[0];
}


Expand Down
1 change: 0 additions & 1 deletion docs/source/basics/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ The `core` configuration block contains properties not related to the implementa
| assetConnectionReadTimeout<br>*(optional)* | Long | Timeout in ms for reading all asset connections for a single AAS command | 5000 |
| assetConnectionRetryInterval<br>*(optional)* | Long | Interval in ms in which to retry establishing asset connections | 1000 |
| assetConnectionWriteMaxThreadPoolSize<br>*(optional)* | Integer | Size of thread pool used to write to asset connections | 1000 |
| callbackAddress<br>*(optional)* | String | The external URI the FA³ST Service is reachable from. Used in registry synchronization and cloud events message bus. | |
| minInflateRatio<br>*(optional)* | Double | Ratio between de- and inflated bytes to detect zipbomb when loading AASX files | 0.001 |
| operationTimeout<br>*(optional)* | Long | Timeout in ms for executing AAS operations. Set to 0 for no timeout. | 3600000 |
| requestHandlerThreadPoolSize<br>*(optional)* | Integer | Number of concurrent thread that can execute API requests | 2 |
Expand Down
Loading
Loading