I would like to use the content of an installation variable in the Camerasystem_Toolbar_Contribution to establish an XML-RPC communication. The installation variable is created on the URCap and should then be available in the toolbar. This already works, and all installation variables are displayed to me in a drop-down menu. I can select them without any issues, and they are adopted. However, as soon as I use them, I have not found a way to access the content of this variable. I only have access to the name of the variable. Is there a solution for this? Maybe a function like getValue()? Unfortunately, I haven’t found anything in the “URCap - API Reference Docs” under VariableModel and DataModel. I hope you can help me with this.
Currently, I have also tried it using an object model of the dataModel class with the get() function, which according to the documentation should give me the value of the variable. Through the following function, I currently fetch the installation variables. Is only the name stored in the collection, or also the type and content of the variables?
public Collection getGlobalVariables() {
return context.getAPIProvider().getApplicationAPI().getVariableModel().get(new Filter() {
@Override
public boolean accept(Variable element) {
return element.getType().equals(Variable.Type.GLOBAL)
|| element.getType().equals(Variable.Type.VALUE_PERSISTED);
}
});
}