Package de.xima.fc.gui.elfinder
Class DefaultElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>
- java.lang.Object
-
- de.xima.fc.gui.elfinder.DefaultElFinderFileSystemOptionsProvider<Entry>
-
- Type Parameters:
Entry- Common super type of all file system entries.
- All Implemented Interfaces:
IElFinderFileSystemOptionsProvider<Entry>,Serializable
public class DefaultElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>> extends Object implements IElFinderFileSystemOptionsProvider<Entry>
Implementation ofIElFinderFileSystemOptionsProviderthat provides defaults for all settings. You can override each method to provide custom settings.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultElFinderFileSystemOptionsProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDetectUpdateByTimestamp(String volume, ICommonFileSystemManager<Entry> fileSystemManager)Whether the file system of the given volume supports detecting updates by comparing the timestamp of the file or directory with the last known modification timestamp.booleancanRead(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)Whether the file or directory can be read.booleancanWrite(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)Whether the file or directory can be written to.StringcssClass(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)Gets the optional CSS class for the file or directory.Set<String>disabledCommands(String volume, ICommonFileSystemManager<Entry> fileSystemManager)Gets a list of commands not allowed on the given volume.StringdisplayName(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager, Locale locale)Gets the name of the given entry.StringfilePathSeparator(String volume, ICommonFileSystemManager<Entry> fileSystemManager)Separator for file paths in the file system for a given volume.intjpegQuality(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)Gets the quality of JPEG images when resizing, cropping, or rotating JPEG images.booleanlocalizeDirectoryName(String volume, ICommonFileSystemManager<Entry> fileSystemManager)Whether to localize the directory name in the elFinder UI.booleanlocked(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)Whether the file or directory is locked and cannot be modified.booleanoverwriteExistingFilesOnCopy(String volume, ICommonFileSystemManager<Entry> fileSystemManager)Whether to overwrite files with the same name on the given volume when copying files.booleanoverwriteExistingFilesOnUpload(String volume, ICommonFileSystemManager<Entry> fileSystemManager)Whether to overwrite files with the same name on the given volume when uploading files.
-
-
-
Method Detail
-
canDetectUpdateByTimestamp
public boolean canDetectUpdateByTimestamp(String volume, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderWhether the file system of the given volume supports detecting updates by comparing the timestamp of the file or directory with the last known modification timestamp. Corresponds to thesyncChkAsTssettings from elFinder.- Specified by:
canDetectUpdateByTimestampin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
volume- The volume of the file system.fileSystemManager- The current file system manager.- Returns:
- Whether the file system supports detecting updates by timestamp.
-
canRead
public boolean canRead(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderWhether the file or directory can be read.- Specified by:
canReadin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
entry- The file or directory.fileSystemManager- The current file system manager.- Returns:
- Whether the file or directory can be read.
-
canWrite
public boolean canWrite(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderWhether the file or directory can be written to.- Specified by:
canWritein interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
entry- The file or directory.fileSystemManager- The current file system manager.- Returns:
- Whether the file or directory can be written to.
-
cssClass
public String cssClass(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderGets the optional CSS class for the file or directory. Can be used e.g. to display different icons for different file types.- Specified by:
cssClassin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
entry- The file or directory.fileSystemManager- The current file system manager.- Returns:
- The optional CSS class for the file or directory. Can be null or empty.
-
disabledCommands
public Set<String> disabledCommands(String volume, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderGets a list of commands not allowed on the given volume.- Specified by:
disabledCommandsin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
volume- The volume.fileSystemManager- The current file system manager.- Returns:
- A set of commands not allowed on the given volume.
-
displayName
public String displayName(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager, Locale locale)
Description copied from interface:IElFinderFileSystemOptionsProviderGets the name of the given entry. This can be just the file name, or some localized display name.- Specified by:
displayNamein interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
entry- The file or directory.fileSystemManager- The current file system manager.locale- The locale to use for localization.- Returns:
- The display name of the file or directory.
-
filePathSeparator
public String filePathSeparator(String volume, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderSeparator for file paths in the file system for a given volume. Usually "/" or "\".- Specified by:
filePathSeparatorin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
volume- The volume of the file system.fileSystemManager- The current file system manager.- Returns:
- The file path separator.
-
jpegQuality
public int jpegQuality(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderGets the quality of JPEG images when resizing, cropping, or rotating JPEG images.- Specified by:
jpegQualityin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
entry- The file entry.fileSystemManager- The current file system manager.- Returns:
- The quality of JPEG images, between 0 and 100.
-
localizeDirectoryName
public boolean localizeDirectoryName(String volume, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderWhether to localize the directory name in the elFinder UI. UseselFinderInstance.messages['folder_'+name]in the client-side JavaScript.- Specified by:
localizeDirectoryNamein interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
volume- The volume.fileSystemManager- The current file system manager.- Returns:
- Whether to localize the directory names in that volume.
-
locked
public boolean locked(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderWhether the file or directory is locked and cannot be modified.- Specified by:
lockedin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
entry- The file or directory.fileSystemManager- The current file system manager.- Returns:
- Whether the file or directory is locked.
-
overwriteExistingFilesOnCopy
public boolean overwriteExistingFilesOnCopy(String volume, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderWhether to overwrite files with the same name on the given volume when copying files.- Specified by:
overwriteExistingFilesOnCopyin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
volume- The volume.fileSystemManager- The current file system manager.- Returns:
- Whether to overwrite files with the same name on the given volume when copying files.
-
overwriteExistingFilesOnUpload
public boolean overwriteExistingFilesOnUpload(String volume, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileSystemOptionsProviderWhether to overwrite files with the same name on the given volume when uploading files.- Specified by:
overwriteExistingFilesOnUploadin interfaceIElFinderFileSystemOptionsProvider<Entry extends IFileSystemEntry<?>>- Parameters:
volume- The volume.fileSystemManager- The current file system manager.- Returns:
- Whether to overwrite files with the same name on the given volume when uploading files.
-
-