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

Redesigned ConnectedAssetUniverse instantiation #7533

Closed
wants to merge 38 commits into from

Conversation

LeeVi3w
Copy link
Contributor

@LeeVi3w LeeVi3w commented Mar 15, 2023

Description

Changed the instantiation method of ConnectedAssetUniverse from public constructors to static factory methods which return new objects.

This change was made to allow the use of the AssetUniverse super constructor with parameters as to set the missing properties reported in issue #7505. This decision was taken due to the fact that the super constructor needed data which was retrieved after its call inside the ConnectedAssetUniverse constructor.

The static factory methods introduced (one for each existing constructor) have the advantage of being able to process the needed data beforehand and then passing it to the 'ConnectedAssetUniverse', which in turn can call the super constructor that populates the missing properties with the given data. The newly created 'ConnectedAssetUniverse' object is then returned.

These static factory methods are called create, and they make use of only one (private) ConnectedAssetUniverse constructor which takes an AssetResponse object and extracts the Asset bean containing the needed properties.

I have chosen this approach to avoid having to separate the data gathering logic from the class itself and to avoid having to set the missing fields in a dedicated function when there already exists a super constructor that deals with this.

Related Issue(s)

#7505 [BUG] ConnectedAssetUniverse not gathering all asset properties

Testing

The testing has been manually done using an instance of ConnectedAssetClient inside a Java application.

@LeeVi3w LeeVi3w requested a review from mandy-chessell as a code owner March 15, 2023 16:22
LeeVi3w and others added 29 commits March 16, 2023 09:45
Signed-off-by: Krishna Sheth <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Bogdan Sava <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Liviu Constantin Popa <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps [com.google.protobuf:protobuf-java](https://github.com/protocolbuffers/protobuf) from 3.22.0 to 3.22.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](protocolbuffers/protobuf@v3.22.0...v3.22.2)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.0.2 to 2.0.3.

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps [net.openhft:chronicle-bom](https://github.com/OpenHFT/OpenHFT) from 2.24ea43 to 2.24ea45.
- [Release notes](https://github.com/OpenHFT/OpenHFT/releases)
- [Commits](https://github.com/OpenHFT/OpenHFT/commits)

---
updated-dependencies:
- dependency-name: net.openhft:chronicle-bom
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps [io.github.classgraph:classgraph](https://github.com/classgraph/classgraph) from 4.8.155 to 4.8.157.
- [Release notes](https://github.com/classgraph/classgraph/releases)
- [Commits](classgraph/classgraph@classgraph-4.8.155...classgraph-4.8.157)

---
updated-dependencies:
- dependency-name: io.github.classgraph:classgraph
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps [com.nimbusds:nimbus-jose-jwt](https://bitbucket.org/connect2id/nimbus-jose-jwt) from 9.24.4 to 9.31.
- [Changelog](https://bitbucket.org/connect2id/nimbus-jose-jwt/src/master/CHANGELOG.txt)
- [Commits](https://bitbucket.org/connect2id/nimbus-jose-jwt/branches/compare/9.31..9.24.4)

---
updated-dependencies:
- dependency-name: com.nimbusds:nimbus-jose-jwt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps [org.codehaus.plexus:plexus-utils](https://github.com/codehaus-plexus/plexus-utils) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/codehaus-plexus/plexus-utils/releases)
- [Commits](codehaus-plexus/plexus-utils@plexus-utils-3.5.0...plexus-utils-3.5.1)

---
updated-dependencies:
- dependency-name: org.codehaus.plexus:plexus-utils
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps [io.openlineage:openlineage-java](https://github.com/OpenLineage/OpenLineage) from 0.20.6 to 0.21.1.
- [Release notes](https://github.com/OpenLineage/OpenLineage/releases)
- [Changelog](https://github.com/OpenLineage/OpenLineage/blob/main/CHANGELOG.md)
- [Commits](OpenLineage/OpenLineage@0.20.6...0.21.1)

---
updated-dependencies:
- dependency-name: io.openlineage:openlineage-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps `springsecurityVersion` from 6.0.1 to 6.0.2.

Updates `org.springframework.security:spring-security-config` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@6.0.1...6.0.2)

Updates `org.springframework.security:spring-security-core` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@6.0.1...6.0.2)

Updates `org.springframework.security:spring-security-ldap` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@6.0.1...6.0.2)

Updates `org.springframework.security:spring-security-web` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@6.0.1...6.0.2)

Updates `org.springframework.security:spring-security-oauth2-jose` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@6.0.1...6.0.2)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-config
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.security:spring-security-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.security:spring-security-ldap
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.security:spring-security-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.security:spring-security-oauth2-jose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps [org.apache.thrift:libthrift](https://github.com/apache/thrift) from 0.18.0 to 0.18.1.
- [Release notes](https://github.com/apache/thrift/releases)
- [Changelog](https://github.com/apache/thrift/blob/master/CHANGES.md)
- [Commits](apache/thrift@v0.18.0...v0.18.1)

---
updated-dependencies:
- dependency-name: org.apache.thrift:libthrift
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps `tomcatVersion` from 9.0.72 to 9.0.73.

Updates `org.apache.tomcat.embed:tomcat-embed-core` from 9.0.72 to 9.0.73

Updates `org.apache.tomcat:tomcat-coyote` from 9.0.72 to 9.0.73

---
updated-dependencies:
- dependency-name: org.apache.tomcat.embed:tomcat-embed-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.tomcat:tomcat-coyote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps org.springframework.data:spring-data-commons from 2.7.8 to 2.7.9.

---
updated-dependencies:
- dependency-name: org.springframework.data:spring-data-commons
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Bumps `springbootVersion` from 3.0.2 to 3.0.4.

Updates `org.springframework.boot:spring-boot-autoconfigure` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-starter-web` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-starter-validation` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-test` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-starter-test` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-starter-security` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-starter-data-redis` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-starter-actuator` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

Updates `org.springframework.boot:spring-boot-starter-oauth2-resource-server` from 3.0.2 to 3.0.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.0.2...v3.0.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-autoconfigure
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-validation
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-security
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-data-redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-actuator
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-oauth2-resource-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
…with 3.x/maven

Signed-off-by: Nigel Jones <[email protected]>
Signed-off-by: Liviu Enache <[email protected]>
@LeeVi3w LeeVi3w force-pushed the connected-asset-missing-props branch from bbbb6fe to dfbfc47 Compare March 16, 2023 07:47
@LeeVi3w LeeVi3w closed this Mar 16, 2023
@LeeVi3w LeeVi3w deleted the connected-asset-missing-props branch March 16, 2023 07:54
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 24, 2023
planetf1 added a commit to planetf1/egeria that referenced this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants