URL fileUrl = new URL(params.getUrl());
File cFile = new File(fileUrl.toURI()).getCanonicalFile();
// security check
URI cURI = cFile.toURI();
logger.info("Checking resolution security on " + cURI);
Authorization authModule = getServer()
.getBean("org.fcrepo.server.security.Authorization", Authorization.class);
if (authModule == null) {
throw new GeneralException(
"Missing required Authorization module");
}
authModule.enforceRetrieveFile(params.getContext(), cURI.toString());
// end security check
String mimeType = params.getMimeType();
// if mimeType was not given, try to determine it automatically
if (mimeType == null || mimeType.equalsIgnoreCase("")){