Qore DataProvider Module Reference  2.7.1
AbstractDataProviderFactory.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace DataProvider {
32 
34 const DPSP_REST = "rest";
35 
38 const DPSP_SOAP = "soap";
40 
42 public struct DataProviderFactoryInfo {
44  string name;
46  string desc;
58  *softlist<string> api_profiles;
60  hash<DataProviderInfo> provider_info;
61 };
62 
65 
66 public:
67 
68 
70  AbstractDataProvider create(*hash<auto> options);
71 
72 
74  AbstractDataProvider createWithTemplate(*hash<auto> template_options, *hash<auto> options);
75 
76 
78  string getName();
79 
80 
82  Class getClass();
83 
84 
86 
89  hash<DataProviderFactoryInfo> getInfo();
90 
91 
93 
98  hash<auto> getInfoAsData(*bool with_type_info);
99 
100 
102 
104  hash<DataProviderInfo> getProviderInfo();
105 
106 
108 
121  AbstractDataProvider getProviderFromExample(data example, *hash<auto> constructor_options);
122 
123 
125 
138  AbstractDataProvider getProviderFromExample(InputStream example, *hash<auto> constructor_options);
139 
140 
142 
152  list<hash<auto>> getExampleProviderRecordOutput(data example, *hash<auto> constructor_options);
153 
154 
156 
166  list<hash<auto>> getExampleProviderRecordOutput(InputStream example, *hash<auto> constructor_options);
167 
168 
170 protected:
171  error(string err, string fmt);
172 public:
173 
174 
176 
192 protected:
193  AbstractDataProvider getProviderFromExampleImpl(InputStream example, *hash<auto> constructor_options);
194 public:
195 
196 
198 
211 protected:
212  list<hash<auto>> getExampleProviderRecordOutputImpl(InputStream example, *hash<auto> constructor_options);
213 public:
214 
215 
217 protected:
218  string getNameImpl();
219 public:
220 
221 
223 
225 protected:
226  abstract hash<DataProviderFactoryInfo> getInfoImpl();
227 public:
228 
230 protected:
231  abstract Class getClassImpl();
232 public:
233 
235 
237 protected:
238  abstract hash<DataProviderInfo> getProviderInfoImpl();
239 public:
240 };
241 };
Data provider factory class.
Definition: AbstractDataProviderFactory.qc.dox.h:64
list< hash< auto > > getExampleProviderRecordOutput(data example, *hash< auto > constructor_options)
Returns information about a data provider constructor given the example data as an argument.
AbstractDataProvider createWithTemplate(*hash< auto > template_options, *hash< auto > options)
Creates an object from the given constructor options.
hash< DataProviderFactoryInfo > getInfo()
Returns static factory information.
list< hash< auto > > getExampleProviderRecordOutput(InputStream example, *hash< auto > constructor_options)
Returns information about a data provider constructor given the example data as an argument.
AbstractDataProvider getProviderFromExample(data example, *hash< auto > constructor_options)
Returns a data provider given the example data and constructor options as arguments.
AbstractDataProvider create(*hash< auto > options)
Creates an object from the given constructor options.
string getNameImpl()
Returns the name of the data provider factory.
abstract Class getClassImpl()
Returns the class for the data provider object.
abstract hash< DataProviderInfo > getProviderInfoImpl()
Returns static provider information.
Class getClass()
Returns the class for the data provider object.
string getName()
Returns the name of the data provider factory.
abstract hash< DataProviderFactoryInfo > getInfoImpl()
Returns static factory information without provider_info.
hash< DataProviderInfo > getProviderInfo()
Returns static provider information.
AbstractDataProvider getProviderFromExampleImpl(InputStream example, *hash< auto > constructor_options)
Returns a data provider given the example data and constructor options as arguments.
AbstractDataProvider getProviderFromExample(InputStream example, *hash< auto > constructor_options)
Returns a data provider given the example data and constructor options as arguments.
list< hash< auto > > getExampleProviderRecordOutputImpl(InputStream example, *hash< auto > constructor_options)
Returns information about a data provider constructor given the example data as an argument.
error(string err, string fmt)
thrown an exception
hash< auto > getInfoAsData(*bool with_type_info)
Returns static provider information as data; no objects are returned.
The AbstractDataProvider class.
Definition: AbstractDataProvider.qc.dox.h:732
const False
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
const DPSP_SOAP
Definition: AbstractDataProviderFactory.qc.dox.h:38
const DPSP_REST
Data provider HTTP server profile.
Definition: AbstractDataProviderFactory.qc.dox.h:34
Data provider factory info.
Definition: AbstractDataProviderFactory.qc.dox.h:42
bool children_can_support_observers
Can any child data providers support the observer pattern / event API?
Definition: AbstractDataProviderFactory.qc.dox.h:54
bool children_can_support_messages
Can any child data providers support messages?
Definition: AbstractDataProviderFactory.qc.dox.h:56
string name
The factory name.
Definition: AbstractDataProviderFactory.qc.dox.h:44
bool children_can_support_records
Can any child data providers offer record-based providers?
Definition: AbstractDataProviderFactory.qc.dox.h:52
*softlist< string > api_profiles
Which server profiles are supported for API management (if any)?
Definition: AbstractDataProviderFactory.qc.dox.h:58
hash< DataProviderInfo > provider_info
Info about providers created from this factory (without the name and children attributes)
Definition: AbstractDataProviderFactory.qc.dox.h:60
bool children_can_support_apis
Can any child data providers offer API services (request - response data providers)?
Definition: AbstractDataProviderFactory.qc.dox.h:50
string desc
The factory description.
Definition: AbstractDataProviderFactory.qc.dox.h:46
bool api_management
Does this factory create a data provider suitable for server-side API management.
Definition: AbstractDataProviderFactory.qc.dox.h:48