Versions Compared

Key

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

Table of Contents
maxLevel4

...

Details about the ENM SPI can be found here: https://wiki.onap.org/pages/resumedraft.action?draftId=92998891&draftShareId=2f0190f4-bc97-47b7-bd82-6561f3606575&NOTES


Proposed Future Implementation of CPS SPI

...


Name


Definition

 Capabilities

1SimpleDataObjectProvides the basic information needed to access an object.
  • getCpsPath
  • getNamespace (see open issue no. 4)
  • getRevision (see open issue no. 4)
  • getSchemaNodeIdentifier (Type)
  • equals
  • hashCode
2DataPersistenceServiceAdding functionality for handling attributes
  • getPersistenceObject

Gets the persistence layer object without any layers of decoration.

If the innermost object is not a persistence layer object then a suitable exception will be thrown.

  • checkUserSuppliedAttributesAtCreation

Passes the attributes supplied by the user for a new persistence object so that they may be verified as required.

  • initializeAttributes

Initializes the attributes for a new persistence object. This method should be invoked when creating a new persistence object rather than using setAttributes() as it will have different behavior, namely:

  1. it verifies all mandatory attributes have been supplied

  2. it initializes all non-supplied attributes to their default value where relevant

  3. no notifications will be sent as a result of this method being called

  • getAttributesSpecificallySet

Gets the values for the attributes which have been specifically set on this object.

This includes attributes which:

  1. were supplied at creation of the object or

  2. had default values applied during creation or

  3. were specifically set after creation by invoking one of the setAttribute(s) methods.

Note that an attribute may have been specifically set to null so the values returned in the map may contain nulls.

  • isAttributeSet

Determines if the supplied attribute has been specifically set (includes attributes which were set to null).

  • getAttributeNames

Gets all of the attribute names available in this persistence object.

  • unsetAttributes

Unsets the values of the supplied attributes.

  • createDataspace
  • getDataspaces
  • getDataspace
  • deleteDataspace
3FragmentObject

4DataspaceObjectCreate a simple CPS Dataspace Object
  • findByName
  • getByName
  • existsByName

...


Name


Definition

 Capabilities

1

 QueryService 

Service responsible for dealing with query related features of CPS.


  • execute

Executes the query and presents the result as an iterator of objects queried for. 

  • executeCount

Executes the query and presents the result as a count of how many instances are matched against the query.
Note: because of database limitations, at this moment this method is not optimized.

  • executeDeletion

Deletes all matching objects and where appropriate deletes any children.

  • getSchemaNodeIdentifier (Type)

Retrieves the type of object that the type query is to target.

2

QueryPathService

Service responsible for dealing with path query related features

  • executePathQuery

executes the path query against the db. returns a list of type Object.

  • getTargetObjects

Executes the query ands gets the result as an iterable of 'full' objects queried. 

3QueryBuilderServiceCreate queries using CPS query builder
  • getNodesByPathForAnchor

  • getNode

  • queryNodes

  • getNodeBySchemaNodeIdentifier

4CpsRestrictionCreates a simple CPS restriction
  • pathRestriction
  • getRestriction

Gets the restriction used in the query criteria, including any internal restrictions added in addition to those set by the user.

  • getAttributeName

Retrieves the name of the attribute that the restriction is.

5

SimpleRestriction

Creates a simple restriction (e.g. compare one field to one value).


  • negate

  • getAttributeName

  • getAttributeValue

  • getSimpleExpressionOperator

  • toString

6

PartialMatchRestriction


Implementation of the partial match restriction and not match restriction.


  • negate

  • getRestrictionType

  • getMatchConditionType

  • getAttributeName

  • isNegated

  • getStringToMatch

  • toString

7

 LogicalRestriction

Implement logical restriction (AND/OR) and the negation of this logical restriction.

  • negate

  • getRestrictionType

  • getRestrictionList

  • getLogicalOperator

  • isNegated

  • toString

...