*/
public void process(HttpServletRequest request,
ResourceDescriptor descritptor) throws ParameterBuilderException {
try {
Parameters params = descritptor.getInputParameters();
if (params.containsName(ParameterNames.SUPPORTED_IMAGES)) {
RulesWithPolicies preservedRule = (RulesWithPolicies) FORMAT_RULES_TABLE
.get(params.getParameterValue(ParameterNames.SOURCE_IMAGE_MIME_TYPE));
if (preservedRule == null) {
LOGGER.warn("content-type-not-supported", params.getParameterValue(ParameterNames.SOURCE_IMAGE_MIME_TYPE));
return;
}
String [] supportedTypes = params.getParameterValue(ParameterNames.SUPPORTED_IMAGES).split(",");
for (int i = 0; i < supportedTypes.length; i++) {
if(preservedRule.getPolicy().startsWith(supportedTypes[i].toLowerCase())) {
((MutableParameters)params).removeParameterValue(ParameterNames.DESTINATION_FORMAT_RULE);
}
}