[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[kura-dev] another question
|
I'm creating a ConfigurableService and I would like to put a password into the web UI. I looked at the metatype for the MqttDataTransport...which has a password used to connect to the cloud service...and the acd for that field looks like this:
<AD id="password"
name="password"
type="Password"
cardinality="0"
required="false"
default="password"
description="Password to be used when connecting to the MQTT broker."/>
And the code that handles this configuration looks like this:
Password password = (Password) properties.get("password");
The Password class is: org.eclipse.kura.configuration.Password
Fair enough. But when I put the exact same AD into my metatype, and try to use the property the following line throws an exception:
Password password = (Password) properties.get("password");
The type of the password property is not Password, but rather it's a String and what looks like a uuencoded value for the String...e.g.: 1LnomW8pXWdXQLVTfyMQ1Q==
Obviously there is something I'm doing differently to not get a Password instance via the Kura Config Admin. Any idea what that is?
Thanksinadvance for any thoughts,
Scott