Qore FtpClientDataProvider Module Reference  1.0
FtpClientDataProvider::FtpClientStatDataProvider Class Reference

The FTP client stat data provider class. More...

Inherits AbstractDataProvider.

Public Member Functions

 constructor (*hash< auto > options)
 Creates the object from constructor options.
 
 constructor (FtpClient ftp)
 Creates the object from an FTP connection.
 
string getName ()
 Returns the data provider name.
 
hash< DataProviderInfo > getStaticInfoImpl ()
 Returns data provider static info.
 

Static Public Member Functions

static hash< auto > doStat (FtpClient ftp, string path, *bool assume_known)
 Performs a "stat"-like action on a remote file.
 
static date getModifiedTime (FtpClient ftp, string path)
 Returns the modified time for a remote file, if possible.
 

Public Attributes

FtpClient ftp
 FTP connection.
 
const ProviderInfo
 Provider info.
 
const ProviderSummaryInfo
 Provider summary info.
 
const RequestType = new FtpClientPathDataType()
 Request type.
 
const ResponseType = new FtpClientStatResponseDataType()
 Response type.
 

Protected Member Functions

auto doRequestImpl (auto req, *hash< auto > request_options)
 Makes a request and returns the response. More...
 
*AbstractDataProviderType getRequestTypeImpl ()
 Returns the description of a successful request message, if any. More...
 
*AbstractDataProviderType getResponseTypeImpl ()
 Returns the description of a response message, if this object represents a response message. More...
 

Detailed Description

The FTP client stat data provider class.

Member Function Documentation

◆ doRequestImpl()

auto FtpClientDataProvider::FtpClientStatDataProvider::doRequestImpl ( auto  req,
*hash< auto >  request_options 
)
protected

Makes a request and returns the response.

Parameters
reqthe request info
request_optionsthe request options; will be processed by validateRequestOptions()
Returns
the response to the request
Exceptions
STAT-ERRORif the path cannot be read

◆ getRequestTypeImpl()

*AbstractDataProviderType FtpClientDataProvider::FtpClientStatDataProvider::getRequestTypeImpl ( )
protected

Returns the description of a successful request message, if any.

Returns
the request type for this provider

◆ getResponseTypeImpl()

*AbstractDataProviderType FtpClientDataProvider::FtpClientStatDataProvider::getResponseTypeImpl ( )
protected

Returns the description of a response message, if this object represents a response message.

Returns
the response type for this response message
="memSeparator" colspan="2">  *hash< string, AbstractDataField > record_type  If the request supports a list of hashes in the response and therefore the record API.
  bool resolve_uri  The URI needs dynamic resolution.
  *RestClient rest  The REST client object for API calls.
  SwaggerSchema schema  The Swagger schema.
  string success_response  The success response code, if any.
  string uri_path  The current URI path.
 

Protected Member Functions

auto doRequestImpl (auto req, *hash< auto > request_options)
 Makes a request and returned the response. More...
 
hash< auto > doRequestIntern (auto req, *hash< auto > options)
 Makes a REST request and returns the response.
 
AbstractDataProviderType getErrorResponseTypeImpl (string error_code)
 Returns the type for the given error code. More...
 
*hash< string, AbstractDataProviderType > getErrorResponseTypesImpl ()
 Returns a hash of error responses, if any.
 
*hash< string, AbstractDataField > getRecordTypeImpl (*hash< auto > search_options)
 Returns the description of the record type, if any. More...
 
*AbstractDataProviderType getRequestTypeImpl ()
 Returns the description of a successful request message, if any.
 
*AbstractDataProviderType getResponseTypeImpl ()
 Returns the description of a successful response message, if any.
 
AbstractDataProviderType getResponseTypeIntern (ResponseObject response, string label)
 Returns a data provider type object for a Swagger response.
 
RestClient getRestClient ()
 Returns a REST client for HTTP operations.
 
hash< DataProviderInfo > getStaticInfoImpl ()
 Returns data provider static info.
 
*ResponseObject getSuccessResponse ()
 Returns the schema for the first successful response message found.
 
string getUriPath ()
 Returns the URI path to use in requests.
 
- Protected Member Functions inherited from SwaggerDataProvider::SwaggerDataProviderBase
AbstractDataField getFieldForHeaders (string name, hash< auto > headers)
 Returns a field of header fields.
 
AbstractDataField getFieldFromSchema (string name, *string desc, SchemaObject schema, bool required=True)
 Returns a field definition from the Swagger parameter.
 
AbstractDataProviderType getSchemaDataType (string path, SchemaObject schema, bool required=True)
 Returns the data type for the given schema.
 
hash< DataProviderInfo > getStaticInfoImpl ()
 Returns data provider static info.
 

Detailed Description

The Swagger data provider class.

Member Function Documentation

◆ doRequestImpl()

auto SwaggerDataProvider::SwaggerRequestDataProvider::doRequestImpl ( auto  req,
*hash< auto >  request_options 
)
protected

Makes a request and returned the response.

Parameters
reqthe request to serialize and make according to the request type
request_optionsthe request options; will be processed by validateRequestOptions()
Returns
the response to the request

◆ getErrorResponseTypeImpl()

AbstractDataProviderType SwaggerDataProvider::SwaggerRequestDataProvider::getErrorResponseTypeImpl ( string  error_code)
protected

Returns the type for the given error code.

Parameters
error_codethe error code for the response; must be a known error code, or an UNKNOWN-ERROR-RESPONSE exception is thrown
Returns
the type for the given error code
Exceptions
UNKNOWN-ERROR-RESPONSEthe error response given is not known

◆ getRecordTypeImpl()

*hash<string, AbstractDataField> SwaggerDataProvider::SwaggerRequestDataProvider::getRecordTypeImpl ( *hash< auto >  search_options)
protected

Returns the description of the record type, if any.

Returns the record type description for any successful response

◆ requestSearchRecordsImpl() [1/2]

private AbstractDataProviderRecordIterator SwaggerDataProvider::SwaggerRequestDataProvider::requestSearchRecordsImpl ( auto  req,
*hash< DataProviderExpression >  where_cond,
*hash< auto >  search_options 
)
inline

Returns an iterator for zero or more records matching the search options.

Parameters
reqthe request to serialize and make according to the request type
where_condthe search criteria
search_optionsthe search options after processing by validateSearchOptions()

This will execute the request and perform a default search on any record(s) returned

Exceptions
SWAGGER-SEARCH-ERRORthe response type is not list or hash and does not support searching

◆ requestSearchRecordsImpl() [2/2]

private AbstractDataProviderRecordIterator SwaggerDataProvider::SwaggerRequestDataProvider::requestSearchRecordsImpl ( auto  req,
*hash< auto >  where_cond,
*hash< auto >  search_options 
)
inline

Returns an iterator for zero or more records matching the search options.

Parameters
reqthe request to serialize and make according to the request type
where_condthe search criteria
search_optionsthe search options after processing by validateSearchOptions()

This will execute the request and perform a default search on any record(s) returned

Exceptions
SWAGGER-SEARCH-ERRORthe response type is not list or hash and does not support searching