Move AAI uri building into dedicated module 52/141552/15
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Fri, 18 Jul 2025 15:37:57 +0000 (17:37 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Mon, 21 Jul 2025 07:45:13 +0000 (09:45 +0200)
- move uri-building related classes from aai-client module
  into a dedicated aai-fluent-uri-builder module
- this prepares the introduction of an alternative aai-client
  implementation that is much simpler and will support tracing
- exclude cds and appc related transitive dependencies from
  the aai-client module that are pulled in by the common module [0]

[0] the common module should be further split into smaller modules that
    would group around functionality like clients, security, utils and
    spring deps in the future.
    That would allow to more accurately pull in only those parts from
    common that are really needed

Issue-ID: AAI-4189
Change-Id: I6af926f9f04c50440bfd818aacd5114876fed9bb
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
123 files changed:
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java
bpmn/pom.xml
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAICreateResources.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/AAIDeleteServiceInstance.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAIDeleteServiceInstance.java
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/management/PnfManagementImpl.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/composition/CreateChildServiceBB.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/service/composition/DeleteChildServiceBB.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIInstanceGroupResources.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAINetworkResources.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIPnfResources.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIServiceInstanceResources.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
graph-inventory/aai-client/pom.xml
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/CacheLogger.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIDSLQueryClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIQueryClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/AAIResultWrapper.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/Relationships.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIClientUriFactory.java [new file with mode: 0644]
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AllottedResourceLookupUri.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/ServiceInstanceUri.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/EmptyStringToNullSerializer.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryCommonObjectMapperPatchProvider.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryCommonObjectMapperProvider.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryPatchConverter.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryQueryClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryRelationships.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/GraphInventoryRelationships.java with 94% similarity]
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryResourcesClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryRestClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryResultWrapper.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/GraphInventoryResultWrapper.java with 95% similarity]
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryTransactionClient.java
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/ResourceAndUrl.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/ResourceAndUrl.java with 92% similarity]
graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryPatchDepthExceededException.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIQueryClientTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIResourcesClientWithServiceInstanceUriTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAISingleTransactionClientTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAITransactionalClientTest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/AAIURITest.java
graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/RelationshipsTest.java
graph-inventory/aai-fluent-uri-builder/pom.xml [new file with mode: 0644]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/AAIObjectBase.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectBase.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/AAIObjectName.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectName.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIBaseResourceUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIBaseResourceUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentPluralType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentPluralType.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentSingleType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentSingleType.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTopLevelType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTopLevelType.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookup.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookup.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIPluralFragment.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIPluralFragment.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIPluralResourceUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIPluralResourceUri.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIResourceUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIResourceUri.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimplePluralUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimplePluralUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISingleFragment.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISingleFragment.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactory.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactory.java with 84% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/NodesPluralUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/NodesPluralUri.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/NodesSingleUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/NodesSingleUri.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/aai/entities/uri/NodesUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/NodesUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/Format.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/Format.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFluentTopLevelType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFluentTopLevelType.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFluentType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFluentType.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFluentTypeBase.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFluentTypeBase.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFragmentBase.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryFragmentBase.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectBase.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectBase.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectName.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectName.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectPlurals.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectPlurals.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectType.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectUriPartial.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectUriPartial.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectUriTemplate.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryObjectUriTemplate.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryPluralFragment.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryPluralFragment.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventorySingleFragment.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventorySingleFragment.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventorySubgraphType.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventorySubgraphType.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryVersion.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryVersion.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/TransactionBuilder.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/TransactionBuilder.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLNodeBase.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLNodeBase.java with 98% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLNodeKey.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLNodeKey.java with 97% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLOutputNode.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLOutputNode.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLQuery.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLQuery.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLQueryBuilder.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLQueryBuilder.java with 98% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLStartNode.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLStartNode.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLTraversal.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/DSLTraversal.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/GraphInventoryEdgeLabel.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/GraphInventoryEdgeLabel.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Id.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Id.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Node.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Node.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Output.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Output.java with 64% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Pathed.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Pathed.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/QueryStep.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/QueryStep.java with 94% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Resource.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Resource.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Start.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/Start.java with 64% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/TraversalBuilder.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/TraversalBuilder.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/__.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/__.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/Depth.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/Depth.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventoryPluralResourceUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventoryPluralResourceUri.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventoryResourceUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventoryResourceUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventorySingleResourceUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventorySingleResourceUri.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventoryUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/GraphInventoryUri.java with 98% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/HttpAwareUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/HttpAwareUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/SimpleBaseUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/SimpleBaseUri.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/SimplePluralUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/SimplePluralUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/SimpleUri.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/SimpleUri.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParser.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParser.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParserSpringImpl.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/entities/uri/parsers/UriParserSpringImpl.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/BulkProcessFailed.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/BulkProcessFailed.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryMultipleItemsException.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryMultipleItemsException.java with 100% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryPayloadException.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryPayloadException.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryUriComputationException.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryUriComputationException.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryUriNotFoundException.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/GraphInventoryUriNotFoundException.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/IncorrectNumberOfUriKeys.java [moved from graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/exceptions/IncorrectNumberOfUriKeys.java with 99% similarity]
graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookupTest.java [moved from graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIFluentTypeReverseLookupTest.java with 96% similarity]
graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java [moved from graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromParentUriTest.java with 90% similarity]
graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromUriTest.java [moved from graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriFromUriTest.java with 81% similarity]
graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java [moved from graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUriTest.java with 93% similarity]
graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactoryTest.java [moved from graph-inventory/aai-client/src/test/java/org/onap/aaiclient/client/aai/entities/uri/AAIUriFactoryTest.java with 89% similarity]
graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/DslQueryBuilderTest.java [new file with mode: 0644]
graph-inventory/pom.xml
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java

index a21cd5a..f4f0d12 100644 (file)
@@ -83,6 +83,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
 import com.fasterxml.jackson.databind.type.TypeFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 
 @Component("BBInputSetupUtils")
 public class BBInputSetupUtils {
@@ -247,7 +248,8 @@ public class BBInputSetupUtils {
     }
 
     public Map<String, String> getURIKeysFromServiceInstance(String serviceInstanceId) {
-        AAIResourceUri uri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+        AAIResourceUri uri =
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         return uri.getURIKeys();
     }
 
@@ -318,7 +320,7 @@ public class BBInputSetupUtils {
 
     public ServiceInstance getAAIServiceInstanceById(String serviceInstanceId) {
         return injectionHelper.getAaiClient()
-                .get(ServiceInstance.class, AAIUriFactory
+                .get(ServiceInstance.class, AAIClientUriFactory
                         .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId)).depth(Depth.TWO))
                 .orElse(null);
     }
@@ -440,7 +442,7 @@ public class BBInputSetupUtils {
     public Optional<L3Network> getRelatedNetworkByNameFromServiceInstance(String serviceInstanceId, String networkName)
             throws MultipleObjectsFoundException {
         AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
                         .relatedTo(Types.L3_NETWORKS.getFragment()).queryParam("network-name", networkName);
         Optional<L3Networks> networks = injectionHelper.getAaiClient().get(L3Networks.class, uri);
         L3Network network = null;
@@ -462,7 +464,7 @@ public class BBInputSetupUtils {
 
     public Optional<GenericVnf> getRelatedVnfByNameFromServiceInstance(String serviceInstanceId, String vnfName) {
         AAIPluralResourceUri uri =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
                         .relatedTo(Types.GENERIC_VNFS.getFragment()).queryParam("vnf-name", vnfName);
         return injectionHelper.getAaiClient().getOne(GenericVnfs.class, GenericVnf.class, uri);
 
@@ -558,7 +560,7 @@ public class BBInputSetupUtils {
 
     public Optional<Configuration> getRelatedConfigurationByNameFromServiceInstance(String serviceInstanceId,
             String configurationName) {
-        AAIPluralResourceUri uri = AAIUriFactory
+        AAIPluralResourceUri uri = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
                 .relatedTo(Types.CONFIGURATIONS.getFragment()).queryParam("configuration-name", configurationName);
         return injectionHelper.getAaiClient().getOne(Configurations.class, Configuration.class, uri);
index 188f853..7920633 100644 (file)
@@ -89,6 +89,7 @@ import org.onap.so.serviceinstancebeans.CloudConfiguration;
 import org.onap.so.serviceinstancebeans.RequestDetails;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 
 @RunWith(MockitoJUnitRunner.class)
 public class BBInputSetupUtilsTest {
@@ -525,7 +526,7 @@ public class BBInputSetupUtilsTest {
         vnf.setVnfId(vnfId);
         vnf.setVnfName(vnfName);
         doReturn(Optional.of(vnf)).when(MOCK_aaiResourcesClient).getOne(GenericVnfs.class, GenericVnf.class,
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
                         .relatedTo(Types.GENERIC_VNFS.getFragment()).queryParam("vnf-name", vnfName));
         Optional<GenericVnf> actual =
                 this.bbInputSetupUtils.getRelatedVnfByNameFromServiceInstance(serviceInstanceId, vnfName);
@@ -692,7 +693,7 @@ public class BBInputSetupUtilsTest {
         configuration.setConfigurationId("id123");
         doReturn(Optional.of(configuration)).when(MOCK_aaiResourcesClient).getOne(Configurations.class,
                 Configuration.class,
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("service-instance-id123"))
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("service-instance-id123"))
                         .relatedTo(Types.CONFIGURATIONS.getFragment())
                         .queryParam("configuration-name", "configuration-name123"));
         Optional<Configuration> actual = this.bbInputSetupUtils
index 6d2ac6e..50a7ea8 100644 (file)
       <artifactId>spring-boot-starter-data-jpa</artifactId>
       <optional>true</optional>
     </dependency>
+    <dependency>
+      <groupId>org.onap.so</groupId>
+      <artifactId>common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <dependency>
       <groupId>org.onap.so</groupId>
       <artifactId>aai-client</artifactId>
index 3021852..9be5354 100644 (file)
@@ -26,6 +26,7 @@ import java.util.Optional;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -40,7 +41,7 @@ public class AAICreateResources extends AAIResource {
         AAIResourceUri projectURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(projectName));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         getAaiClient().createIfNotExists(projectURI, Optional.empty()).connect(projectURI, serviceInstanceURI);
 
     }
@@ -49,7 +50,7 @@ public class AAICreateResources extends AAIResource {
         AAIResourceUri owningEntityURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         Map<String, String> hashMap = new HashMap<>();
         hashMap.put("owning-entity-name", owningEntityName);
         getAaiClient().createIfNotExists(owningEntityURI, Optional.of(hashMap)).connect(owningEntityURI,
@@ -66,7 +67,7 @@ public class AAICreateResources extends AAIResource {
         AAIResourceUri owningEntityURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         getAaiClient().connect(owningEntityURI, serviceInstanceURI);
     }
 
index 97adc4d..4ecf829 100644 (file)
@@ -23,7 +23,7 @@ package org.onap.so.bpmn.infrastructure.aai;
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.camunda.bpm.engine.delegate.JavaDelegate;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.scripts.ExceptionUtil;
 import org.slf4j.Logger;
@@ -43,7 +43,7 @@ public class AAIDeleteServiceInstance extends AAIResource implements JavaDelegat
         try {
             String serviceInstanceId = (String) execution.getVariable("serviceInstanceId");
             AAIResourceUri serviceInstanceURI =
-                    AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+                    AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
             getAaiClient().delete(serviceInstanceURI);
             execution.setVariable("GENDS_SuccessIndicator", true);
         } catch (Exception ex) {
index cc7eefc..754263e 100644 (file)
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -30,6 +30,7 @@ import org.onap.aai.domain.yang.OwningEntity;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.slf4j.Logger;
@@ -43,7 +44,7 @@ public class AAICreateResources {
         AAIResourceUri projectURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(projectName));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         aaiRC.createIfNotExists(projectURI, Optional.empty()).connect(projectURI, serviceInstanceURI);
 
@@ -99,7 +100,7 @@ public class AAICreateResources {
         AAIResourceUri owningEntityURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntityId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance));
         AAIResourcesClient aaiRC = new AAIResourcesClient();
         aaiRC.connect(owningEntityURI, serviceInstanceURI);
     }
index df42e96..fe237c1 100644 (file)
@@ -24,7 +24,7 @@ import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.camunda.bpm.engine.delegate.JavaDelegate;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.scripts.ExceptionUtil;
 import org.slf4j.Logger;
@@ -42,7 +42,7 @@ public class AAIDeleteServiceInstance implements JavaDelegate {
         try {
             String serviceInstanceId = (String) execution.getVariable("serviceInstanceId");
             AAIResourceUri serviceInstanceURI =
-                    AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+                    AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
             AAIResourcesClient aaiRC = new AAIResourcesClient();
             aaiRC.delete(serviceInstanceURI);
             execution.setVariable("GENDS_SuccessIndicator", true);
index 03ff55b..3d582eb 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -26,6 +26,7 @@ import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.AAIRestClientImpl;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.springframework.stereotype.Component;
@@ -53,7 +54,7 @@ public class PnfManagementImpl implements PnfManagement {
     @Override
     public void createRelation(String serviceInstanceId, String pnfName) {
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         AAIResourceUri pnfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnfName));
         new AAIResourcesClient().connect(serviceInstanceURI, pnfUri);
     }
index 0486c52..11b74a0 100644 (file)
@@ -40,6 +40,7 @@ import org.onap.aai.domain.yang.Relationship;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
@@ -92,7 +93,7 @@ public class CreateChildServiceBB {
 
     /*
      * This method is to create Relation between Parent & Child Services with Node as Composed Resource.
-     * 
+     *
      */
 
     public void updateRelations(BuildingBlockExecution buildingBlockExecution) throws Exception {
@@ -116,7 +117,7 @@ public class CreateChildServiceBB {
         client.create(composedResourceURI, composedResource);
 
         AAIResourceUri childURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(childSvcInstanceId));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(childSvcInstanceId));
 
         client.connect(composedResourceURI, childURI);
 
index 9a2da2a..9bb1c24 100644 (file)
@@ -28,6 +28,7 @@ import org.onap.aai.domain.yang.RelationshipData;
 import org.onap.aai.domain.yang.ServiceInstance;
 import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.logging.filter.base.ONAPComponents;
@@ -77,14 +78,14 @@ public class DeleteChildServiceBB {
                 buildingBlockExecution.getLookupMap().get(ResourceKey.CHILD_SERVICE_INSTANCE_ID);
         String parentServiceInstanceId = buildingBlockExecution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID);
         ServiceInstance childInstanceAAI = aaiResourcesClient.get(ServiceInstance.class,
-                AAIUriFactory
+                AAIClientUriFactory
                         .createResourceUri(
                                 AAIFluentTypeBuilder.Types.SERVICE_INSTANCE.getFragment(childServiceInstanceId))
                         .depth(Depth.TWO))
                 .orElse(null);
         ServiceInstance parentInstanceAAI =
                 aaiResourcesClient.get(ServiceInstance.class,
-                        AAIUriFactory.createResourceUri(
+                        AAIClientUriFactory.createResourceUri(
                                 AAIFluentTypeBuilder.Types.SERVICE_INSTANCE.getFragment(parentServiceInstanceId))
                                 .depth(Depth.TWO))
                         .orElse(null);
@@ -118,7 +119,7 @@ public class DeleteChildServiceBB {
 
             ServiceInstance parentInstanceAAI =
                     aaiResourcesClient.get(ServiceInstance.class,
-                            AAIUriFactory.createResourceUri(
+                            AAIClientUriFactory.createResourceUri(
                                     AAIFluentTypeBuilder.Types.SERVICE_INSTANCE.getFragment(parentServiceInstanceId))
                                     .depth(Depth.TWO))
                             .orElse(null);
index 1373c2c..9d92c98 100644 (file)
@@ -25,6 +25,7 @@ import javax.ws.rs.core.UriBuilder;
 import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
@@ -90,7 +91,7 @@ public class AAIConfigurationResources {
         AAIResourceUri configurationURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         injectionHelper.getAaiClient().disconnect(configurationURI, serviceInstanceURI);
     }
 
@@ -131,7 +132,7 @@ public class AAIConfigurationResources {
         AAIResourceUri configurationURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         injectionHelper.getAaiClient().connect(configurationURI, serviceInstanceURI);
     }
 
@@ -147,7 +148,7 @@ public class AAIConfigurationResources {
         AAIResourceUri configurationURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().configuration(configurationId));
         AAIResourceUri serviceInstanceURI =
-                AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
+                AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
         injectionHelper.getAaiClient().connect(configurationURI, serviceInstanceURI, aaiLabel);
     }
 
index 27fa430..25a3ed6 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -25,6 +25,7 @@ import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
@@ -83,7 +84,7 @@ public class AAIInstanceGroupResources {
         AAIResourceUri instanceGroupUri =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
         org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = aaiObjectMapper.mapInstanceGroup(instanceGroup);
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().createIfNotExists(instanceGroupUri, Optional.of(aaiInstanceGroup))
                 .connect(instanceGroupUri, serviceInstanceURI);
index 2e8e50a..80b103f 100644 (file)
@@ -31,6 +31,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIBaseResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
@@ -75,7 +76,7 @@ public class AAINetworkResources {
         AAIResourceUri networkURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(network.getNetworkId()));
         network.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.L3Network aaiL3Network = aaiObjectMapper.mapNetwork(network);
         injectionHelper.getAaiClient().createIfNotExists(networkURI, Optional.of(aaiL3Network)).connect(networkURI,
@@ -181,7 +182,7 @@ public class AAINetworkResources {
 
     public void connectNetworkToNetworkCollectionServiceInstance(L3Network l3network,
             ServiceInstance networkCollectionServiceInstance) {
-        AAIResourceUri networkCollectionServiceInstanceUri = AAIUriFactory.createResourceUri(
+        AAIResourceUri networkCollectionServiceInstanceUri = AAIClientUriFactory.createResourceUri(
                 Types.SERVICE_INSTANCE.getFragment(networkCollectionServiceInstance.getServiceInstanceId()));
         AAIResourceUri networkURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3network.getNetworkId()));
@@ -209,7 +210,7 @@ public class AAINetworkResources {
             ServiceInstance networkCollectionServiceInstance) {
         AAIResourceUri networkCollectionUri =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().collection(networkCollection.getId()));
-        AAIResourceUri networkCollectionServiceInstanceUri = AAIUriFactory.createResourceUri(
+        AAIResourceUri networkCollectionServiceInstanceUri = AAIClientUriFactory.createResourceUri(
                 Types.SERVICE_INSTANCE.getFragment(networkCollectionServiceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().connect(networkCollectionUri, networkCollectionServiceInstanceUri);
     }
index d042fd6..4205261 100644 (file)
@@ -27,6 +27,7 @@ import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.RelationshipData;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
@@ -54,7 +55,7 @@ public class AAIPnfResources {
     public void createPnfAndConnectServiceInstance(Pnf pnf, ServiceInstance serviceInstance) {
         AAIResourceUri pnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().pnf(pnf.getPnfName()));
         pnf.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().createIfNotExists(pnfURI, Optional.of(aaiObjectMapper.mapPnf(pnf)))
                 .connect(pnfURI, serviceInstanceURI);
index 8c1e8f6..c9d49de 100644 (file)
@@ -11,9 +11,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -31,6 +31,7 @@ import org.onap.aaiclient.client.aai.AAIResourcesClient;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.so.bpmn.common.InjectionHelper;
@@ -53,7 +54,7 @@ public class AAIServiceInstanceResources {
     private AAIObjectMapper aaiObjectMapper;
 
     public boolean existsServiceInstance(ServiceInstance serviceInstance) {
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         return injectionHelper.getAaiClient().exists(serviceInstanceURI);
     }
@@ -71,7 +72,7 @@ public class AAIServiceInstanceResources {
 
     /**
      * Create ServiceSubscription in A&AI
-     * 
+     *
      * @param customer
      */
     public void createServiceSubscription(Customer customer) {
@@ -84,7 +85,7 @@ public class AAIServiceInstanceResources {
     }
 
     public void deleteServiceInstance(ServiceInstance serviceInstance) {
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().delete(serviceInstanceURI);
     }
@@ -99,7 +100,7 @@ public class AAIServiceInstanceResources {
     public void createProjectandConnectServiceInstance(Project project, ServiceInstance serviceInstance) {
         AAIResourceUri projectURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().project(project.getProjectName()));
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.Project aaiProject = aaiObjectMapper.mapProject(project);
         injectionHelper.getAaiClient().createIfNotExists(projectURI, Optional.of(aaiProject)).connect(projectURI,
@@ -150,7 +151,7 @@ public class AAIServiceInstanceResources {
     public void connectOwningEntityandServiceInstance(OwningEntity owningEntity, ServiceInstance serviceInstance) {
         AAIResourceUri owningEntityURI = AAIUriFactory
                 .createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntity.getOwningEntityId()));
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().connect(owningEntityURI, serviceInstanceURI);
     }
@@ -159,7 +160,7 @@ public class AAIServiceInstanceResources {
             ServiceInstance serviceInstance) {
         AAIResourceUri owningEntityURI = AAIUriFactory
                 .createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntity.getOwningEntityId()));
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.OwningEntity aaiOwningEntity = aaiObjectMapper.mapOwningEntity(owningEntity);
         injectionHelper.getAaiClient().createIfNotExists(owningEntityURI, Optional.of(aaiOwningEntity))
@@ -177,7 +178,7 @@ public class AAIServiceInstanceResources {
     }
 
     public void updateServiceInstance(ServiceInstance serviceInstance) {
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         org.onap.aai.domain.yang.ServiceInstance aaiServiceInstance =
                 aaiObjectMapper.mapServiceInstance(serviceInstance);
@@ -203,7 +204,7 @@ public class AAIServiceInstanceResources {
     }
 
     public boolean checkInstanceServiceNameInUse(ServiceInstance serviceInstance) {
-        AAIPluralResourceUri uriSI = AAIUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment())
+        AAIPluralResourceUri uriSI = AAIClientUriFactory.createNodesUri(Types.SERVICE_INSTANCES.getFragment())
                 .queryParam("service-instance-name", serviceInstance.getServiceInstanceName());
         return injectionHelper.getAaiClient().exists(uriSI);
     }
index 2f48b1f..7424201 100644 (file)
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -31,6 +31,7 @@ import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
 import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
@@ -60,7 +61,7 @@ public class AAIVnfResources {
         AAIResourceUri vnfURI =
                 AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()));
         vnf.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
-        AAIResourceUri serviceInstanceURI = AAIUriFactory
+        AAIResourceUri serviceInstanceURI = AAIClientUriFactory
                 .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
         injectionHelper.getAaiClient().createIfNotExists(vnfURI, Optional.of(aaiObjectMapper.mapVnf(vnf)))
                 .connect(vnfURI, serviceInstanceURI);
@@ -109,7 +110,7 @@ public class AAIVnfResources {
 
     /**
      * Retrieve Generic VNF from AAI using vnf Id
-     * 
+     *
      * @param vnfId - vnf-id required vnf
      * @return AAI Generic Vnf
      */
@@ -120,7 +121,7 @@ public class AAIVnfResources {
 
     /**
      * Check inMaint flag value of Generic VNF from AAI using vnf Id
-     * 
+     *
      * @param vnfId - vnf-id required vnf
      * @return inMaint flag value
      */
index b1e7a21..6edfde2 100644 (file)
     <version>1.16.0-SNAPSHOT</version>
   </parent>
   <artifactId>aai-client</artifactId>
-  <build>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.eclipse.m2e</groupId>
-          <artifactId>lifecycle-mapping</artifactId>
-          <version>1.0.0</version>
-          <configuration>
-            <lifecycleMappingMetadata>
-              <pluginExecutions>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-dependency-plugin</artifactId>
-                    <versionRange>[1.0.0,)</versionRange>
-                    <goals>
-                      <goal>unpack</goal>
-                    </goals>
-                  </pluginExecutionFilter>
-                  <action>
-                    <execute />
-                  </action>
-                </pluginExecution>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>org.onap.so</groupId>
-                    <artifactId>fluent-builder-maven-plugin</artifactId>
-                    <goals>
-                      <goal>generate-builders</goal>
-                    </goals>
-                    <versionRange>[0.0,)</versionRange>
-                  </pluginExecutionFilter>
-                  <action>
-                    <execute />
-                  </action>
-                </pluginExecution>
-              </pluginExecutions>
-            </lifecycleMappingMetadata>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>unpack</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>unpack</goal>
-            </goals>
-            <configuration>
-              <artifactItems>
-                <artifactItem>
-                  <groupId>org.onap.aai.traversal</groupId>
-                  <artifactId>aai-traversal</artifactId>
-                  <version>1.7.2</version>
-                  <outputDirectory>${project.build.directory}/antlr</outputDirectory>
-                  <includes>**/*.g4</includes>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.onap.aai.schema-service</groupId>
-                  <artifactId>aai-schema</artifactId>
-                  <outputDirectory>${project.build.directory}/swagger</outputDirectory>
-                  <includes>**/*.yaml</includes>
-                </artifactItem>
-              </artifactItems>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.onap.so</groupId>
-        <artifactId>fluent-builder-maven-plugin</artifactId>
-        <version>${project.version}</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>generate-builders</goal>
-            </goals>
-            <configuration>
-              <destination>${project.build.directory}/generated-sources</destination>
-              <destinationClasspath>org.onap.aaiclient.client.generated.fluentbuilders</destinationClasspath>
-              <builderName>AAIFluentTypeBuilder</builderName>
-              <swaggerLocation>${project.build.directory}/swagger/onap/aai_swagger_yaml/aai_swagger_LATEST.yaml</swaggerLocation>
-              <singularBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentSingleType</singularBuilderClass>
-              <pluralBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentPluralType</pluralBuilderClass>
-              <topLevelBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentTopLevelType</topLevelBuilderClass>
-              <baseBuilderClass>org.onap.aaiclient.client.graphinventory.GraphInventoryFluentTypeBase</baseBuilderClass>
-              <singularClass>org.onap.aaiclient.client.aai.AAIObjectType</singularClass>
-              <pluralClass>org.onap.aaiclient.client.aai.AAIObjectPlurals</pluralClass>
-              <nameClass>org.onap.aaiclient.client.aai.AAIObjectName</nameClass>
-              <singleFragmentClass>org.onap.aaiclient.client.aai.entities.uri.AAISingleFragment</singleFragmentClass>
-              <pluralFragmentClass>org.onap.aaiclient.client.aai.entities.uri.AAIPluralFragment</pluralFragmentClass>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>add-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>${project.build.directory}/generated-sources/fluent/</source>
-              </sources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
+    <dependency>
+      <groupId>org.onap.so</groupId>
+      <artifactId>aai-fluent-uri-builder</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <dependency>
       <groupId>org.onap.so</groupId>
       <artifactId>common</artifactId>
       <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
+          <artifactId>blueprint-proto</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.grpc</groupId>
+          <artifactId>grpc-netty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.grpc</groupId>
+          <artifactId>grpc-protobuf</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.onap.appc.client</groupId>
+          <artifactId>client-lib</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
index f3dc610..2245d26 100644 (file)
@@ -29,6 +29,7 @@ public class CacheLogger implements CacheEntryExpiredListener<Key, Entry>, Cache
     @Override
     public void onRemoved(Iterable<CacheEntryEvent<? extends Key, ? extends Entry>> events)
             throws CacheEntryListenerException {
+
         for (CacheEntryEvent<? extends Key, ? extends Entry> event : events) {
             logger.debug("{} removed key: {}", event.getSource().getName(), event.getKey().getUri());
         }
index d894a0f..88ac9ba 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index 75d4a6f..4a7bd0a 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index baa95fb..e8b6ecf 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -21,7 +21,7 @@
 package org.onap.aaiclient.client.aai.entities;
 
 import java.io.Serializable;
-import org.onap.aaiclient.client.graphinventory.entities.GraphInventoryResultWrapper;
+import org.onap.aaiclient.client.graphinventory.GraphInventoryResultWrapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index b8a80f0..66f72b9 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -28,7 +28,8 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIFluentTypeReverseLookup;
 import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
 import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectName;
-import org.onap.aaiclient.client.graphinventory.entities.GraphInventoryRelationships;
+import org.onap.aaiclient.client.graphinventory.GraphInventoryRelationships;
+
 
 public class Relationships extends GraphInventoryRelationships<AAIResultWrapper, AAIResourceUri, AAIObjectType> {
 
@@ -39,7 +40,7 @@ public class Relationships extends GraphInventoryRelationships<AAIResultWrapper,
     @Deprecated
     /**
      * Use getRelatedUris instead
-     * 
+     *
      * @return
      */
     public List<AAIResourceUri> getRelatedAAIUris() {
@@ -49,7 +50,7 @@ public class Relationships extends GraphInventoryRelationships<AAIResultWrapper,
     @Deprecated
     /**
      * Use getRelatedUris instead
-     * 
+     *
      * @return
      */
     public List<AAIResourceUri> getRelatedAAIUris(GraphInventoryObjectName type) {
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIClientUriFactory.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIClientUriFactory.java
new file mode 100644 (file)
index 0000000..945b766
--- /dev/null
@@ -0,0 +1,23 @@
+package org.onap.aaiclient.client.aai.entities.uri;
+
+import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+
+public class AAIClientUriFactory extends AAIUriFactory {
+    /**
+     * These can be retrieved without all their required keys but an HTTP call is required to do so
+     *
+     * @param type
+     * @param values
+     * @return
+     */
+    public static AAIResourceUri createResourceUri(AAISingleFragment fragment) {
+
+        if (Types.SERVICE_INSTANCE.typeName().equals(fragment.get().build().typeName())) {
+            return new ServiceInstanceUri(fragment);
+        } else if (Types.ALLOTTED_RESOURCE.typeName().equals(fragment.get().build().typeName())) {
+            return new AllottedResourceLookupUri(fragment);
+        } else {
+            return null;
+        }
+    }
+}
index 099f717..dba8113 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index 366a011..ddadb27 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index 27309cb..0d0e17a 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index af875fa..99a231a 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index c1b70dc..6c63a13 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index ba12bb8..a780d79 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index e626ec5..2ce40a0 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index 1438dbe..88b4763 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -29,9 +29,7 @@ import java.util.Optional;
 import java.util.stream.Collectors;
 import javax.ws.rs.core.GenericType;
 import org.onap.aaiclient.client.aai.entities.Results;
-import org.onap.aaiclient.client.graphinventory.entities.GraphInventoryResultWrapper;
 import org.onap.aaiclient.client.graphinventory.entities.Pathed;
-import org.onap.aaiclient.client.graphinventory.entities.ResourceAndUrl;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventoryUri;
 import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.aaiclient.client.graphinventory.entities;
+package org.onap.aaiclient.client.graphinventory;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -28,11 +28,9 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.function.Predicate;
 import java.util.function.UnaryOperator;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectName;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectType;
 import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri;
 import org.onap.so.jsonpath.JsonPathUtil;
+import com.ctc.wstx.shaded.msv_core.util.Uri;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
index 5dbe915..31571ea 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -34,7 +34,6 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aaiclient.client.graphinventory.entities.GraphInventoryEdgeLabel;
-import org.onap.aaiclient.client.graphinventory.entities.GraphInventoryResultWrapper;
 import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventoryPluralResourceUri;
 import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventoryResourceUri;
 import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri;
@@ -57,7 +56,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * creates a new object in GraphInventory
-     * 
+     *
      * @param obj - can be any object which will marshal into a valid GraphInventory payload
      * @param uri
      * @return
@@ -69,7 +68,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * creates a new object in GraphInventory with no payload body
-     * 
+     *
      * @param uri
      * @return
      */
@@ -80,7 +79,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * returns false if the object does not exist in GraphInventory
-     * 
+     *
      * @param uri
      * @return
      */
@@ -99,7 +98,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Adds a relationship between two objects in GraphInventory
-     * 
+     *
      * @param uriA
      * @param uriB
      * @return
@@ -112,7 +111,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Adds a relationship between two objects in GraphInventory with a given edge label
-     * 
+     *
      * @param uriA
      * @param uriB
      * @param edge label
@@ -126,7 +125,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Removes relationship from two objects in GraphInventory
-     * 
+     *
      * @param uriA
      * @param uriB
      * @return
@@ -139,7 +138,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Deletes object from GraphInventory. Automatically handles resource-version.
-     * 
+     *
      * @param uri
      * @return
      */
@@ -156,7 +155,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Deletes object from GraphInventory only if exists. Automatically handles resource-version.
-     * 
+     *
      * @param uri
      * @return
      */
@@ -186,7 +185,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Retrieves an object from GraphInventory and unmarshalls it into the Class specified
-     * 
+     *
      * @param clazz
      * @param uri
      * @return
@@ -205,7 +204,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Retrieves an object from GraphInventory and returns complete response
-     * 
+     *
      * @param uri
      * @return
      */
@@ -223,7 +222,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Retrieves an object from GraphInventory and automatically unmarshalls it into a Map or List
-     * 
+     *
      * @param resultClass
      * @param uri
      * @return
@@ -324,7 +323,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Retrieves an object from GraphInventory wrapped in a helper class which offer additional features
-     * 
+     *
      * @param uri
      * @return
      */
@@ -345,7 +344,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
     /**
      * Retrieves an object from GraphInventory wrapped in a helper class which offer additional features If the object
      * cannot be found in GraphInventory the method will throw the runtime exception included as an argument
-     * 
+     *
      * @param uri
      * @return
      */
@@ -380,7 +379,7 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Will automatically create the object if it does not exist
-     * 
+     *
      * @param obj - Optional object which serializes to a valid GraphInventory payload
      * @param uri
      * @return
@@ -424,14 +423,14 @@ public abstract class GraphInventoryResourcesClient<Self, Uri extends GraphInven
 
     /**
      * Starts a transaction which encloses multiple GraphInventory mutations
-     * 
+     *
      * @return
      */
     public abstract TransactionalClient beginTransaction();
 
     /**
      * Starts a transaction groups multiple GraphInventory mutations
-     * 
+     *
      * @return
      */
     public abstract SingleTransactionClient beginSingleTransaction();
index 6ccd1a2..d02274c 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.aaiclient.client.graphinventory.entities;
+package org.onap.aaiclient.client.graphinventory;
 
 import java.io.IOException;
 import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectName;
 import org.onap.so.jsonpath.JsonPathUtil;
 import org.slf4j.Logger;
 import com.fasterxml.jackson.core.JsonProcessingException;
index 4390e7e..4cc272c 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -46,7 +46,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * creates a new object in A&AI
-     * 
+     *
      * @param obj - can be any object which will marshal into a valid A&AI payload
      * @param uri
      * @return
@@ -59,7 +59,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * creates a new object in A&AI with no payload body
-     * 
+     *
      * @param uri
      * @return
      */
@@ -71,7 +71,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * Will automatically create the object if it does not exist
-     * 
+     *
      * @param obj - Optional object which serializes to a valid GraphInventory payload
      * @param uri
      * @return
@@ -90,7 +90,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * Adds a relationship between two objects in A&AI
-     * 
+     *
      * @param uriA
      * @param uriB
      * @return
@@ -104,7 +104,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * relationship between multiple objects in A&AI - connects A to all objects specified in list
-     * 
+     *
      * @param uriA
      * @param uris
      * @return
@@ -118,7 +118,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * relationship between multiple objects in A&AI - connects A to all objects specified in list
-     * 
+     *
      * @param uriA
      * @param uris
      * @return
@@ -131,7 +131,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * relationship between multiple objects in A&AI - connects A to all objects specified in list
-     * 
+     *
      * @param uriA
      * @param uris
      * @return
@@ -145,7 +145,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * Removes relationship from two objects in A&AI
-     * 
+     *
      * @param uriA
      * @param uriB
      * @return
@@ -159,7 +159,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * Removes relationship from multiple objects - disconnects A from all objects specified in list
-     * 
+     *
      * @param uriA
      * @param uris
      * @return
@@ -173,7 +173,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * Deletes object from A&AI. Automatically handles resource-version.
-     * 
+     *
      * @param uri
      * @return
      */
@@ -219,7 +219,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * Executes all created transactions in A&AI
-     * 
+     *
      * @throws BulkProcessFailed
      */
     public abstract void execute() throws BulkProcessFailed;
@@ -227,7 +227,7 @@ public abstract class GraphInventoryTransactionClient<Self, Uri extends GraphInv
 
     /**
      * Executes all created transactions in A&AI, with optional dry run flag
-     * 
+     *
      * @throws BulkProcessFailed
      */
     public abstract void execute(boolean dryrun) throws BulkProcessFailed;
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -18,9 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.aaiclient.client.graphinventory.entities;
-
-import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectType;
+package org.onap.aaiclient.client.graphinventory;
 
 public class ResourceAndUrl<Wrapper extends GraphInventoryResultWrapper> {
 
index 615f4df..cb7b4dc 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index a3b026a..ec4916e 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -52,8 +52,8 @@ import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.T
 import org.onap.aaiclient.client.graphinventory.Format;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryClient;
 import org.onap.aaiclient.client.graphinventory.GraphInventorySubgraphType;
+import org.onap.aaiclient.client.graphinventory.ResourceAndUrl;
 import org.onap.aaiclient.client.graphinventory.entities.Pathed;
-import org.onap.aaiclient.client.graphinventory.entities.ResourceAndUrl;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
 import org.onap.so.client.RestClient;
 import com.fasterxml.jackson.core.type.TypeReference;
index 23c06a6..c9811fa 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -42,7 +42,7 @@ import org.mockito.InjectMocks;
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aaiclient.client.aai.entities.AAIResultWrapper;
-import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.onap.aaiclient.client.aai.entities.uri.ServiceInstanceUri;
 import org.onap.aaiclient.client.defaultproperties.DefaultAAIPropertiesImpl;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
@@ -71,7 +71,7 @@ public class AAIResourcesClientWithServiceInstanceUriTest {
         wireMockRule.stubFor(get(urlMatching("/aai/v[0-9]+/nodes.*")).willReturn(
                 aResponse().withStatus(404).withHeader("Content-Type", "application/json").withHeader("Mock", "true")));
 
-        uri = spy((ServiceInstanceUri) AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("id")));
+        uri = spy((ServiceInstanceUri) AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment("id")));
         doReturn(aaiClient).when(uri).getResourcesClient();
     }
 
index 7035999..40a0464 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index cda119e..d9ae225 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index 7fad6f5..29f403b 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
index 75dbd4a..69c52d0 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
diff --git a/graph-inventory/aai-fluent-uri-builder/pom.xml b/graph-inventory/aai-fluent-uri-builder/pom.xml
new file mode 100644 (file)
index 0000000..4574ca8
--- /dev/null
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>graph-inventory</artifactId>
+    <groupId>org.onap.so</groupId>
+    <version>1.16.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.onap.so</groupId>
+  <artifactId>aai-fluent-uri-builder</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>33.4.8-jre</version>
+    </dependency>
+    <dependency>
+      <groupId>org.reflections</groupId>
+      <artifactId>reflections</artifactId>
+      <version>0.10.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.aai.schema-service</groupId>
+      <artifactId>aai-annotations</artifactId>
+      <version>1.9.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>3.18.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.glassfish.jersey.core</groupId>
+      <artifactId>jersey-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <versionRange>[1.0.0,)</versionRange>
+                    <goals>
+                      <goal>unpack</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <execute />
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.onap.so</groupId>
+                    <artifactId>fluent-builder-maven-plugin</artifactId>
+                    <goals>
+                      <goal>generate-builders</goal>
+                    </goals>
+                    <versionRange>[0.0,)</versionRange>
+                  </pluginExecutionFilter>
+                  <action>
+                    <execute />
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.jacoco</groupId>
+          <artifactId>jacoco-maven-plugin</artifactId>
+          <configuration>
+            <excludes>
+              <exclude>**/generated/**/*</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>unpack</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.onap.aai.traversal</groupId>
+                  <artifactId>aai-traversal</artifactId>
+                  <version>1.7.2</version>
+                  <outputDirectory>${project.build.directory}/antlr</outputDirectory>
+                  <includes>**/*.g4</includes>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.onap.aai.schema-service</groupId>
+                  <artifactId>aai-schema</artifactId>
+                  <version>1.9.2</version>
+                  <outputDirectory>${project.build.directory}/swagger</outputDirectory>
+                  <includes>**/*.yaml</includes>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.onap.so</groupId>
+        <artifactId>fluent-builder-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate-builders</goal>
+            </goals>
+            <configuration>
+              <destination>${project.build.directory}/generated-sources</destination>
+              <destinationClasspath>org.onap.aaiclient.client.generated.fluentbuilders</destinationClasspath>
+              <builderName>AAIFluentTypeBuilder</builderName>
+              <swaggerLocation>${project.build.directory}/swagger/onap/aai_swagger_yaml/aai_swagger_LATEST.yaml</swaggerLocation>
+              <singularBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentSingleType</singularBuilderClass>
+              <pluralBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentPluralType</pluralBuilderClass>
+              <topLevelBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentTopLevelType</topLevelBuilderClass>
+              <baseBuilderClass>org.onap.aaiclient.client.graphinventory.GraphInventoryFluentTypeBase</baseBuilderClass>
+              <singularClass>org.onap.aaiclient.client.aai.AAIObjectType</singularClass>
+              <pluralClass>org.onap.aaiclient.client.aai.AAIObjectPlurals</pluralClass>
+              <nameClass>org.onap.aaiclient.client.aai.AAIObjectName</nameClass>
+              <singleFragmentClass>org.onap.aaiclient.client.aai.entities.uri.AAISingleFragment</singleFragmentClass>
+              <pluralFragmentClass>org.onap.aaiclient.client.aai.entities.uri.AAIPluralFragment</pluralFragmentClass>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>add-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/generated-sources/fluent/</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
@@ -27,9 +27,9 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Pattern;
 import org.onap.aai.annotations.Metadata;
-import org.onap.aaiclient.client.aai.entities.uri.AAIFluentTypeReverseLookup;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectName;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectType;
+import org.onap.aaiclient.client.aai.entities.uri.AAIFluentTypeReverseLookup;
 import org.reflections.Reflections;
 import org.reflections.scanners.SubTypesScanner;
 import org.reflections.util.ClasspathHelper;
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -1,8 +1,8 @@
 package org.onap.aaiclient.client.aai.entities.uri;
 
+import org.onap.aaiclient.client.graphinventory.GraphInventoryFluentType;
 import org.onap.aaiclient.client.aai.AAIObjectName;
 import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.graphinventory.GraphInventoryFluentType;
 import com.google.common.base.CaseFormat;
 
 public interface AAIFluentSingleType extends GraphInventoryFluentType<AAIObjectType> {
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -24,8 +24,6 @@ import java.net.URI;
 import org.onap.aaiclient.client.aai.AAIObjectName;
 import org.onap.aaiclient.client.aai.AAIObjectPlurals;
 import org.onap.aaiclient.client.aai.AAIObjectType;
-import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
-
 
 public class AAIUriFactory {
 
@@ -43,24 +41,6 @@ public class AAIUriFactory {
         return new AAISimpleUri(type, values);
     }
 
-    /**
-     * These can be retrieved without all their required keys but an HTTP call is required to do so
-     *
-     * @param type
-     * @param values
-     * @return
-     */
-    public static AAIResourceUri createResourceUri(AAISingleFragment fragment) {
-
-        if (Types.SERVICE_INSTANCE.typeName().equals(fragment.get().build().typeName())) {
-            return new ServiceInstanceUri(fragment);
-        } else if (Types.ALLOTTED_RESOURCE.typeName().equals(fragment.get().build().typeName())) {
-            return new AllottedResourceLookupUri(fragment);
-        } else {
-            return null;
-        }
-    }
-
     public static AAIResourceUri createResourceUri(AAIFluentSingleType uri) {
         return new AAISimpleUri(uri.build(), uri.values());
     }
@@ -80,7 +60,7 @@ public class AAIUriFactory {
 
     /**
      * This method should only be used to wrap a URI retrieved from A&AI contained within an object response
-     * 
+     *
      * @param type
      * @param uri
      * @return
@@ -93,7 +73,7 @@ public class AAIUriFactory {
 
     /**
      * creates an AAIResourceUri from a parentUri
-     * 
+     *
      * @param parentUri
      * @param childType
      * @param childValues
@@ -117,7 +97,7 @@ public class AAIUriFactory {
 
     /**
      * Creates a uri for a plural type e.g. /cloud-infrastructure/pservers
-     * 
+     *
      * @param type
      * @return
      */
@@ -129,7 +109,7 @@ public class AAIUriFactory {
 
     /**
      * Creates a uri for a plural type with values e.g. /cloud-infrastructure/pservers
-     * 
+     *
      * @param type
      * @return
      */
@@ -1,8 +1,8 @@
 package org.onap.aaiclient.client.aai.entities.uri;
 
 import javax.ws.rs.core.UriBuilder;
-import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectBase;
+import org.onap.aaiclient.client.aai.AAIObjectType;
 
 public class NodesSingleUri extends AAISimpleUri implements NodesUri {
 
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -26,7 +26,6 @@ import java.util.Collection;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.stream.Collectors;
-import org.onap.aaiclient.client.aai.entities.QueryStep;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectName;
 
 public abstract class DSLNodeBase<T extends DSLNodeBase<?>> implements QueryStep {
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -23,7 +23,6 @@ package org.onap.aaiclient.client.graphinventory.entities;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import org.onap.aaiclient.client.aai.entities.QueryStep;
 import com.google.common.base.Joiner;
 
 
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -26,7 +26,6 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.function.Consumer;
 import java.util.stream.Collectors;
-import org.onap.aaiclient.client.aai.entities.QueryStep;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectName;
 import com.google.common.base.Joiner;
 
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.aaiclient.client.aai.entities;
+package org.onap.aaiclient.client.graphinventory.entities;
 
 @FunctionalInterface
 public interface QueryStep {
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -54,4 +54,3 @@ public class Resource {
     }
 
 }
-
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -23,6 +23,7 @@ package org.onap.aaiclient.client.graphinventory.entities.uri;
 import org.onap.aaiclient.client.graphinventory.Format;
 import org.onap.aaiclient.client.graphinventory.GraphInventoryObjectBase;
 
+
 public interface GraphInventoryResourceUri<T extends GraphInventoryResourceUri<?, ?>, OT extends GraphInventoryObjectBase>
         extends GraphInventoryUri<T, OT> {
 
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -35,11 +35,11 @@ public interface GraphInventoryUri<T extends GraphInventoryUri<?, ?>, OT extends
     /**
      * By default GraphInventory enforces a depth of 1. Some objects can be told to retrieve objects nested beneath them
      * by increasing this number.
-     * 
+     *
      * You can use 0 to restrict the returned information to only the object you requested You can use all to retrieve
      * all nested objects (this should only be used if you really need a massive amount of information and are caching
      * the retrieval)
-     * 
+     *
      * @param depth
      * @return
      */
@@ -47,7 +47,7 @@ public interface GraphInventoryUri<T extends GraphInventoryUri<?, ?>, OT extends
 
     /**
      * Makes client only return object fields, no relationships
-     * 
+     *
      * @return
      */
     public T nodesOnly(boolean nodesOnly);
@@ -66,7 +66,7 @@ public interface GraphInventoryUri<T extends GraphInventoryUri<?, ?>, OT extends
 
     /**
      * returns all key values of the URI as a map. Key names can be found in {@link GraphInventoryObjectType}
-     * 
+     *
      * @return
      */
     public Map<String, String> getURIKeys();
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -20,8 +20,8 @@
 
 package org.onap.aaiclient.client.aai.entities.uri;
 
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import org.junit.jupiter.api.Test;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
@@ -36,9 +36,9 @@ public class AAISimpleUriFromParentUriTest {
 
         AAIResourceUri uri = new AAISimpleUri(parentUri, Types.ALLOTTED_RESOURCE.getFragment("").get().build(), "key4");
 
-        assertEquals("path appended",
+        assertEquals(
                 "/business/customers/customer/key1/service-subscriptions/service-subscription/key2/service-instances/service-instance/key3/allotted-resources/allotted-resource/key4",
-                uri.build().toString());
+                uri.build().toString(), "path appended");
 
     }
 }
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
@@ -20,9 +20,9 @@
 
 package org.onap.aaiclient.client.aai.entities.uri;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import javax.ws.rs.core.UriBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.aaiclient.client.aai.AAIObjectType;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 
@@ -38,8 +38,8 @@ public class AAISimpleUriFromUriTest {
                         .fromUri("https://localhost:8443/aai/v9/network/vces/vce/a9fec18e-1ea3-40e4-a6c0-a89b3de07053")
                         .build());
 
-        assertEquals("root and version removed", "/network/vces/vce/a9fec18e-1ea3-40e4-a6c0-a89b3de07053",
-                uri.build().toString());
+        assertEquals("/network/vces/vce/a9fec18e-1ea3-40e4-a6c0-a89b3de07053", uri.build().toString(),
+                "root and version removed");
 
     }
 
@@ -49,7 +49,7 @@ public class AAISimpleUriFromUriTest {
         AAIResourceUri uri = new AAISimpleUri(AAIObjectType.UNKNOWN,
                 UriBuilder.fromUri("/network/vces/vce/a9fec18e-1ea3-40e4-a6c0-a89b3de07053").build());
 
-        assertEquals("no change", "/network/vces/vce/a9fec18e-1ea3-40e4-a6c0-a89b3de07053", uri.build().toString());
+        assertEquals("/network/vces/vce/a9fec18e-1ea3-40e4-a6c0-a89b3de07053", uri.build().toString(), "no change");
 
     }
 
@@ -59,8 +59,8 @@ public class AAISimpleUriFromUriTest {
         AAIResourceUri uri = new AAISimpleUri(AAIObjectType.UNKNOWN,
                 UriBuilder.fromUri("/network/vces/vce/a9f%20%20ec18e-1ea3-40e4-a6c0-a89b3de07053").build());
 
-        assertEquals("encoding preserved", "/network/vces/vce/a9f%20%20ec18e-1ea3-40e4-a6c0-a89b3de07053",
-                uri.build().toString());
+        assertEquals("/network/vces/vce/a9f%20%20ec18e-1ea3-40e4-a6c0-a89b3de07053", uri.build().toString(),
+                "encoding preserved");
 
     }
 
@@ -72,7 +72,7 @@ public class AAISimpleUriFromUriTest {
 
         AAIResourceUri uri2 = new AAISimpleUri(AAIFluentTypeBuilder.network().vce("").build(),
                 "a9f  ec18e-1ea3-40e4-a6c0-a89b3de07053");
-        assertEquals("are equal", uri2, uri);
+        assertEquals(uri2, uri, "are equal");
 
     }
 }
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
 
 package org.onap.aaiclient.client.aai.entities.uri;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Map;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAISimplePluralUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://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.
 
 package org.onap.aaiclient.client.aai.entities.uri;
 
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import org.junit.jupiter.api.Test;
+import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAISimpleUri;
+import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
 import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
 
diff --git a/graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/DslQueryBuilderTest.java b/graph-inventory/aai-fluent-uri-builder/src/test/java/org/onap/aaiclient/client/aai/entities/uri/DslQueryBuilderTest.java
new file mode 100644 (file)
index 0000000..d03b912
--- /dev/null
@@ -0,0 +1,17 @@
+package org.onap.aaiclient.client.aai.entities.uri;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.jupiter.api.Test;
+import org.onap.aaiclient.client.generated.fluentbuilders.Pserver;
+import org.onap.aaiclient.client.graphinventory.entities.DSLStartNode;
+import org.onap.aaiclient.client.graphinventory.entities.DSLTraversal;
+import org.onap.aaiclient.client.graphinventory.entities.__;
+
+public class DslQueryBuilderTest {
+
+    @Test
+    void s() {
+        DSLTraversal<Object> traversal = __.start(new DSLStartNode(new Pserver.Info())).build();
+        assertEquals("pserver", traversal.get());
+    }
+}
index 59aaeb4..21d25cb 100644 (file)
@@ -10,6 +10,7 @@
   <packaging>pom</packaging>
   <modules>
     <module>fluent-builder-maven-plugin</module>
+    <module>aai-fluent-uri-builder</module>
     <module>aai-client</module>
   </modules>
 </project>
index d8ad82c..ed51904 100644 (file)
@@ -30,6 +30,7 @@ import org.onap.aaiclient.client.graphinventory.entities.TraversalBuilder;
 import org.onap.aaiclient.client.graphinventory.entities.__;
 import org.onap.so.apihandlerinfra.infra.rest.exception.AAIEntityNotFound;
 import org.onap.so.serviceinstancebeans.CloudConfiguration;
+import org.onap.aaiclient.client.aai.entities.uri.AAIClientUriFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
@@ -48,7 +49,7 @@ public class AAIDataRetrieval {
     public ServiceInstance getServiceInstance(String serviceInstanceId) {
         return this.getAaiResourcesClient()
                 .get(ServiceInstance.class,
-                        AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId)))
+                        AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId)))
                 .orElseGet(() -> {
                     logger.debug("No Service Instance found in A&AI ServiceInstanceId: {}", serviceInstanceId);
                     return null;
@@ -121,19 +122,19 @@ public class AAIDataRetrieval {
 
     public boolean isServiceRelatedToNetworks(String serviceInstanceId) {
         return this.getAaiResourcesClient()
-                .exists(AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                .exists(AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
                         .relatedTo(Types.L3_NETWORKS.getFragment()));
     }
 
     public boolean isServiceRelatedToGenericVnf(String serviceInstanceId) {
         return this.getAaiResourcesClient()
-                .exists(AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                .exists(AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
                         .relatedTo(Types.GENERIC_VNFS.getFragment()));
     }
 
     public boolean isServiceRelatedToConfiguration(String serviceInstanceId) {
         return this.getAaiResourcesClient()
-                .exists(AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
+                .exists(AAIClientUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId))
                         .relatedTo(Types.CONFIGURATIONS.getFragment()));
     }