Prev | Next |
SetConfiguration
Inputs
Parameter |
Details |
---|---|
parameters |
A JSON string of parameters. See Details for more information about available parameters. |
Outputs via Callbacks
[Optional] LogMessage - set log messages about the configuration settings received. Be careful not to log sensitive information.
Note: SetError callbacks will be ignored for this method.
Details
This method receives the details that the user inputs into the Pro Cloud Server configuration when enabling this Custom Integration Plug-in.
It includes these details:
External Server to connect to:
- serverName
- serverPort
- serverProtocol
- baseURL - the url folder to be appended to the url
The server settings combine to form a URL as such: <protocol>://<serverName>:<serverPort>/<baseURL>.
Hardcoded Credentials - These are optional and can be used to connect to a provider with a generic account:
- username
- password
Permissions - sets whether users can perform the specified actions on the external provider:
- allowCreateItems
- allowModifyItems
- allowPostDiscussions
Proxy settings:
- proxyServer
- proxyBypass
- proxyUsername
- proxyPassword
Example Implementation
void ExampleIntegrationPlugin::SetConfiguration(const char* parameters)
{
LogMessage(LOG_TRACE, __FUNCTION__);
Json::Value jsonParameters;
if (strlen(parameters))
{
std::stringstream(parameters) >> jsonParameters;
}
// Store the settings as member variables for later use.
m_serverName = jsonParameters["serverName"].asString();
m_serverPort = jsonParameters["serverPort"].asString();
m_serverProtocol = jsonParameters["serverProtocol"].asString();
m_baseURL = jsonParameters["baseURL"].asString();
m_settingsUsername = jsonParameters["username"].asString();
m_settingsPassword = jsonParameters["password"].asString();
m_allowCreateItems = jsonParameters["allowCreateItems"].asString();
m_allowModifyItems = jsonParameters["allowModifyItems"].asString();
m_allowPostDiscussions = jsonParameters["allowPostDiscussions"].asString();
m_proxyServer = jsonParameters["proxyServer"].asString();
m_proxyBypass = jsonParameters["proxyBypass"].asString();
m_proxyUsername = jsonParameters["proxyUsername"].asString();
m_proxyPassword = jsonParameters["proxyPassword"].asString();
}