@Component @Scope(value="request") public class FilesResource extends Object
| Constructor and Description |
|---|
FilesResource() |
@PreAuthorize(value="hasPermission(#globalId.concat(\'/\').concat(#schema).concat(\'/\').concat(#version), \'eu.europeana.cloud.common.model.Representation\', write)")
public javax.ws.rs.core.Response sendFile(@Context
javax.ws.rs.core.UriInfo uriInfo,
String globalId,
String schema,
String version,
String mimeType,
InputStream data,
String fileName)
throws eu.europeana.cloud.service.mcs.exception.RepresentationNotExistsException,
eu.europeana.cloud.service.mcs.exception.CannotModifyPersistentRepresentationException,
eu.europeana.cloud.service.mcs.exception.FileAlreadyExistsException
globalId - cloud id of the record (required).schema - schema of representation (required).version - a specific version of the representation(required).mimeType - mime type of filedata - binary stream of file content (required)fileName - name of creating file. If fileName does not provided by POST
request fileName will assigned automatically by service.eu.europeana.cloud.service.mcs.exception.RepresentationNotExistsException - representation does not exist in specified versioneu.europeana.cloud.service.mcs.exception.CannotModifyPersistentRepresentationException - specified representation version is persistent and modifying
its files is not allowed.eu.europeana.cloud.service.mcs.exception.FileAlreadyExistsException - specified file already exist.Copyright © 2013–2015 Europeana Cloud Development Team. All rights reserved.