net.jot.web.views
Class JOTGenericFileBrowserView
java.lang.Object
net.jot.web.ctrl.JOTController
net.jot.web.view.JOTView
net.jot.web.views.JOTGenericFileBrowserView
public class JOTGenericFileBrowserView
- extends JOTView
This is the generic/default implementation of a fileManager view.
This use is the builtin default template.
Use as-is and/or extend/copy to create your own view/template.
- Author:
- thibautc
|
Method Summary |
java.lang.String |
getFileCssClass(java.io.File f)
return the CSS classs name for a specific file. |
java.lang.String |
getFileSize(java.io.File f)
return s a nice looking file size |
java.lang.String |
getTimeStamp(java.io.File f)
returns a nice looking file timestamp |
void |
prepareViewData()
To be implemented by subclass
Loads the View data by calling add* etc ... |
boolean |
validatePermissions()
Implements this to check wether the user is allowed to use your controller. |
| Methods inherited from class net.jot.web.view.JOTView |
addBlock, addForm, addTag, addVariable, getBlocks, getBuiltinTemplate, getForms, getTags, getVariables, isProvideRequestParameters, process, setBuiltinTemplate, setProvideRequestParameters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TSTAMP_FORMAT
public static final java.text.DateFormat DEFAULT_TSTAMP_FORMAT
DEFAULT_NUMBER_FORMATTER
public static final java.text.NumberFormat DEFAULT_NUMBER_FORMATTER
ONEKB
public static final long ONEKB
- See Also:
- Constant Field Values
ONEMB
public static final long ONEMB
- See Also:
- Constant Field Values
ONEGB
public static final long ONEGB
- See Also:
- Constant Field Values
JOTGenericFileBrowserView
public JOTGenericFileBrowserView()
prepareViewData
public void prepareViewData()
throws java.lang.Exception
- Description copied from class:
JOTView
- To be implemented by subclass
Loads the View data by calling add* etc ...
- Specified by:
prepareViewData in class JOTView
- Throws:
java.lang.Exception
validatePermissions
public boolean validatePermissions()
- Description copied from class:
JOTController
- Implements this to check wether the user is allowed to use your controller.
This is the simplest way to secure the application.
If this returns false, the controller won't be ran and a "RESULT_FORBIDDEN" will be sent.
The user can then be sent to a 'forbidden' page.
- Specified by:
validatePermissions in class JOTController
- Returns:
getFileCssClass
public java.lang.String getFileCssClass(java.io.File f)
- return the CSS classs name for a specific file. allows to display different file types in different ways
getTimeStamp
public java.lang.String getTimeStamp(java.io.File f)
- returns a nice looking file timestamp
getFileSize
public java.lang.String getFileSize(java.io.File f)
- return s a nice looking file size