Package org.opencms.ade.galleries.client
Class CmsVfsTabHandler
- java.lang.Object
-
- org.opencms.ade.galleries.client.A_CmsTabHandler
-
- org.opencms.ade.galleries.client.CmsVfsTabHandler
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
,com.google.gwt.event.shared.EventHandler
public class CmsVfsTabHandler extends A_CmsTabHandler
Handler class for the VFS tree tab.- Since:
- 8.0.0
-
-
Field Summary
-
Fields inherited from class org.opencms.ade.galleries.client.A_CmsTabHandler
m_controller
-
-
Constructor Summary
Constructors Constructor Description CmsVfsTabHandler(CmsGalleryController controller)
Creates a new VFS tab handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearParams()
Clears the search parameters of this tab.java.lang.String
getSelectPath(org.opencms.ade.galleries.shared.CmsVfsEntryBean vfsEntry)
Gets the path which should be set as a value when a VFS entry is selected in the VFS tab.java.util.LinkedHashMap<java.lang.String,java.lang.String>
getSortList()
Gets the sort list for the tab.void
getSubFolders(java.lang.String path, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<org.opencms.ade.galleries.shared.CmsVfsEntryBean>> callback)
Gets the sub-folders of a given folder.boolean
hasSelectResource()
Returns if this tab should offer select resource buttons.void
onChangeTreeState(java.util.Collection<org.opencms.util.CmsUUID> openItemIds)
This method is called when the tree open state is changed.void
onSelectFolder(java.lang.String folder, boolean selected)
This method is called when a folder is selected or deselected in the VFS tab.void
onSelection()
Will be triggered when the tab is selected.void
onSort(java.lang.String sortParams, java.lang.String filter)
Sorts the list, if present.void
removeParam(java.lang.String paramKey)
Removes the search parameter with the given key from the search object.protected void
saveTreeState()
Saves the tree state.protected void
setSiteRoot(java.lang.String siteRoot)
Sets the site root to use for loading/saving tree state.void
setTab(CmsVfsTab tab)
Sets the tab which this handler is bound to.-
Methods inherited from class org.opencms.ade.galleries.client.A_CmsTabHandler
addSearchChangeHandler, getGalleryInfo, getTypeInfo, onClose, onDeselection, selectResource, selectResultTab, setSearchQuery, updateIndex, updateSize
-
-
-
-
Constructor Detail
-
CmsVfsTabHandler
public CmsVfsTabHandler(CmsGalleryController controller)
Creates a new VFS tab handler.- Parameters:
controller
- the gallery controller
-
-
Method Detail
-
clearParams
public void clearParams()
Description copied from class:A_CmsTabHandler
Clears the search parameters of this tab.- Specified by:
clearParams
in classA_CmsTabHandler
- See Also:
A_CmsTabHandler.clearParams()
-
getSelectPath
public java.lang.String getSelectPath(org.opencms.ade.galleries.shared.CmsVfsEntryBean vfsEntry)
Gets the path which should be set as a value when a VFS entry is selected in the VFS tab.- Parameters:
vfsEntry
- the VFS entry which has been selected- Returns:
- the selection path for the given VFS entry
-
getSortList
public java.util.LinkedHashMap<java.lang.String,java.lang.String> getSortList()
Gets the sort list for the tab.- Returns:
- the sort list for the tab
-
getSubFolders
public void getSubFolders(java.lang.String path, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<org.opencms.ade.galleries.shared.CmsVfsEntryBean>> callback)
Gets the sub-folders of a given folder.- Parameters:
path
- the path of the folder whose subfolders should be retrievedcallback
- the callback for processing the subfolders
-
hasSelectResource
public boolean hasSelectResource()
Returns if this tab should offer select resource buttons.- Returns:
true
if this tab should offer select resource buttons
-
onChangeTreeState
public void onChangeTreeState(java.util.Collection<org.opencms.util.CmsUUID> openItemIds)
This method is called when the tree open state is changed.- Parameters:
openItemIds
- the structure ids of open tree items
-
onSelectFolder
public void onSelectFolder(java.lang.String folder, boolean selected)
This method is called when a folder is selected or deselected in the VFS tab.- Parameters:
folder
- the folder which is selected or deselectedselected
- true if the folder has been selected, false if it has been deselected
-
onSelection
public void onSelection()
Description copied from class:A_CmsTabHandler
Will be triggered when the tab is selected.- Specified by:
onSelection
in classA_CmsTabHandler
- See Also:
A_CmsTabHandler.onSelection()
-
onSort
public void onSort(java.lang.String sortParams, java.lang.String filter)
Description copied from class:A_CmsTabHandler
Sorts the list, if present.- Specified by:
onSort
in classA_CmsTabHandler
- Parameters:
sortParams
- the sort parametersfilter
- the filter phrase- See Also:
A_CmsTabHandler.onSort(java.lang.String,java.lang.String)
-
removeParam
public void removeParam(java.lang.String paramKey)
Description copied from class:A_CmsTabHandler
Removes the search parameter with the given key from the search object.- Specified by:
removeParam
in classA_CmsTabHandler
- Parameters:
paramKey
- the parameter key- See Also:
A_CmsTabHandler.removeParam(java.lang.String)
-
setTab
public void setTab(CmsVfsTab tab)
Sets the tab which this handler is bound to.- Parameters:
tab
- the VFS tab
-
saveTreeState
protected void saveTreeState()
Saves the tree state.
-
setSiteRoot
protected void setSiteRoot(java.lang.String siteRoot)
Sets the site root to use for loading/saving tree state.- Parameters:
siteRoot
- the site root to set
-
-