Skip to content

Commit

Permalink
Merge pull request #1244 from catenax-ng/chore/837-feedback-import
Browse files Browse the repository at this point in the history
chore(exception):837 fix import.
  • Loading branch information
ds-lcapellino authored May 14, 2024
2 parents 9bacc0b + 5ca5add commit b3a72be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
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

## [11.0.0 - 08.05.2024]
### Added
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

0 comments on commit b3a72be

Please sign in to comment.