Package org.opencms.ui.apps.logfile
Class CmsDefaultLogDownloadProvider
- java.lang.Object
-
- org.opencms.ui.apps.logfile.CmsDefaultLogDownloadProvider
-
- All Implemented Interfaces:
I_CmsLogDownloadProvider
public class CmsDefaultLogDownloadProvider extends java.lang.Object implements I_CmsLogDownloadProvider
Default implementation for the log download functionality.
-
-
Constructor Summary
Constructors Constructor Description CmsDefaultLogDownloadProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDownloadAllLogs()
Checks if the user can download a zip with all logs.java.lang.String
getDownloadPrefix()
Gets the prefix to use for the download file name.java.util.Set<java.lang.String>
getLogFiles()
Gets the set of log file paths.java.io.InputStream
readAllLogs()
Gets the input stream for the download with all logs (only works if canDownloadAllLogs() returned true)java.io.InputStream
readLog(java.lang.String path)
Gets the input stream for the download of a single log file
-
-
-
Constructor Detail
-
CmsDefaultLogDownloadProvider
public CmsDefaultLogDownloadProvider()
-
-
Method Detail
-
canDownloadAllLogs
public boolean canDownloadAllLogs()
Description copied from interface:I_CmsLogDownloadProvider
Checks if the user can download a zip with all logs.- Specified by:
canDownloadAllLogs
in interfaceI_CmsLogDownloadProvider
- Returns:
- true if the user can download a zip with all logs
- See Also:
I_CmsLogDownloadProvider.canDownloadAllLogs()
-
getDownloadPrefix
public java.lang.String getDownloadPrefix()
Description copied from interface:I_CmsLogDownloadProvider
Gets the prefix to use for the download file name.- Specified by:
getDownloadPrefix
in interfaceI_CmsLogDownloadProvider
- Returns:
- the prefix for the download
- See Also:
I_CmsLogDownloadProvider.getDownloadPrefix()
-
getLogFiles
public java.util.Set<java.lang.String> getLogFiles()
Description copied from interface:I_CmsLogDownloadProvider
Gets the set of log file paths.- Specified by:
getLogFiles
in interfaceI_CmsLogDownloadProvider
- Returns:
- the set of log file paths
- See Also:
I_CmsLogDownloadProvider.getLogFiles()
-
readAllLogs
public java.io.InputStream readAllLogs()
Description copied from interface:I_CmsLogDownloadProvider
Gets the input stream for the download with all logs (only works if canDownloadAllLogs() returned true)- Specified by:
readAllLogs
in interfaceI_CmsLogDownloadProvider
- Returns:
- the input stream for the collected logs zip file
- See Also:
I_CmsLogDownloadProvider.readAllLogs()
-
readLog
public java.io.InputStream readLog(java.lang.String path)
Description copied from interface:I_CmsLogDownloadProvider
Gets the input stream for the download of a single log file- Specified by:
readLog
in interfaceI_CmsLogDownloadProvider
- Parameters:
path
- the full path of the log file (must be a value in the set returned by getLogFiles())- Returns:
- the input stream for the download
- See Also:
I_CmsLogDownloadProvider.readLog(java.lang.String)
-
-