example: my-cm-handle1
publicCmHandleProperties:
type: object
+ nullable: true
items:
type: object
additionalProperties:
type: string
example: '3gpp Type'
- privateCmHandleProperties:
+ cmHandleProperties:
type: object
additionalProperties:
type: string
summary: Query Cm Handles for a requested DMI Service
operationId: searchCmHandles
parameters:
- - name: includePrivatePropertiesInQuery
+ - name: includeCmHandlePropertiesInQuery
in: query
- description: Whether to include private properties in the response.
+ description: Whether to include additional properties in the response.
required: false
schema:
type: boolean
* Execute cm handle query search and return a list of cm handle details. Any number of conditions can be applied.
*
* @param cmHandleQueryParameters the cm handle query parameters
- * @param includeAdditionalProperties boolean value to determine the inclusion of additional properties
+ * @param includeCmHandlePropertiesInQuery boolean value to determine the inclusion of additional properties
* @return collection of cm handles
*/
@Override
public ResponseEntity<List<RestOutputCmHandle>> searchCmHandles(
final CmHandleQueryParameters cmHandleQueryParameters,
- final Boolean includeAdditionalProperties) {
+ final Boolean includeCmHandlePropertiesInQuery) {
final CmHandleQueryApiParameters cmHandleQueryApiParameters =
deprecationHelper.mapOldConditionProperties(cmHandleQueryParameters);
- final boolean includeAdditionalPropertiesParameter = Boolean.TRUE.equals(includeAdditionalProperties);
+ final boolean includeCmHandlePropertiesParameter = Boolean.TRUE.equals(includeCmHandlePropertiesInQuery);
final List<RestOutputCmHandle> restOutputCmHandles =
networkCmProxyInventoryFacade.executeCmHandleInventorySearch(cmHandleQueryApiParameters)
.map(handle -> restOutputCmHandleMapper
- .toRestOutputCmHandle(handle, includeAdditionalPropertiesParameter))
+ .toRestOutputCmHandle(handle, includeCmHandlePropertiesParameter))
.collectList().block();
return ResponseEntity.ok(restOutputCmHandles);
}
restOutputCmHandle.setPublicCmHandleProperties(
Collections.singletonList(ncmpServiceCmHandle.getPublicProperties()));
if (includeAdditionalProperties) {
- restOutputCmHandle.setPrivateCmHandleProperties(ncmpServiceCmHandle.getAdditionalProperties());
+ restOutputCmHandle.setCmHandleProperties(ncmpServiceCmHandle.getAdditionalProperties());
+ } else {
+ restOutputCmHandle.setCmHandleProperties(null);
}
restOutputCmHandle.setState(
cmHandleStateMapper.toCmHandleCompositeStateExternalLockReason(
restOutputCmHandle.setDataProducerIdentifier(ncmpServiceCmHandle.getDataProducerIdentifier());
return restOutputCmHandle;
}
-}
\ No newline at end of file
+}
def 'Get a cm handle by DMI service name.'() {
given: 'an endpoint for returning cm handles by dmi service name'
- def postUrl = "$ncmpBasePathV1/ch/searchCmHandles?includePrivatePropertiesInQuery=true"
+ def postUrl = "$ncmpBasePathV1/ch/searchCmHandles?includeCmHandlePropertiesInQuery=true"
String jsonString = TestUtils.getResourceFileContent('cm-handle-search-by-dmi-service.json')
and: 'a cm handle is returned'
def ncmpServiceCmHandle = new NcmpServiceCmHandle(additionalProperties: ['someName': 'my dmi'])
when: 'the mapper function is called'
def result = objectUnderTest.toRestOutputCmHandle(ncmpServiceCmHandle, includeAdditionalProperties)
then: 'result has the expected properties'
- assert result.privateCmHandleProperties.containsKey('additional property key') == includeAdditionalProperties
+ if (includeAdditionalProperties) {
+ assert result.cmHandleProperties.containsKey('additional property key')
+ }
if (trustLevel != null) {
assert result.trustLevel == trustLevel.toString()
}
this query.
operationId: searchCmHandles
parameters:
- - description: Whether to include private properties in the response.
+ - description: Whether to include additional properties in the response.
in: query
- name: includePrivatePropertiesInQuery
+ name: includeCmHandlePropertiesInQuery
required: false
schema:
type: boolean
publicCmHandleProperties:
- key: 3gpp Type
- key: 3gpp Type
+ cmHandleProperties:
+ key: 3gpp Type
state:
dataSyncEnabled: false
dataSyncState:
lastUpdateTime: 2022-12-31T20:30:40.000+0000
trustLevel: COMPLETE
moduleSetTag: my-module-set-tag
- privateCmHandleProperties:
- key: 3gpp Type
properties:
cmHandle:
example: my-cm-handle1
example: 3gpp Type
type: string
type: object
+ nullable: true
type: array
- privateCmHandleProperties:
+ cmHandleProperties:
additionalProperties:
example: 3gpp Type
type: string
publicCmHandleProperties:
- key: 3gpp Type
- key: 3gpp Type
+ cmHandleProperties:
+ key: 3gpp Type
state:
dataSyncEnabled: false
dataSyncState:
lastUpdateTime: 2022-12-31T20:30:40.000+0000
trustLevel: COMPLETE
moduleSetTag: my-module-set-tag
- privateCmHandleProperties:
- key: 3gpp Type
properties:
cmHandle:
example: my-cm-handle1
example: 3gpp Type
type: string
type: object
+ nullable: true
type: array
- privateCmHandleProperties:
+ cmHandleProperties:
additionalProperties:
example: 3gpp Type
type: string