IRISLIB database
Impl Class Reference

Abstract superclass for REST implementation classes generated from OpenAPI specifications. More...

Inheritance diagram for Impl:
Collaboration diagram for Impl:

Static Public Attributes

 ExposeServerExceptions = None
 If ExposeServerExceptions is overridden as true, then details of internal errors will be exposed.
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Static Private Member Functions

_.Library.Boolean CheckAccepts (_.Library.String produces)
 Check that the ACCEPT request header is included in the produces list.
 
 DeleteHeader (_.Library.String name)
 Remove a header from the response. More...
 
 GetContentType ()
 Get the content-type header of the request.
 
_.Library.String GetHeader (_.Library.String name)
 Return the value of the <PARAMETER>name</PARAMETER> request header. More...
 
 LogError (_.Library.String methodName, _.Library.String error, _.Library.String data)
 Log an API Management error.
 
 ReportRESTError (_.Library.String statusCode, _.Library.Status sc, _.Library.Boolean exposeServerExceptions)
 Report an error when processing a request. More...
 
 SetContentType (_.Library.String contentType)
 Set the content-type header of the response.
 
 SetHeader (_.Library.String name, _.Library.String value)
 Sets a custom HTTP header into the reply. More...
 
_.Library.Boolean SetHeaderIfEmpty (_.Library.String name, _.Library.String value)
 Helper method that sets a header if it is currently empty, if it already has a value it does nothing. More...
 
 SetStatusCode (_.Library.String statusCode)
 The HTTP Status code to be sent back in the response. More...
 
 WriteResponse (response)
 WriteResponse is used by the dispatch class to write the response to this request.
 

Additional Inherited Members

- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Detailed Description

Abstract superclass for REST implementation classes generated from OpenAPI specifications.

Member Function Documentation

◆ DeleteHeader()

DeleteHeader ( _.Library.String  name)
staticprivate

Remove a header from the response.

Note that name is not case sensitive

◆ GetHeader()

_.Library.String GetHeader ( _.Library.String  name)
staticprivate

Return the value of the <PARAMETER>name</PARAMETER> request header.

Note that name is not case sensitive

◆ ReportRESTError()

ReportRESTError ( _.Library.String  statusCode,
_.Library.Status  sc,
_.Library.Boolean  exposeServerExceptions 
)
staticprivate

Report an error when processing a request.

The implementation class may contain an override of ReportRESTError in order to format the error response as required by the REST application. The override should use the WriteResponse method to return the error response.

◆ SetHeader()

SetHeader ( _.Library.String  name,
_.Library.String  value 
)
staticprivate

Sets a custom HTTP header into the reply.

If you set the same header twice it will append the information to the first with a ',' between them. Note that name is not case sensitive, however we will remember the case of the header when sending this to the client.

◆ SetHeaderIfEmpty()

_.Library.Boolean SetHeaderIfEmpty ( _.Library.String  name,
_.Library.String  value 
)
staticprivate

Helper method that sets a header if it is currently empty, if it already has a value it does nothing.

Returns true if the header was set and false if it did nothing.

◆ SetStatusCode()

SetStatusCode ( _.Library.String  statusCode)
staticprivate

The HTTP Status code to be sent back in the response.

The HTTP status codes are defined

in RFC 2068.

http://www.faqs.org/rfcs/rfc2068.html