public class TempFilesManager extends Object implements Destructible
Constructor and Description |
---|
TempFilesManager(info.magnolia.cms.core.FileSystemHelper fileSystemHelper) |
Modifier and Type | Method and Description |
---|---|
File |
createTempFile(String filename) |
void |
destroy()
Perform arbitrary clean-up logic upon component destruction
by the framework.
|
void |
register(File tempFile) |
String |
toStandardFileName(String tempFileName) |
@Inject public TempFilesManager(info.magnolia.cms.core.FileSystemHelper fileSystemHelper)
public File createTempFile(String filename) throws IOException
IOException
public void register(File tempFile)
public void destroy()
Destructible
Note that Destructible.destroy()
method may be called outside of UI thread, e.g.
when the whole instance of admincentral gets disposed as result of heartbeat
checks. This means that neither Magnolia, nor Vaadin thread locals will be reliably
present upon that method invocation.
destroy
in interface Destructible
Copyright © 2020 Magnolia International Ltd.. All rights reserved.