Class LinkedFileFormatter
java.lang.Object
net.sf.basedb.clients.web.formatter.LinkedFileFormatter
public class LinkedFileFormatter extends Object implements Formatter<File>
Formatter implementation that generates a HTML output linking
a file item. EDIT, VIEW and DOWNLOAD links are created by default.
- Since:
- 3.17
- Author:
- nicklas
- See Also:
Base.getLinkedFile(String, File, boolean, boolean, boolean, String)
-
Field Summary
Fields Modifier and Type Field Description private boolean
enableEditLink
private boolean
enableViewDownload
private FileViewerUtil
fileViewer
-
Constructor Summary
Constructors Constructor Description LinkedFileFormatter()
LinkedFileFormatter(boolean enableEditLink, boolean enableViewDownload)
LinkedFileFormatter(FileViewerUtil fileViewer)
-
Method Summary
-
Field Details
-
enableEditLink
private final boolean enableEditLink -
enableViewDownload
private final boolean enableViewDownload -
fileViewer
-
-
Constructor Details
-
LinkedFileFormatter
public LinkedFileFormatter() -
LinkedFileFormatter
-
LinkedFileFormatter
public LinkedFileFormatter(boolean enableEditLink, boolean enableViewDownload)
-
-
Method Details
-
format
Description copied from interface:Formatter
Format a value by converting it to a string. -
parseString
Description copied from interface:Formatter
Parse a string and return a value of the correct type. A null input string should (unless otherwise documented by a specific formatter implementation) be allowed and may return null or any other "default" value.- Specified by:
parseString
in interfaceFormatter<File>
- Parameters:
value
- The string to parse- Returns:
- An object
-