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>
A
IElFinderFileUrlCreator that creates URLs for the ElFinder connector. Uses the file command of
the elFinder server side API.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateFileUrl(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 Details
-
createFileUrl
Description copied from interface:IElFinderFileUrlCreatorCreates a URL for the given file. A GET request to this URL should return the file content.- Specified by:
createFileUrlin 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 thefilecommand 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 thefilecommand 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.
-