|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.context.JcmsContext
com.jalios.jcms.context.JcmsJspContext
com.jalios.jcms.handler.JcmsFormHandler
com.jalios.jcms.handler.FileHandler
public class FileHandler
Field Summary | |
---|---|
static String |
REVISION
|
String |
root
Upload directory path |
Fields inherited from class com.jalios.jcms.handler.JcmsFormHandler |
---|
contextMap, editFieldSet, noRedirect, noSendRedirect, popupEdition, redirect, redirectOnClosePopup, workspaceForced |
Fields inherited from class com.jalios.jcms.context.JcmsJspContext |
---|
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, JS_HEADER, jsboMap, jsboSet, jsfoMap, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADER |
Fields inherited from class com.jalios.jcms.context.JcmsContext |
---|
browser, caddy, channel, inFO, initDone, initWorkspace, isAdmin, isAjaxRequest, isDBMember, isDebug, isLogged, loggedMember, request, response, userLang, userLocale, workspace |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Constructor Summary | |
---|---|
FileHandler()
Set the value of channel |
Method Summary | |
---|---|
String |
addFolder()
Add a new folder in the current directory. |
String |
changeSort()
Change the current directory content sorting. |
String |
cutAndPasteItem()
Cut and paste a file or a folder in the current directory. |
String |
deleteItem()
Delete an item which is a file or a directory. |
String |
executeQuery()
Execute a query set by the method setQuery(queryName) . |
File |
getCurrentDir()
Get the current subdirectory. |
String |
getCurrentPath()
Get the current subdirectory path ended with a file separator. |
Vector |
getFiles()
Returns a list of the current directory files, not including the subfolders and sorted by the current sorting attribute and the current sorting order. |
Vector |
getFolders()
Returns a list of the current directory subfolders sorted by the current sorting attribute and the current sorting order. |
String |
getNewItem()
Get the value of newItem |
String |
getQuery()
Get the value of query |
Vector |
getRelativeTree()
Get the upload folder tree. |
String |
getRoot()
Get the value of root |
File |
getSelectedFile()
Get the selected file (or folder). |
String |
getSelectedItem()
Get the value of selectedItem |
boolean |
getSort()
Get the value of sort |
String |
getSortAttr()
Get the value of sortAttr |
String |
getSubdir()
Get the value of subdir . |
String |
pasteItem()
Paste a file or a folder in the current directory. |
String |
renameItem()
Rename the selected file or directory. |
String |
selectItem()
Select a file or a directory in the current directory. |
void |
setNewItem(String ni)
Set the value of newItem . |
void |
setQuery(String query)
Set the value of query |
void |
setSelectedItem(String sel)
Set the value of selectedItem |
void |
setSort(boolean sort)
Set the value of sort |
void |
setSortAttr(String sortAttr)
Set the value of sortAttr |
void |
setSubdir(String sd)
Set the value of subdir . |
String |
update()
Check the subdirectory path validity. |
Methods inherited from class com.jalios.jcms.handler.JcmsFormHandler |
---|
getControllerContext, getEditFieldSet, getMainLangValue, getMainLangValueArray, getMLMap, getMLMapArray, getRedirect, getRedirectOnClosePopup, getWorkspace, isFieldEdition, isFieldMissing, isPartialFieldEdition, isPopupEdition, isWorkspaceForced, processStatus, sendRedirect, sendRedirect, setEditField, setNoRedirect, setNoSendRedirect, setPopupEdition, setRedirect, setRedirectOnClosePopup, setWorkspace, setWs, updateUploadedField, updateUploadedFields |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public String root
Constructor Detail |
---|
public FileHandler()
channel
Method Detail |
---|
public String getSubdir()
subdir
.
subdir
.public void setSubdir(String sd)
subdir
.
sd
- Value to assign to subdir
.public String getSelectedItem()
selectedItem
selectedItem.
setSelectedItem
public void setSelectedItem(String sel)
- Set the value of
selectedItem
- Parameters:
sel
- Value to assign to selectedItem
setNewItem
public void setNewItem(String ni)
- Set the value of
newItem
.
- Parameters:
ni
- Value to assign to newItem
getNewItem
public String getNewItem()
- Get the value of
newItem
- Returns:
- Value of
newItem
.
setQuery
public void setQuery(String query)
- Set the value of
query
- Parameters:
query
- Value to assign to query
getQuery
public String getQuery()
- Get the value of
query
- Returns:
- Value of
query
.
setSort
public void setSort(boolean sort)
- Set the value of
sort
- Parameters:
sort
- Value to assign to sort
getSort
public boolean getSort()
- Get the value of
sort
- Returns:
- Value of
sort
.
setSortAttr
public void setSortAttr(String sortAttr)
- Set the value of
sortAttr
- Parameters:
sortAttr
- Value to assign to sortAttr
getSortAttr
public String getSortAttr()
- Get the value of
sortAttr
- Returns:
- Value of
sortAttr
.
getRoot
public String getRoot()
- Get the value of
root
- Returns:
- Value of
root
getFolders
public Vector getFolders()
- Returns a list of the current directory subfolders sorted by the
current sorting attribute and the current sorting order.
Returns null if the current directory path is invalid.
- Returns:
- Vector of ChannelFile
getFiles
public Vector getFiles()
- Returns a list of the current directory files, not including
the subfolders and sorted by the current sorting attribute and
the current sorting order.
Returns null if the current directory path is invalid.
- Returns:
- Vector of ChannelFile
getRelativeTree
public Vector getRelativeTree()
- Get the upload folder tree. Each element is a subdirectory
path relative to the upload root path ended with no
file separator.
- Returns:
- Vector of subdirectories relative path
getCurrentPath
public String getCurrentPath()
- Get the current subdirectory path ended with a file separator.
- Returns:
- the current subdirectory path
getSelectedFile
public File getSelectedFile()
- Get the selected file (or folder).
- Returns:
- File represented the selected item or null if there isn't any.
getCurrentDir
public File getCurrentDir()
- Get the current subdirectory.
- Returns:
- the current subdirectory
executeQuery
public String executeQuery()
- Execute a query set by the method
setQuery(queryName)
.
An item is a file or a folder.
The queries suported are listed below:
- update : set a subdirectory path
- selectItem : change the current selection
- addFolder : add a new folder in the current subdirectory
- deleteItem : delete the selected item
- pasteItem : add an item in the current subdirectory
- cutAndPasteItem : cut an item and add it in the current subdirectory
- renameItem : rename the selected item
- changeSort : change the sort
- Returns:
- a javascript updating message .
update
public String update()
- Check the subdirectory path validity.
The followingparameter must be set before:
- subdir: the current subdirectory
- Returns:
- a javascript updating message .
selectItem
public String selectItem()
- Select a file or a directory in the current directory.
The following parameters must be set before:
- subdir: the current subdirectory
- selectedItem: the selected file or folder
- Returns:
- an javascript updating message .
addFolder
public String addFolder()
- Add a new folder in the current directory.
The following parameters must be set before:
- subdir: the current subdirectory
- newItem: the new folder name
- Returns:
- a javascript upating message
deleteItem
public String deleteItem()
- Delete an item which is a file or a directory.
If the deleted item is a directory, it is recursive.
The following parameters must be set before:
- subdir: the current subdirectory
- selectedItem: the file or folder name which must be deleted
- Returns:
- a javascript updating message.
pasteItem
public String pasteItem()
- Paste a file or a folder in the current directory.
The following parameters must be set before:
- subdir: the current subdirectory
- newItem: the relative path of the file or folder wich must be pasted
- Returns:
- a javascript updating message
cutAndPasteItem
public String cutAndPasteItem()
- Cut and paste a file or a folder in the current directory.
The following parameters must be set before:
- subdir: the current subdirectory
- newItem: the path of the file or folder wich must be cut and pasted
- Returns:
- a javascript updating message
renameItem
public String renameItem()
- Rename the selected file or directory.
The following parameters must be set before:
- subdir: the current subdirectory
- selectedItem: the file or folder name which must be renamed
- newItem: the new name
- Returns:
- a javascript updating message
changeSort
public String changeSort()
- Change the current directory content sorting.
The followingparameter must be set before:
- subdir: the current subdirectory
- sortAttr: the sort attribute.
- sort: the sort order
- Returns:
- a javascript updating message .
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2001-2010 Jalios SA. All Rights Reserved.