final String fileName = (String)attributes.get("file");
final String source = (String)attributes.get("source");
final String url = (String)attributes.get("url");
if (fileName == null && source == null && url == null) {
throw new FrameworkException(422, "Please supply file, url or source parameter.");
}
if (fileName != null && source != null) {
throw new FrameworkException(422, "Please supply only one of file, url or source.");
}
if (fileName != null && url != null) {
throw new FrameworkException(422, "Please supply only one of file, url or source.");
}
if (url != null && source != null) {
throw new FrameworkException(422, "Please supply only one of file, url or source.");
}
try {
if (fileName != null) {