[ROOT] / doc / toc / ARCAPI / Class / AddController

AllowFilter , APIMethod , ToString


Parses and stores a PropertyStreamLine.
Example: https://yourserver.com/Add/dt/Customer/42/FirstName = John

Sends to ExternalReceiver if given.
Adds to the given DataStorage unless DoNotStoreInternally is specified.

Bulk addition of data:
If HTTP POST is used and the parameter postData is given, then it will be treated as a collection of PropertyStreamLines, to which the original request will be prepended for every line.
Example:
If request is 'Add/Customer/42' and postData is the following two lines
FirstName = John
LastName = Smith
then it will be treated as two separate requests like
Add/Customer/42/FirstName = John
Add/Customer/42/LastName = Smith

TODO: Support use of Query for adding values to multiple entities at once.
TODO: like 'Add/Customer/WHERE FirstName = John/NameEvaluation = NiceName'

Hint: You can test input validation by using the inbuilt classes of ARCDoc.
(assuming that the Apple and Orange classes are included in AllIPDerivedTypes.)
Example queries:
api/Add/Apple/1/Colour = Red // Should succeed
api/Add/Apple/1/Colour = Redd // Should fail
api/Add/Apple/1/Color = Red // Does not fail since Apple class accepts any property (it inherits PRich).
api/Add/Orange/1/Color = Red // Sould fail since Orange accepts only Colour and Name (it inherits PExact<TEnumType>).


AllowFilterDescribes what data is allowed to change through a list of Subscription instances.
APIMethodThe (only) API method that this controller supports.
ToStringTODO: Decide on what we actually want with ToString for this class.

Details

Generated 2024-11-14 04:14:45.338 UTC