|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi @InjectableComponent public interface TempFileFactory
A SessionTempFile monitor for managing deletion of temporary files.
Method Summary | |
---|---|
SessionTempFile |
getSessionTempFile(String path)
Returns the SessionTempFile for the file at path , which must have been previously created using makeSessionTempFile(String) , or null if not found. |
SessionTempFile |
makeSessionTempFile(String path)
Makes a new SessionTempFile for the file at path . |
Method Detail |
---|
@Nonnull SessionTempFile makeSessionTempFile(String path) throws IllegalArgumentException, SessionNotFoundException
path
. 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.
path
- a relative (within java.io.tmpdir
) or absolute path
IllegalArgumentException
- if there is no file at path
or if the file is not in a temporary file
directory
SessionNotFoundException
- if there is no current session@Nullable SessionTempFile getSessionTempFile(String path) throws SessionNotFoundException
path
, which must have been previously created using makeSessionTempFile(String)
, or null if not found.
path
- a relative (within java.io.tmpdir
) or absolute path
path
SessionNotFoundException
- if there is no current session
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |