ControlResults results;
results = serverPluginManager.invokeServerPluginControl(getSessionSubject(), serverPluginKey, controlName,
params);
// ControlDefinition is a server-side only class - we need to convert it to our domain DTO
ServerPluginControlResults spcr = new ServerPluginControlResults();
for (Property prop : results.getComplexResults().getProperties()) {
spcr.getComplexResults().put(prop.deepCopy(true));
}
if (!results.isSuccess()) {
spcr.setError(results.getError());
}
return spcr;
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}