Interface I_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Type Parameters:
T
- the resource info bean type
- All Known Implementing Classes:
A_CmsResourcePreview
,CmsBinaryResourcePreview
,CmsImageResourcePreview
public interface I_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
Interface for resource preview within the galleries dialog.
- Since:
- 8.0.0
-
Method Summary
Modifier and TypeMethodDescriptionGets the gallery dialog in which this preview is displayed.org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode
Returns the gallery mode.Returns the preview handler.Returns the current locale.Returns the preview dialog widget.Returns the preview name, should return the same as inI_CmsPreviewProvider.getPreviewName()
.Returns the resource path of the current resource.Returns the site independent perma link.void
loadResourceInfo
(String resourcePath) Loads the resource info and displays the retrieved data.void
openPreview
(String resourcePath, boolean disableSelection) Opens the preview for the given resource in the given gallery mode.void
Removes the preview widget.void
saveProperties
(Map<String, String> properties, com.google.gwt.user.client.Command afterSaveCommand) Saves the changed properties.void
selectResource
(String resourcePath, org.opencms.util.CmsUUID structureId, String title) Sets the selected resource in the opening editor for the given gallery mode.boolean
Checks if further user input is required and other wise sets the selected resource via the provided integrator functionssetLink
andsetImage
.void
Sets the current resource within the editor or xml-content.void
Calls the preview handler to display the given data.
-
Method Details
-
getGalleryDialog
Gets the gallery dialog in which this preview is displayed.- Returns:
- the gallery dialog
-
getGalleryMode
org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode getGalleryMode()Returns the gallery mode.- Returns:
- the gallery mode
-
getHandler
Returns the preview handler.- Returns:
- the preview handler
-
getLocale
Returns the current locale.- Returns:
- the current locale
-
getPreviewDialog
Returns the preview dialog widget.- Returns:
- the preview dialog widget
-
getPreviewName
Returns the preview name, should return the same as inI_CmsPreviewProvider.getPreviewName()
.- Returns:
- the preview name
-
getResourcePath
Returns the resource path of the current resource.- Returns:
- the resource path
-
getViewLink
Returns the site independent perma link.- Returns:
- the site independent link
-
loadResourceInfo
Loads the resource info and displays the retrieved data.- Parameters:
resourcePath
- the resource path
-
openPreview
Opens the preview for the given resource in the given gallery mode.- Parameters:
resourcePath
- the resource pathdisableSelection
- if the selection from the preview should be disabled
-
removePreview
void removePreview()Removes the preview widget. -
saveProperties
void saveProperties(Map<String, String> properties, com.google.gwt.user.client.Command afterSaveCommand) Saves the changed properties.- Parameters:
properties
- the changed propertiesafterSaveCommand
- the command to execute after saving the properties
-
selectResource
Sets the selected resource in the opening editor for the given gallery mode.- Parameters:
resourcePath
- the resource pathstructureId
- the structure idtitle
- the resource title
-
setDataInEditor
boolean setDataInEditor()Checks if further user input is required and other wise sets the selected resource via the provided integrator functionssetLink
andsetImage
.Returning
true
when all data has been. If there are any changes, the user will be requested to save those and the editor OK function will be called again.- Returns:
true
when all data has been set,false
if there were any changes that need saving
-
setResource
void setResource()Sets the current resource within the editor or xml-content. -
showData
Calls the preview handler to display the given data.- Parameters:
resourceInfo
- the resource info data
-