RestObject

The base of all REST objects, to be used with serveRestObject and serveRestCollectionOf.

version(with_breaking_cgi_features)
class RestObject : WebObject (
CRTP
) {
ValidationResult delegate(typeof(this)) validateFromReflection;
Element delegate(typeof(this)) toHtmlFromReflection;
var delegate(typeof(this)) toJsonFromReflection;
}

Members

Functions

accessCheck
AccessCheck accessCheck(string urlId, Operation operation)

Override this to provide access control to this object.

create
string create(scope void delegate() applyChanges)

Given a populated object, this creates a new entry. Returns the url identifier of the new object.

show
void show()
void show(string urlId)

Prepare the object to be shown.

Meta