}
// TODO later If there's an appropriate plugin, allow it to do pre-processing of the parameters.
// plugin.preProcess(inputParameters, outputParameters, device);
ResourceDescriptor descriptor = descriptorStore.createDescriptor(
request.getResourceType(), inputParameters, outputParameters,
timeToLive);
// TODO later If there's an appropriate plugin, allow it to do post-processing of the parameters.
// plugin.postProcess(outputParameters, device);
MutableParameters callbackParameters = COMMON_FACTORY.createMutableParameters();
Iterator processedParameters = descriptor.getOutputParameters().iterator();
while (processedParameters.hasNext()) {
Parameters.Entry entry = (Parameters.Entry) processedParameters.next();
callbackParameters.setParameterValue(entry.getName(), entry.getValue());
}
String externalId = descriptor.getExternalID();
externalIds.add(externalId);
// base 64 can contain "/"
externalId = externalId.replaceAll("/", "-");
callbackParameters.setParameterValue(
OUTPUT_URL_PARAMETER_NAME, urlPrefix + externalId);