org.fcrepo.server.rest
Class DatastreamFilenameHelper
java.lang.Object
org.fcrepo.server.rest.DatastreamFilenameHelper
public class DatastreamFilenameHelper
- extends Object
Helper class to manage getting filenames for datastreams and adding content
disposition headers to force downloading of datastream disseminations
- Version:
- $Id$
- Author:
- Stephen Bayliss
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_datastreamContentDispositionInlineEnabled
protected static String m_datastreamContentDispositionInlineEnabled
m_datastreamFilenameSource
protected static String m_datastreamFilenameSource
m_datastreamExtensionMappingLabel
protected static String m_datastreamExtensionMappingLabel
m_datastreamExtensionMappingId
protected static String m_datastreamExtensionMappingId
m_datastreamExtensionMappingRels
protected static String m_datastreamExtensionMappingRels
m_datastreamExtensionMappingDefault
protected static String m_datastreamExtensionMappingDefault
m_datastreamDefaultFilename
protected static String m_datastreamDefaultFilename
m_datastreamDefaultExtension
protected static String m_datastreamDefaultExtension
FILENAME_REL
protected static String FILENAME_REL
ILLEGAL_FILENAME_REGEX
protected static Pattern ILLEGAL_FILENAME_REGEX
m_apiMService
protected Management m_apiMService
m_apiAService
protected Access m_apiAService
m_extensionMappings
protected static HashMap<String,String> m_extensionMappings
DatastreamFilenameHelper
public DatastreamFilenameHelper(Server fedoraServer,
Management management,
Access access)
- Read configuration information from fedora.fcfg
- Parameters:
fedoraServer - management - access -
addContentDispositionHeader
public final void addContentDispositionHeader(Context context,
String pid,
String dsID,
String download,
Date asOfDateTime,
MIMETypedStream stream)
throws Exception
- Add a content disposition header to a MIMETypedStream based on configuration preferences.
Header by default specifies "inline"; if download=true then "attachment" is specified.
- Parameters:
context - pid - dsID - download - true if file is to be downloadedasOfDateTime - stream -
- Throws:
Exception
Copyright © 2011 DuraSpace. All Rights Reserved.