Package org.opencms.ade.galleries.client
Class CmsGalleryControllerHandler
- java.lang.Object
-
- org.opencms.ade.galleries.client.CmsGalleryControllerHandler
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.ade.galleries.shared.CmsGallerySearchBean>
,com.google.gwt.event.shared.EventHandler
public class CmsGalleryControllerHandler extends java.lang.Object implements com.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.ade.galleries.shared.CmsGallerySearchBean>
Gallery dialog controller handler.Delegates the actions of the gallery controller to the gallery dialog.
- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsGalleryDialog
m_galleryDialog
The reference to the gallery dialog.
-
Constructor Summary
Constructors Constructor Description CmsGalleryControllerHandler(CmsGalleryDialog galleryDialog)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasResultsTab()
Returns true if a results tab exists.void
hideShowPreviewButton(boolean hide)
Hides or shows the show-preview-button.void
onCategoriesTabSelection()
Will be triggered when the categories tab is selected.void
onClearCategories(java.util.List<java.lang.String> categories)
Deletes the html content of the categories parameter and removes the style.void
onClearFolders(java.util.Collection<java.lang.String> folders)
The method which is executed when all folders are cleared from the search object.void
onClearFullTextSearch()
clears the search tab input.void
onClearGalleries(java.util.List<java.lang.String> galleries)
Deletes the html content of the galleries parameter and removes the style.void
onClearTypes(java.util.List<java.lang.String> types)
Deletes the html content of the types parameter and removes the style.void
onGalleriesTabSelection()
Will be triggered when the galleries tab is selected.void
onInitialSearch(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj, org.opencms.ade.galleries.shared.CmsGalleryDataBean dialogBean, CmsGalleryController controller, boolean isFirstTime)
Will be triggered when the initial search is performed.void
onReceiveSitemapPreloadData(org.opencms.ade.galleries.shared.CmsSitemapEntryBean sitemapPreloadData)
This method is called when preloaded sitemap tree state data is loaded.void
onReceiveVfsPreloadData(org.opencms.ade.galleries.shared.CmsVfsEntryBean vfsPreloadData, java.util.Set<java.lang.String> folders)
This method is called when preloaded VFS tree state data is loaded.void
onRemoveQuery()
Called when the query is removed.void
onRemoveScope()
Called when the search scope is removed.void
onRemoveSearchParam(CmsSearchTab.ParamType type)
Removes a parameter from the search tab.void
onResultTabSelection(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj)
Will be triggered when the results tab is selected.void
onTypesTabSelection()
Will be triggered when the types tab is selected.void
onUpdateCategoriesList(java.util.List<org.opencms.gwt.shared.CmsCategoryBean> categoriesList, java.util.List<java.lang.String> selectedCategories)
Will be triggered when categories list is sorted.void
onUpdateCategoriesTree(java.util.List<org.opencms.gwt.shared.CmsCategoryTreeEntry> categoryTreeEntry, java.util.List<java.lang.String> selectedCategories)
Will be triggered when the tree is selected.void
onUpdateGalleries(java.util.List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleries, java.util.List<java.lang.String> selectedGalleries)
Will be triggered when the sort parameters of the galleries list are changed.void
onUpdateGalleryTree(java.util.List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> galleryTreeEntries, java.util.List<java.lang.String> selectedGalleries)
Updates the gallery tree.void
onUpdateTypes(java.util.List<org.opencms.ade.galleries.shared.CmsResourceTypeBean> types, java.util.List<java.lang.String> selectedTypes)
Will be triggered when the sort parameters of the types list are changed.void
onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent<org.opencms.ade.galleries.shared.CmsGallerySearchBean> event)
void
selectResultTab()
Selects the result tab.void
setCategoriesTabContent(java.util.List<org.opencms.gwt.shared.CmsCategoryTreeEntry> categoryRoot, java.util.List<java.lang.String> selected)
Sets the list content of the category tab.void
setGalleriesTabContent(java.util.List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleryInfos, java.util.List<java.lang.String> selectedGalleries)
Sets the list content of the galleries tab.void
setTypesTabContent(java.util.List<org.opencms.ade.galleries.shared.CmsResourceTypeBean> typeInfos, java.util.List<java.lang.String> selectedTypes)
Sets the list content of the types tab.void
showFirstTab()
Shows the first available tab.void
updateGalleryData(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj, org.opencms.ade.galleries.shared.CmsGalleryDataBean dialogBean, CmsGalleryController controller)
Updates the gallery data.
-
-
-
Field Detail
-
m_galleryDialog
protected CmsGalleryDialog m_galleryDialog
The reference to the gallery dialog.
-
-
Constructor Detail
-
CmsGalleryControllerHandler
public CmsGalleryControllerHandler(CmsGalleryDialog galleryDialog)
Constructor.- Parameters:
galleryDialog
- the reference to the gallery dialog
-
-
Method Detail
-
hasResultsTab
public boolean hasResultsTab()
Returns true if a results tab exists.- Returns:
- true if a results tab exists
-
hideShowPreviewButton
public void hideShowPreviewButton(boolean hide)
Hides or shows the show-preview-button.- Parameters:
hide
-true
to hide the button
-
onCategoriesTabSelection
public void onCategoriesTabSelection()
Will be triggered when the categories tab is selected.
-
onClearCategories
public void onClearCategories(java.util.List<java.lang.String> categories)
Deletes the html content of the categories parameter and removes the style.- Parameters:
categories
- the categories to remove from selection
-
onClearFolders
public void onClearFolders(java.util.Collection<java.lang.String> folders)
The method which is executed when all folders are cleared from the search object.- Parameters:
folders
- the folders which have been cleared
-
onClearFullTextSearch
public void onClearFullTextSearch()
clears the search tab input.
-
onClearGalleries
public void onClearGalleries(java.util.List<java.lang.String> galleries)
Deletes the html content of the galleries parameter and removes the style.- Parameters:
galleries
- the galleries to remove from selection
-
onClearTypes
public void onClearTypes(java.util.List<java.lang.String> types)
Deletes the html content of the types parameter and removes the style.- Parameters:
types
- the types to be removed from selection
-
onGalleriesTabSelection
public void onGalleriesTabSelection()
Will be triggered when the galleries tab is selected.
-
onInitialSearch
public void onInitialSearch(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj, org.opencms.ade.galleries.shared.CmsGalleryDataBean dialogBean, CmsGalleryController controller, boolean isFirstTime)
Will be triggered when the initial search is performed.- Parameters:
searchObj
- the current search objectdialogBean
- the current dialog data beancontroller
- the dialog controllerisFirstTime
- true if this method is called the first time for the gallery dialog instance
-
onReceiveSitemapPreloadData
public void onReceiveSitemapPreloadData(org.opencms.ade.galleries.shared.CmsSitemapEntryBean sitemapPreloadData)
This method is called when preloaded sitemap tree state data is loaded.- Parameters:
sitemapPreloadData
- the sitemap preload data
-
onReceiveVfsPreloadData
public void onReceiveVfsPreloadData(org.opencms.ade.galleries.shared.CmsVfsEntryBean vfsPreloadData, java.util.Set<java.lang.String> folders)
This method is called when preloaded VFS tree state data is loaded.- Parameters:
vfsPreloadData
- the preload datafolders
- the set of selected folders
-
onRemoveQuery
public void onRemoveQuery()
Called when the query is removed.
-
onRemoveScope
public void onRemoveScope()
Called when the search scope is removed.
-
onRemoveSearchParam
public void onRemoveSearchParam(CmsSearchTab.ParamType type)
Removes a parameter from the search tab.- Parameters:
type
- the parameter type
-
onResultTabSelection
public void onResultTabSelection(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj)
Will be triggered when the results tab is selected.- Parameters:
searchObj
- the current search object
-
onTypesTabSelection
public void onTypesTabSelection()
Will be triggered when the types tab is selected.
-
onUpdateCategoriesList
public void onUpdateCategoriesList(java.util.List<org.opencms.gwt.shared.CmsCategoryBean> categoriesList, java.util.List<java.lang.String> selectedCategories)
Will be triggered when categories list is sorted.- Parameters:
categoriesList
- the updated categories listselectedCategories
- the selected categories
-
onUpdateCategoriesTree
public void onUpdateCategoriesTree(java.util.List<org.opencms.gwt.shared.CmsCategoryTreeEntry> categoryTreeEntry, java.util.List<java.lang.String> selectedCategories)
Will be triggered when the tree is selected.- Parameters:
categoryTreeEntry
- the category root entryselectedCategories
- the selected categories
-
onUpdateGalleries
public void onUpdateGalleries(java.util.List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleries, java.util.List<java.lang.String> selectedGalleries)
Will be triggered when the sort parameters of the galleries list are changed.- Parameters:
galleries
- the updated galleries listselectedGalleries
- the list of galleries to select
-
onUpdateGalleryTree
public void onUpdateGalleryTree(java.util.List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> galleryTreeEntries, java.util.List<java.lang.String> selectedGalleries)
Updates the gallery tree.- Parameters:
galleryTreeEntries
- the gallery tree entriesselectedGalleries
- the selected galleries
-
onUpdateTypes
public void onUpdateTypes(java.util.List<org.opencms.ade.galleries.shared.CmsResourceTypeBean> types, java.util.List<java.lang.String> selectedTypes)
Will be triggered when the sort parameters of the types list are changed.- Parameters:
types
- the updated types listselectedTypes
- the list of types to select
-
onValueChange
public void onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent<org.opencms.ade.galleries.shared.CmsGallerySearchBean> event)
- Specified by:
onValueChange
in interfacecom.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.ade.galleries.shared.CmsGallerySearchBean>
- See Also:
ValueChangeHandler.onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)
-
selectResultTab
public void selectResultTab()
Selects the result tab.
-
setCategoriesTabContent
public void setCategoriesTabContent(java.util.List<org.opencms.gwt.shared.CmsCategoryTreeEntry> categoryRoot, java.util.List<java.lang.String> selected)
Sets the list content of the category tab.- Parameters:
categoryRoot
- the root category tree entryselected
- the selected categories
-
setGalleriesTabContent
public void setGalleriesTabContent(java.util.List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleryInfos, java.util.List<java.lang.String> selectedGalleries)
Sets the list content of the galleries tab.- Parameters:
galleryInfos
- the gallery info beansselectedGalleries
- the selected galleries
-
setTypesTabContent
public void setTypesTabContent(java.util.List<org.opencms.ade.galleries.shared.CmsResourceTypeBean> typeInfos, java.util.List<java.lang.String> selectedTypes)
Sets the list content of the types tab.- Parameters:
typeInfos
- the type info beansselectedTypes
- the selected types
-
showFirstTab
public void showFirstTab()
Shows the first available tab.
-
updateGalleryData
public void updateGalleryData(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj, org.opencms.ade.galleries.shared.CmsGalleryDataBean dialogBean, CmsGalleryController controller)
Updates the gallery data.- Parameters:
searchObj
- the current search objectdialogBean
- the gallery datacontroller
- he gallery controller
-
-