Learning
Documentation
Community
Open Exchange
Global Masters
Home > Class Reference > ENSLIB namespace > %REST.Parameter
Private  Storage   

%REST.Parameter


%REST.Parameter checks and does code generation for parameters. %REST.Parameter also maintains the index of all parameters by route. This class is used internally by InterSystems IRIS. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 17


Summary


Properties
parameterIndex

Methods
%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject CreateParameterIndex GetObjectScriptType GetParameter
GetParametersIn ParameterCodeBody ParameterCodeGen ParameterCodeHeader
ParameterCodePath ParameterCodeQuery ResolveParameterReferences SimpleArrayCode
SimpleBooleanCode SimpleFileCode SimpleIntegerCode SimpleNumberCode
SimpleStringCode SimpleValueCode


Properties


• property parameterIndex as %REST.RESTSpec.ParameterObject [ MultiDimensional ];
The index of all parameters for a route or map. The format is parameterIndex(,,)= and parameterIndex(,,,0)=

Methods


• method CreateParameterIndex(generator As %REST.Generator, route As %REST.RESTSpec.RouteItemObject, id As %String) as %Status
Create an index of the parameters associated with the specified route. Also validity check the parameters.
• classmethod GetObjectScriptType(parameter As %REST.RESTSpec.ParameterObject) as %String
Get the ObjectScript type for a parameter.
• method GetParameter(route As %REST.RESTSpec.RouteItemObject, in As %String, name As %String) as %REST.Parameter
Find the parameter based on the index
• method GetParametersIn(route As %REST.RESTSpec.RouteItemObject, in As %String, isLocal As %Boolean = "") as %List
Get a list of all parameter names of the specified type.
• classmethod ParameterCodeBody(parameter As %REST.RESTSpec.ParameterObject, consumes As %String, argName As %String, indent As %String) as %Status
Generate code to get and validate a parameter value located in the request body.
• classmethod ParameterCodeGen(parameter As %REST.RESTSpec.ParameterObject, consumes As %String, indent As %String) as %Status
Generate code to get and validate a parameter value.
• classmethod ParameterCodeHeader(parameter As %REST.RESTSpec.ParameterObject, assignText As %String, argName As %String, indent As %String) as %Status
Generate code to get and validate a parameter value located in a header.
• classmethod ParameterCodePath(parameter As %REST.RESTSpec.ParameterObject, assignText As %String, argName As %String, indent As %String) as %Status
Generate code to get and validate a parameter value located in the path.
• classmethod ParameterCodeQuery(parameter As %REST.RESTSpec.ParameterObject, assignText As %String, argName As %String, indent As %String) as %Status
Generate code to get and validate a parameter value located in a query parameter.
• method ResolveParameterReferences(generator As %REST.Generator, route As %REST.RESTSpec.RouteItemObject, id As %String) as %Status
If parameter is a reference, then replace it with the referenced parameter. Reference are [:[.]] where reference name is in parameters section.
• classmethod SimpleArrayCode(parameter As %REST.RESTSpec.ParameterObject, valName As %String, indent As %String, Output valText As %String, Output testText As %String) as %Status
Generate code to validate array value.
• classmethod SimpleBooleanCode(parameter As %REST.RESTSpec.ParameterObject, valName As %String, indent As %String, Output valText As %String, Output testText As %String) as %Status
Generate code to validate boolean value.
• classmethod SimpleFileCode(parameter As %REST.RESTSpec.ParameterObject, valName As %String, indent As %String, Output valText As %String, Output testText As %String) as %Status
Generate code to validate file value.
• classmethod SimpleIntegerCode(parameter As %REST.RESTSpec.ParameterObject, valName As %String, indent As %String, Output valText As %String, Output testText As %String) as %Status
Generate code to validate integer value.
• classmethod SimpleNumberCode(parameter As %REST.RESTSpec.ParameterObject, valName As %String, indent As %String, Output valText As %String, Output testText As %String) as %Status
Generate code to validate number value.
• classmethod SimpleStringCode(parameter As %REST.RESTSpec.ParameterObject, valName As %String, indent As %String, Output valText As %String, Output testText As %String) as %Status
Generate code to validate string value.
• classmethod SimpleValueCode(parameter As %REST.RESTSpec.ParameterObject, assignText As %String, valName As %String, indent As %String, name As %String = "") as %Status
Generate and return as a string the code needed to validate a simple input value. If the returned code is "", then an error was detected while generating the code. In the case of invalid input, the generated code will call %ReportRESTError.