Package org.opencms.ui.favorites
Class CmsExplorerFavoriteContext
- java.lang.Object
-
- org.opencms.ui.favorites.CmsExplorerFavoriteContext
-
- All Implemented Interfaces:
I_CmsFavoriteContext
public class CmsExplorerFavoriteContext extends java.lang.Object implements I_CmsFavoriteContext
Context for the favorite dialog opened from the workplace.
-
-
Constructor Summary
Constructors Constructor Description CmsExplorerFavoriteContext(CmsObject cms, CmsFileExplorer explorer)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeProject(CmsUUID value)
Change the project to one with the given id.void
changeSite(CmsExtendedSiteSelector.SiteSelectorOption value)
Changes current site.void
close()
Closes the favorite dialog.java.util.Optional<CmsFavoriteEntry>
getFavoriteForCurrentLocation()
Gets the favorite entry for the current location, as an Optional.void
openFavorite(CmsFavoriteEntry entry)
Opens the favorite location.void
setDialog(com.vaadin.ui.Component component)
Sets the dialog instance.
-
-
-
Constructor Detail
-
CmsExplorerFavoriteContext
public CmsExplorerFavoriteContext(CmsObject cms, CmsFileExplorer explorer)
Creates a new instance.- Parameters:
cms
- the current CMS contextexplorer
- the current file explorer instance
-
-
Method Detail
-
changeProject
public void changeProject(CmsUUID value)
Description copied from interface:I_CmsFavoriteContext
Change the project to one with the given id.- Specified by:
changeProject
in interfaceI_CmsFavoriteContext
- Parameters:
value
- the project id- See Also:
I_CmsFavoriteContext.changeProject(org.opencms.util.CmsUUID)
-
changeSite
public void changeSite(CmsExtendedSiteSelector.SiteSelectorOption value)
Description copied from interface:I_CmsFavoriteContext
Changes current site.- Specified by:
changeSite
in interfaceI_CmsFavoriteContext
- Parameters:
value
- the site selector option- See Also:
I_CmsFavoriteContext.changeSite(org.opencms.ui.components.CmsExtendedSiteSelector.SiteSelectorOption)
-
close
public void close()
Description copied from interface:I_CmsFavoriteContext
Closes the favorite dialog.- Specified by:
close
in interfaceI_CmsFavoriteContext
- See Also:
I_CmsFavoriteContext.close()
-
getFavoriteForCurrentLocation
public java.util.Optional<CmsFavoriteEntry> getFavoriteForCurrentLocation()
Description copied from interface:I_CmsFavoriteContext
Gets the favorite entry for the current location, as an Optional. If the result is empty, the current location can not be used as a favorite.- Specified by:
getFavoriteForCurrentLocation
in interfaceI_CmsFavoriteContext
- Returns:
- an optional favorite entry
- See Also:
I_CmsFavoriteContext.getFavoriteForCurrentLocation()
-
openFavorite
public void openFavorite(CmsFavoriteEntry entry)
Description copied from interface:I_CmsFavoriteContext
Opens the favorite location.- Specified by:
openFavorite
in interfaceI_CmsFavoriteContext
- Parameters:
entry
- the favorite entry whose location should be opened- See Also:
I_CmsFavoriteContext.openFavorite(org.opencms.ui.favorites.CmsFavoriteEntry)
-
setDialog
public void setDialog(com.vaadin.ui.Component component)
Description copied from interface:I_CmsFavoriteContext
Sets the dialog instance.This must be called by the favorite dialog when it is loaded.
- Specified by:
setDialog
in interfaceI_CmsFavoriteContext
- Parameters:
component
- the favorite dialog- See Also:
I_CmsFavoriteContext.setDialog(com.vaadin.ui.Component)
-
-