Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(exception):837 fix import. #1244

Merged
merged 3 commits into from
May 14, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha
### Changed
- #778 return empty PageResult when no contract agreement Ids are found instead of http 404 in /contacts API
- #XXX Fixed some sonar issues in frontend application
- #XXX Switched eclipse-temurin:21-jre-alpine@sha256:fb4150a30569aadae9d693d949684a00653411528e62498b9900940c9b5b8a66 to 23467b3e42617ca197f43f58bc5fb03ca4cb059d68acd49c67128bfded132d67

### Removed

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ COPY tx-backend tx-backend
RUN --mount=type=cache,target=/root/.m2 mvn -B clean package -pl :$BUILD_TARGET -am -DskipTests

# Copy the jar and build image
FROM eclipse-temurin:21-jre-alpine@sha256:fb4150a30569aadae9d693d949684a00653411528e62498b9900940c9b5b8a66 AS traceability-app
FROM eclipse-temurin:21-jre-alpine@sha256:23467b3e42617ca197f43f58bc5fb03ca4cb059d68acd49c67128bfded132d67 AS traceability-app

ARG UID=10000
ARG GID=1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public List<String> isValid(MultipartFile file) {
reader.close();

} catch (ProcessingException | IOException e) {
throw new JsonFileProcessingException(e);
return List.of("Json file is not processable." + e.getMessage());
}
errors.addAll(validateAspectPayload(file));
return errors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.eclipse.tractusx.irs.component.assetadministrationshell.SecurityAttribute;
import org.eclipse.tractusx.irs.component.assetadministrationshell.SemanticId;
import org.eclipse.tractusx.irs.component.assetadministrationshell.SubmodelDescriptor;
import org.eclipse.tractusx.irs.component.enums.BomLifecycle;
import org.eclipse.tractusx.irs.registryclient.decentral.DigitalTwinRegistryCreateShellService;
import org.eclipse.tractusx.irs.registryclient.decentral.exception.CreateDtrShellException;
import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase;
Expand Down Expand Up @@ -145,18 +144,7 @@ private AssetAdministrationShellDescriptor aasFrom(AssetBase assetBase, List<Sub

List<IdentifierKeyValuePair> aasIdentifiersFromAsset(AssetBase assetBase) {

final String digitalTwinType = assetBase.getBomLifecycle().equals(BomLifecycle.AS_BUILT) ? "PartInstance" : "PartType";

return List.of(
IdentifierKeyValuePair.builder()
.name("digitalTwinType")
.value(digitalTwinType)
.externalSubjectId(
Reference.builder()
.type(EXTERNAL_REFERENCE)
.keys(getExternalSubjectIds())
.build())
.build(),
List<IdentifierKeyValuePair> identifierKeyValuePairs = List.of(
IdentifierKeyValuePair.builder()
.name("manufacturerId")
.value(assetBase.getManufacturerId())
Expand All @@ -176,6 +164,8 @@ List<IdentifierKeyValuePair> aasIdentifiersFromAsset(AssetBase assetBase) {
.build())
.build()
);
log.info("IdentifierKeyValuePair {}", identifierKeyValuePairs);
return identifierKeyValuePairs;
}

private List<SemanticId> getExternalSubjectIds() {
Expand Down