public class TempFileFactoryImpl extends Object implements TempFileFactory
| Constructor and Description |
|---|
TempFileFactoryImpl(HttpServletVariables httpServletVariables,
AttachmentConfig attachmentConfig) |
| Modifier and Type | Method and Description |
|---|---|
SessionTempFile |
getSessionTempFile(String path)
Returns the SessionTempFile for the file at
path, which must have been previously created using TempFileFactory.makeSessionTempFile(String), or null if not found. |
SessionTempFile |
makeSessionTempFile(String path)
Makes a new SessionTempFile for the file at
path. |
public TempFileFactoryImpl(HttpServletVariables httpServletVariables, AttachmentConfig attachmentConfig)
@Nonnull public SessionTempFile makeSessionTempFile(String path) throws IllegalArgumentException, IllegalStateException
TempFileFactorypath. The lifecycle of the SessionTempFile will become bound
to the HTTP session associated with the current thread, meaning that the file will be deleted when the session is
destroyed.
Note that for security reasons path must point to a file in java.io.tmpdir or in JIRA's temporary
attachments directory.
makeSessionTempFile in interface TempFileFactorypath - a relative (within java.io.tmpdir) or absolute pathIllegalArgumentException - if there is no file at path or if the file is not in a temporary file
directoryIllegalStateException@Nullable public SessionTempFile getSessionTempFile(String path) throws IllegalArgumentException, SessionNotFoundException
TempFileFactorypath, which must have been previously created using TempFileFactory.makeSessionTempFile(String), or null if not found.getSessionTempFile in interface TempFileFactorypath - a relative (within java.io.tmpdir) or absolute pathpathSessionNotFoundException - if there is no current sessionIllegalArgumentExceptionCopyright © 2002-2018 Atlassian. All Rights Reserved.