Package org.opencms.ui.favorites
Interface I_CmsFavoriteContext
-
- All Known Implementing Classes:
CmsExplorerFavoriteContext
,CmsPageEditorFavoriteContext
public interface I_CmsFavoriteContext
Interface the favorite dialog uses to interact with the rest of the application.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
changeProject(CmsUUID id)
Change the project to one with the given id.void
changeSite(CmsExtendedSiteSelector.SiteSelectorOption option)
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.
-
-
-
Method Detail
-
changeProject
void changeProject(CmsUUID id)
Change the project to one with the given id.- Parameters:
id
- the project id
-
changeSite
void changeSite(CmsExtendedSiteSelector.SiteSelectorOption option)
Changes current site.- Parameters:
option
- the site selector option
-
setDialog
void setDialog(com.vaadin.ui.Component component)
Sets the dialog instance.This must be called by the favorite dialog when it is loaded.
- Parameters:
component
- the favorite dialog
-
close
void close()
Closes the favorite dialog.
-
getFavoriteForCurrentLocation
java.util.Optional<CmsFavoriteEntry> getFavoriteForCurrentLocation()
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.- Returns:
- an optional favorite entry
-
openFavorite
void openFavorite(CmsFavoriteEntry entry)
Opens the favorite location.- Parameters:
entry
- the favorite entry whose location should be opened
-
-