Hyperspace::REST::PropertyResource Class Reference

Convenience RESTful-compliant Resource based on QObject's properties. More...

Inheritance diagram for Hyperspace::REST::PropertyResource:

Protected Member Functions

virtual void keyValuePut (const QByteArray &waveId, const ByteArrayHash &attributes, const QVariantMap &data) Q_DECL_OVERRIDE
 Implement Wave PUT method with a Key/Value pair. More...
 
virtual void keyValuePost (const QByteArray &waveId, const ByteArrayHash &attributes, const QVariantMap &data) Q_DECL_OVERRIDE
 Implement Wave POST method with a Key/Value pair. More...
 
virtual void keyValueGet (const QByteArray &waveId, const ByteArrayHash &attributes, const QVariantMap &data) Q_DECL_OVERRIDE
 Implement Wave GET method with a Key/Value pair. More...
 
- Protected Member Functions inherited from Hyperspace::REST::KeyValueResource
void sendKeyValueRebound (const KeyValueRebound &rebound)
 Sends a rebound with a Key/Value payload. More...
 
virtual void keyValueDelete (const QByteArray &waveId, const ByteArrayHash &attributes, const QVariantMap &data)=0
 Implement Wave DELETE method with a Key/Value pair. More...
 
virtual void get (const QByteArray &waveId, const ByteArrayHash &attributes, const QByteArray &payload) Q_DECL_OVERRIDE Q_DECL_FINAL
 Implement Wave GET method. More...
 
virtual void httpDelete (const QByteArray &waveId, const ByteArrayHash &attributes, const QByteArray &payload) Q_DECL_OVERRIDE Q_DECL_FINAL
 Implement Wave DELETE method. More...
 
virtual void post (const QByteArray &waveId, const ByteArrayHash &attributes, const QByteArray &payload) Q_DECL_OVERRIDE Q_DECL_FINAL
 Implement Wave POST method. More...
 
virtual void put (const QByteArray &waveId, const ByteArrayHash &attributes, const QByteArray &payload) Q_DECL_OVERRIDE Q_DECL_FINAL
 Implement Wave PUT method. More...
 

Additional Inherited Members

- Public Member Functions inherited from Hyperspace::REST::KeyValueResource
 KeyValueResource (const QByteArray &id)
 
- Public Member Functions inherited from Hyperspace::REST::Resource
 Resource (const QByteArray &id)
 
QByteArray id () const
 
virtual bool isValid ()=0
 
virtual void head (const QByteArray &waveId, const ByteArrayHash &attributes, const QByteArray &payload) Q_DECL_OVERRIDE
 Sends back a BadRequest Rebound by default. More...
 
- Protected Slots inherited from Hyperspace::AbstractWaveTarget
void sendRebound (const Hyperspace::Rebound &rebound)
 Send a rebound for a received wave. More...
 

Detailed Description

Convenience RESTful-compliant Resource based on QObject's properties.

PropertyResource implements Wave's methods via its QObject properties. To learn more about the relationship between Hyperspace and QObject, please read Hyperspace and QObject.

See also
Hyperspace::REST::KeyValueResource

Member Function Documentation

void Hyperspace::REST::PropertyResource::keyValuePut ( const QByteArray &  waveId,
const ByteArrayHash &  attributes,
const QVariantMap &  data 
)
protectedvirtual

Implement Wave PUT method with a Key/Value pair.

Reimplement this method to act when a PUT Wave is sent.

waveId The internal waveId. Must be used to construct the Rebound. attributes The wave's attributes. data The payload as a Key/Value map.

Implements Hyperspace::REST::KeyValueResource.

void Hyperspace::REST::PropertyResource::keyValuePost ( const QByteArray &  waveId,
const ByteArrayHash &  attributes,
const QVariantMap &  data 
)
protectedvirtual

Implement Wave POST method with a Key/Value pair.

Reimplement this method to act when a POST Wave is sent.

waveId The internal waveId. Must be used to construct the Rebound. attributes The wave's attributes. data The payload as a Key/Value map.

Implements Hyperspace::REST::KeyValueResource.

void Hyperspace::REST::PropertyResource::keyValueGet ( const QByteArray &  waveId,
const ByteArrayHash &  attributes,
const QVariantMap &  data 
)
protectedvirtual

Implement Wave GET method with a Key/Value pair.

Reimplement this method to act when a GET Wave is sent.

waveId The internal waveId. Must be used to construct the Rebound. attributes The wave's attributes. data The payload as a Key/Value map.

Implements Hyperspace::REST::KeyValueResource.