You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Implementation Proposal

Merge 2 'query' end points in one

REST Layer

  • openapi.yaml
    • change /v1/data/ch/searches to  /v1/ch/idSearches
  • ncmp.yaml
    • change executeCmHandleSearch method to queryCmHandles
    • change queryCmHandles method to queryCmHandleIds
    • Use the CmHandleQueryRestParameters schema to both of them
  • components.yaml
    • merge Conditions schema to CmHandleQueryRestParameters schema

Controller Layer

  • NetworkCmProxyController
    • Update controller methods to use the new schema
    • Both component method call separated service method

Service Layer

  • NetworkCmProxyDataService
    • Create new method for query cmHandles
    • Keep queryCmHandles method and rename queryCmHandleIds
    • Both method should call a same method in CpsAdminService
    • Validation logic should move to an separated method and call it from both method
  • CpsAdminService
    • Update queryCmHandles method return type to Set<CmHandles>
  • CpsAdminPersistenceService
    • Update queryCmHandles method return type to Set<CmHandles>

Persistence Layer

  • ModuleReferenceQuery
    • Update queryCmHandles method return type to Set<CmHandles>
    • Update queryCmHandles method to handle both filtering parameters

Test

  • update existing test to the new endpoint
  • create new tests for new filtering scenarios (combine the two existing filter)


  • No labels