Qore SalesforceRestDataProvider Module Reference  1.0.1
SalesforceRestDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
28 class SalesforceRestDataProvider : public AbstractDataProvider {
29 
30 public:
32  SalesforceRestClient rest;
33 
35  const ProviderInfo = <DataProviderInfo>{
36  "type": "SalesforceRestDataProvider",
37  "supports_children": True,
38  "constructor_options": ConstructorOptions,
39  "children_can_support_apis": False,
40  "children_can_support_records": True,
41  "children_can_support_observers": False,
42  };
43 
45  const ConstructorOptions = {
46  "client_id": <DataProviderOptionInfo>{
47  "type": AbstractDataProviderType::get(StringType),
48  "desc": "the Salesforce.com consumer key",
49  "required": False,
50  },
51  "client_secret": <DataProviderOptionInfo>{
52  "type": AbstractDataProviderType::get(StringType),
53  "desc": "the Salesforce.com consumer secret",
54  "required": False,
55  },
56  "username": <DataProviderOptionInfo>{
57  "type": AbstractDataProviderType::get(StringType),
58  "desc": "the Salesforce.com account username",
59  "required": False,
60  },
61  "password": <DataProviderOptionInfo>{
62  "type": AbstractDataProviderType::get(StringType),
63  "desc": "the Salesforce.com account password",
64  "required": False,
65  },
66  "salesforcerestclient": <DataProviderOptionInfo>{
67  "type": AbstractDataProviderType::get(new Type("SalesforceRestClient")),
68  "desc": "the SalesforceRestClient object",
69  },
70  "api": <DataProviderOptionInfo>{
71  "type": AbstractDataProviderType::get(StringType),
72  "desc": "the Salesforce.com API version to use (\"auto\" = latest version available)",
73  },
74  "oauth_url_auth": <DataProviderOptionInfo>{
75  "type": AbstractDataProviderType::get(StringType),
76  "desc": "URL for logging in, overrides the default value",
77  },
78  "oauth_url_token": <DataProviderOptionInfo>{
79  "type": AbstractDataProviderType::get(StringType),
80  "desc": "URL for token acquisition, overrides the default value, used when logging in",
81  },
82  "oauth_url_revoke": <DataProviderOptionInfo>{
83  "type": AbstractDataProviderType::get(StringType),
84  "desc": "URL for token revocation, overrides the default value, used when logging out",
85  },
86  "salesforcerestclient_options": <DataProviderOptionInfo>{
87  "type": AbstractDataProviderType::get(AutoHashType),
88  "desc": "options to the SalesforceRestClient constructor; only used if a SalesforceRestClient object "
89  "is created for a call",
90  },
91  };
92 
94  const EnvOptions = {
95  "client_id": "SALESFORCE_CONSUMER_KEY",
96  "client_secret": "SALESFORCE_CONSUMER_SECRET",
97  "username": "SALESFORCE_USER",
98  "password": "SALESFORCE_PASS",
99  };
100 
102  const HttpMethods = {
103  "GET": True,
104  "PUT": True,
105  "PATCH": True,
106  "POST": True,
107  "DELETE": True,
108  };
109 
111  constructor(SalesforceRestClient rest);
112 
113 
115  constructor(*hash<auto> options);
116 
117 
119  string getName();
120 
121 
123  *string getDesc();
124 
125 
127  *list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
128 
129 
131 
133 protected:
134  *list<string> getChildProviderNamesImpl();
135 public:
136 
137 
139 
143 protected:
144  *AbstractDataProvider getChildProviderImpl(string name);
145 public:
146 
147 
149 protected:
150  hash<DataProviderInfo> getStaticInfoImpl();
151 public:
152 
153 
155 protected:
156  static *hash<auto> getClientOptions(*hash<auto> copts);
157 public:
158 
159 };
160 };
*string getDesc()
Returns the data provider description.
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
constructor(*hash< auto > options)
Creates the object from constructor options.
static *hash< auto > getClientOptions(*hash< auto > copts)
Returns options for the SalesforceRestClient.
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
*list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
SalesforceRestClient rest
The REST client object for API calls.
Definition: SalesforceRestDataProvider.qc.dox.h:32
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
string getName()
Returns the data provider name.
constructor(SalesforceRestClient rest)
Creates the object from the arguments.
const True
const False
Qore SalesforceRestDataProvider module definition.
Definition: SalesforceRestDataProvider.qc.dox.h:26