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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CmsGalleryDialog
getGalleryDialog()
Gets the gallery dialog in which this preview is displayed.org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode
getGalleryMode()
Returns the gallery mode.I_CmsPreviewHandler<T>
getHandler()
Returns the preview handler.java.lang.String
getLocale()
Returns the current locale.A_CmsPreviewDialog<T>
getPreviewDialog()
Returns the preview dialog widget.java.lang.String
getPreviewName()
Returns the preview name, should return the same as inI_CmsPreviewProvider.getPreviewName()
.java.lang.String
getResourcePath()
Returns the resource path of the current resource.java.lang.String
getViewLink()
Returns the site independent perma link.void
loadResourceInfo(java.lang.String resourcePath)
Loads the resource info and displays the retrieved data.void
openPreview(java.lang.String resourcePath, boolean disableSelection)
Opens the preview for the given resource in the given gallery mode.void
removePreview()
Removes the preview widget.void
saveProperties(java.util.Map<java.lang.String,java.lang.String> properties, com.google.gwt.user.client.Command afterSaveCommand)
Saves the changed properties.void
selectResource(java.lang.String resourcePath, org.opencms.util.CmsUUID structureId, java.lang.String title)
Sets the selected resource in the opening editor for the given gallery mode.boolean
setDataInEditor()
Checks if further user input is required and other wise sets the selected resource via the provided integrator functionssetLink
andsetImage
.void
setResource()
Sets the current resource within the editor or xml-content.void
showData(T resourceInfo)
Calls the preview handler to display the given data.
-
-
-
Method Detail
-
getGalleryDialog
CmsGalleryDialog 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
I_CmsPreviewHandler<T> getHandler()
Returns the preview handler.- Returns:
- the preview handler
-
getLocale
java.lang.String getLocale()
Returns the current locale.- Returns:
- the current locale
-
getPreviewDialog
A_CmsPreviewDialog<T> getPreviewDialog()
Returns the preview dialog widget.- Returns:
- the preview dialog widget
-
getPreviewName
java.lang.String getPreviewName()
Returns the preview name, should return the same as inI_CmsPreviewProvider.getPreviewName()
.- Returns:
- the preview name
-
getResourcePath
java.lang.String getResourcePath()
Returns the resource path of the current resource.- Returns:
- the resource path
-
getViewLink
java.lang.String getViewLink()
Returns the site independent perma link.- Returns:
- the site independent link
-
loadResourceInfo
void loadResourceInfo(java.lang.String resourcePath)
Loads the resource info and displays the retrieved data.- Parameters:
resourcePath
- the resource path
-
openPreview
void openPreview(java.lang.String resourcePath, boolean disableSelection)
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(java.util.Map<java.lang.String,java.lang.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
void selectResource(java.lang.String resourcePath, org.opencms.util.CmsUUID structureId, java.lang.String title)
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.
-
-