Package de.xima.fc.gui.elfinder
Class FindCommandElFinderUrlCreator<Entry extends IFileSystemEntry<?>>
- java.lang.Object
-
- de.xima.fc.gui.elfinder.FindCommandElFinderUrlCreator<Entry>
-
- Type Parameters:
Entry
- Common super type of all file system entries.
- All Implemented Interfaces:
IElFinderFileUrlCreator<Entry>
,Serializable
public final class FindCommandElFinderUrlCreator<Entry extends IFileSystemEntry<?>> extends Object implements IElFinderFileUrlCreator<Entry>
AIElFinderFileUrlCreator
that creates URLs for the ElFinder connector. Uses thefile
command of the elFinder server side API.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createFileUrl(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)
Creates a URL for the given file.static <Entry extends IFileSystemEntry<?>>
IElFinderFileUrlCreator<Entry>custom(String connectorUrl, IElFinderHashEncoder hashCreator)
Creates a new URL creator for the ElFinder connector.static <Entry extends IFileSystemEntry<?>>
IElFinderFileUrlCreator<Entry>withDefaultHashCodec(String connectorUrl)
Creates a new URL creator for the ElFinder connector.
-
-
-
Method Detail
-
createFileUrl
public String createFileUrl(Entry entry, ICommonFileSystemManager<Entry> fileSystemManager)
Description copied from interface:IElFinderFileUrlCreator
Creates a URL for the given file. A GET request to this URL should return the file content.- Specified by:
createFileUrl
in interfaceIElFinderFileUrlCreator<Entry extends IFileSystemEntry<?>>
- Parameters:
entry
- The file for which to create the URL.fileSystemManager
- The file system manager for the entries.- Returns:
- The URL for the file. null if no URL can be created.
-
custom
public static <Entry extends IFileSystemEntry<?>> IElFinderFileUrlCreator<Entry> custom(String connectorUrl, IElFinderHashEncoder hashCreator)
Creates a new URL creator for the ElFinder connector. Construct URL for requested files by using thefile
command of the elFinder server side API. Uses a custom hash implementation.- Type Parameters:
Entry
- Common super type of all file system entries.- Parameters:
connectorUrl
- Base URL to the elFinder connector.hashCreator
- Function to create the hash for the file.- Returns:
- URL creator.
-
withDefaultHashCodec
public static <Entry extends IFileSystemEntry<?>> IElFinderFileUrlCreator<Entry> withDefaultHashCodec(String connectorUrl)
Creates a new URL creator for the ElFinder connector. Construct URL for requested files by using thefile
command of the elFinder server side API. Uses the default hash implementation as detailed by the elFinder docs.- Type Parameters:
Entry
- Common super type of all file system entries.- Parameters:
connectorUrl
- Base URL to the elFinder connector.- Returns:
- New URL creator using URLs from the elFinder API.
-
-