Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RepresentationConvertingStore<T>

Store that overrides all functions that take or output a Representation, so getRepresentation, addResource, and setRepresentation.

For incoming representations, they will be converted if an incoming converter and preferences have been set. The converted Representation will be passed along.

For outgoing representations, they will be converted if there is an outgoing converter.

Conversions will only happen if required and will not happen if the Representation is already in the correct format.

In the future this class should take the preferences of the request into account. Even if there is a match with the output from the store, if there is a low weight for that type conversions might still be preferred.

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Private Optional Readonly inConverter

Private Optional Readonly inType

inType: string

Protected Readonly logger

logger: Logger = ...

Private Optional Readonly outConverter

Protected Readonly source

source: T

Methods

addResource

Private convertInRepresentation

Private convertRepresentation

deleteResource

getRepresentation

Private matchesPreferences

modifyResource

setRepresentation