Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-2240

Issues & Decisions


IssueNotes Decision
1use api and impl folders

Team agreed on separate top level ap and impl folders. Common impl folders can be at top level ie. not under impl.
any class in api should not depend (i.e. nor import) anything from impl or common folders!!!  

2use feature based packages

Team agreed to use the current 4

service

services (or 5 depending on inventory)  as feature folders directly under impl and some also under api

and impl
  • datajobs
  • The following feature structure emerged during the actual refactoring

    • cmsubscriptions
    cmhandlequeries
    • (TBC)
  • proxydataservice (TBC passtrough data services)
  • cacheddataservice(TBC cached data services)
    •  data
      • async
    • datajobs
    • inventory
      • sync
        • lcm
      • trustlevel
    inventory (TBC)
    3when to use common packages

    when in doubt use common package ie exceptions might be re-used for

    otrerh

    other features in

    teh futures 

    the future

    4scope

    curerntly

    currently only ncmp-service in scope. 

    5plan

    team agreed to do trial with 'datajobs' first. Code need to be reviewed by both teams. Once this is completed we will

    adress

    address 'legacy' services

    ...

    Proposed Generic Structure


    PackageScopeNotes
    1apiall classes that are required for northbound interfacesclasses that are directly used by the REST interface (or controllers)
    2api\featureall API classes that are specific to a given feature
    3api\feature\modelsall data-holder type classes for the API specific to the featuredo NOT add data objects that are only used in the impl!
    4api\feature\exceptionsall exception classes that are specific to a given featuredo think 'ahead': is the exception rally going to be unique for this feature! 
    If in doubt it probably should go into api\exception. Because moving it later would be a backward incompatible change!
    5api\modelsall data-holder type classes for the API that can be shared between features
    6api\feature\exceptionsall exception classes that can be shared between features and at least oen feature exposes on the API
    7implall classes that are NOT exposed on the northbound interface and are unique to just one featuresince these classes are NOT exposed on the API it is OK to move them to the common utils\ package only when needed (i.e. later) since this would not be backward incompatible
    8impl\featureall implementation classes that are specific to a given featurea feature could be NOT direct used by a API feature but maybe api features can depend on a common implementation feature such as 'trustlevel' or 'sync/data' and 'sync/module'
    9exceptionsall exception classes that can be shared between given features and are NOT exposed on any API
    10utilsall  implementation classes that can be shared between features but don't belong to a specific featureeven if classes are used by several API feature that doesn't mean thry have to go here. They can stull be part of a common (impl. only) feature e.g. TrustLevel
    11modelsall data-holder type classes used in impl only that can be shared between features


    Code Block
    titleGeneric folder (package structure)
    api\feature1\someServiceSomeService.class
    api\feature1\models\specificModelclassSpecificModelClass
    api\feature1\exceptions\sepcificExceptionSpecificException.class
    api\feature2\someServiceSomeService.class
    api\feature2\models\specificModelclassSpecificModelclass
    api\feature2\exceptions\sepcificExceptionSpecificException.class
    api\models\commonModelCommonModel.class
    api\exeptions\commonexceptionCommonException.class
    
    impl\feature1\someServiceImplSomeServiceImpl.class
    impl\feature1\helperPackage\somHelperSpecificHelper.class
    impl\feature2\someServiceImplSomeServiceImpl.class
    
    exceptions\someInternalException.class
    utils\commonHelperCommonHelper.class

    Proposed DataJobs Structure

    Proposed structure (not complete but indicative):

    Code Block
    titledatajobs
    api\datajobs\DataJobsService.class
    api\datajobs\models\DataJobMetadata.class
    api\datajobs\models\DataJobReadRequest.class
    api\datajobs\models\DataJobWriteRequest.class
    
    impl\datajobs\DataJobsServiceImpl.class
    
    impl\datajobs\utils\AlternateIdMatcher exceptions\NoAlternateIdParentFoundException.class
    utils\AlternateIdMatcher.class

    Proposed User Stories

    • Jira
      serverONAP Jira
      serverId425b2b0a-557c-3c0c-b515-579789cceedb
      keyCPS-2240
    • Jira
      serverONAP Jira
      serverId425b2b0a-557c-3c0c-b515-579789cceedb
      keyCPS-2255
    • Jira
      serverONAP Jira
      columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId425b2b0a-557c-3c0c-b515-579789cceedb
      keyCPS-2256
    • Jira
      serverONAP Jira
      columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId425b2b0a-557c-3c0c-b515-579789cceedb
      keyCPS-2257
    • Jira
      serverONAP Jira
      serverId425b2b0a-557c-3c0c-b515-579789cceedb
      keyCPS-2258
    • Jira
      serverONAP Jira
      serverId425b2b0a-557c-3c0c-b515-579789cceedb
      keyCPS-2298