Skip to content

Commit

Permalink
Merge pull request #157 from catenax-ng/support_AAS_V3.0
Browse files Browse the repository at this point in the history
Support AAS version 0.3 merging to master
  • Loading branch information
adityagajbhiye9 authored Jul 18, 2023
2 parents 40d9b4c + 552e343 commit 977e657
Show file tree
Hide file tree
Showing 49 changed files with 988 additions and 921 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]
- Support EDC version 0.5.1

## [2.0.7] - 2023-07-13
### Added
- Support AAS version 0.3

## [2.0.6] - 2023-07-12
Expand Down Expand Up @@ -167,7 +170,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Compliance with Catena-X Guidelines
- Integration with Digital Twin registry service.

[unreleased]: https://github.com/eclipse-tractusx/managed-simple-data-exchanger-backend/compare/dftbackend-2.0.6...main
[unreleased]: https://github.com/eclipse-tractusx/managed-simple-data-exchanger-backend/compare/dftbackend-2.0.7...main
[2.0.7]: https://github.com/eclipse-tractusx/managed-simple-data-exchanger-backend/compare/dftbackend-2.0.6...dftbackend-2.0.7
[2.0.6]: https://github.com/eclipse-tractusx/managed-simple-data-exchanger-backend/compare/dftbackend-2.0.5...dftbackend-2.0.6
[2.0.5]: https://github.com/eclipse-tractusx/managed-simple-data-exchanger-backend/compare/dftbackend-2.0.4...dftbackend-2.0.5
[2.0.4]: https://github.com/eclipse-tractusx/managed-simple-data-exchanger-backend/compare/dftbackend-2.0.3...dftbackend-2.0.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ private CommonConstants() {
public static final String CSV_FILE_EXTENSION = ".csv";
public static final String SEPARATOR = ";";

public static final String ASSET_PROP_ID = "asset:prop:id";
public static final String UPDATED_Y = "Y";
public static final String DELETED_Y = "Y";

Expand All @@ -38,15 +37,20 @@ private CommonConstants() {
public static final String MANUFACTURER_ID = "manufacturerId";
public static final String CUSTOMER_PART_ID = "customerPartId";
public static final String ASSET_LIFECYCLE_PHASE = "assetLifecyclePhase";
public static final String HTTP = "HTTP";
public static final String HTTP = "http";
public static final String HTTPS = "HTTPS";
public static final String ENDPOINT_PROTOCOL_VERSION = "0.0.1-SNAPSHOT";
public static final String ENDPOINT_PROTOCOL_VERSION = "0.1";
public static final String PREFIX = "urn:uuid:";

public static final String INTERFACE_EDC = "EDC";
public static final String ENDPOINT_PROTOCOL = "IDS/ECLIPSE DATASPACE CONNECTOR";
public static final String SUBMODEL_CONTEXT_URL = "/submodel?content=value&extent=WithBLOBValue";
public static final String SUB_PROTOCOL = "IDS";
public static final String SUBMODEL_CONTEXT_URL = "/submodel";

public static final String AS_PLANNED = "AsPlanned";

public static final String EXTERNAL_REFERENCE = "ExternalReference";
public static final String GLOBAL_REFERENCE = "GlobalReference";
public static final String BODY_ENCODING = "plain";
public static final String INTERFACE = "https://admin-shell.io/aas/API/3/0/SubmodelServiceSpecification/SSP-003";

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.sde.bpndiscovery.model.response;
package org.eclipse.tractusx.sde.common.model;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
@EnableMethodSecurity(prePostEnabled = true)
public class SecurityConfig {

private static final String[] PUBLIC_URL = { "/ping", "/*/public/**", "/api-docs/**", "/swagger-ui/**",
private static final String[] PUBLIC_URL = { "/ping", "/cache/**", "/*/public/**", "/api-docs/**", "/swagger-ui/**",
"*/swagger-ui/**", "/actuator/health/readiness", "/actuator/health/liveness", "/v3/api-docs/**" };

@Value("${keycloak.clientid}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,36 @@

import java.time.LocalDateTime;

import org.eclipse.tractusx.sde.portal.utils.MemberCompanyBPNCacheUtilityService;
import org.eclipse.tractusx.sde.submodels.apr.steps.DigitalTwinsAspectRelationShipCsvHandlerUseCase;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.RequiredArgsConstructor;

@RestController
@RequiredArgsConstructor
public class PingController {

@GetMapping(value = "/ping")
public ResponseEntity<String> getProcessReportById() {
return ok().body(LocalDateTime.now().toString());
}
private final DigitalTwinsAspectRelationShipCsvHandlerUseCase digitalTwinsAspectRelationShipCsvHandlerUseCase;

private final MemberCompanyBPNCacheUtilityService memberCompanyBPNCacheUtilityService;

@GetMapping(value = "/ping")
public ResponseEntity<String> getProcessReportById() {
return ok().body(LocalDateTime.now().toString());
}

@GetMapping(value = "/cache/clear-memebercompany-bpnnumber")
public ResponseEntity<String> clearBpnnumberCache() {
memberCompanyBPNCacheUtilityService.removeAllBPNNumberCache();
return ok().body("Cleared");
}

@GetMapping(value = "/cache/clear-ddtrurl")
public ResponseEntity<String> clearDdtrurlCache() {
digitalTwinsAspectRelationShipCsvHandlerUseCase.clearDDTRUrlCache();
return ok().body("Cleared");
}
}
12 changes: 6 additions & 6 deletions modules/sde-core/src/main/resources/use-case.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"title": "Traceability",
"description": "Traceability",
"submodules": [
"serialparttypization",
"assemblypartrelationship",
"serialpart",
"singlelevelbomasbuilt",
"batch",
"partasplanned",
"singlelevelbomasplanned",
Expand All @@ -18,8 +18,8 @@
"title": "Circular Economy",
"description": "Circular Economy",
"submodules": [
"serialparttypization",
"assemblypartrelationship",
"serialpart",
"singlelevelbomasbuilt",
"batch"
]
},
Expand All @@ -28,8 +28,8 @@
"title": "Quality",
"description": "Quality",
"submodules": [
"serialparttypization",
"assemblypartrelationship",
"serialpart",
"singlelevelbomasbuilt",
"batch",
"singlelevelusageasbuilt"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.eclipse.tractusx.sde.bpndiscovery.model.response.BpnDiscoveryBatchResponse;
import org.eclipse.tractusx.sde.bpndiscovery.model.response.BpnDiscoveryResponse;
import org.eclipse.tractusx.sde.bpndiscovery.model.response.BpnDiscoverySearchResponse;
import org.eclipse.tractusx.sde.bpndiscovery.model.response.KeycloakJWTTokenResponse;
import org.eclipse.tractusx.sde.common.model.KeycloakJWTTokenResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.util.MultiValueMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/********************************************************************************
* Copyright (c) 2023 T-Systems International GmbH
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.sde.digitaltwins.entities.common;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Extensions {

private List<Reference> supplementalSemanticIds;
private List<Reference> refersTo;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
@AllArgsConstructor
public class KeyValuePair {

private String key;
private String name;
private String value;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/********************************************************************************
* Copyright (c) 2023 T-Systems International GmbH
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package org.eclipse.tractusx.sde.digitaltwins.entities.common;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Keys {

private String type;
private String value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

package org.eclipse.tractusx.sde.digitaltwins.entities.common;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -32,6 +34,7 @@
@AllArgsConstructor
public class LocalIdentifier {

@JsonProperty("name")
private String key;
private String value;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/********************************************************************************
* Copyright (c) 2022 BMW GmbH
* Copyright (c) 2022, 2023 T-Systems International GmbH
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2023 T-Systems International GmbH
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -21,6 +20,8 @@

package org.eclipse.tractusx.sde.digitaltwins.entities.common;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -30,7 +31,8 @@
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Description {
@JsonIgnoreProperties(ignoreUnknown = true)
public class MultiLanguage {

private String language;
private String text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

package org.eclipse.tractusx.sde.digitaltwins.entities.common;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -30,9 +35,14 @@
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class ProtocolInformation {

@JsonProperty("href")
private String endpointAddress;
private String endpointProtocol;
private String endpointProtocolVersion;
private List<String> endpointProtocolVersion;
private String subProtocol;
private String subprotocolBody;
private String subprotocolBodyEncoding;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************************
* Copyright (c) 2022, 2023 T-Systems International GmbH
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2023 T-Systems International GmbH
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -17,21 +17,26 @@
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

package org.eclipse.tractusx.sde.digitaltwins.entities.response;
package org.eclipse.tractusx.sde.digitaltwins.entities.common;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SubmodelDescriptionListResponse {
@JsonIgnoreProperties(ignoreUnknown = true)
public class Reference {

private String type;
private List<Keys> keys;

private List<ShellDescriptorResponse> items;

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
@Builder
public class SemanticId {

private List<String> value;
private String type;
private List<Keys> keys;
}
Loading

0 comments on commit 977e657

Please sign in to comment.