Class A_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
java.lang.Object
org.opencms.ade.galleries.client.preview.A_CmsResourcePreview<T>
- Type Parameters:
T
- the resource info bean type
- All Implemented Interfaces:
I_CmsResourcePreview<T>
- Direct Known Subclasses:
CmsBinaryResourcePreview
,CmsImageResourcePreview
public abstract class A_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
extends Object
implements I_CmsResourcePreview<T>
Preview dialog controller.
This class handles the communication between preview dialog and the server.
- Since:
- 8.0.0
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
A_CmsResourcePreview
(CmsGalleryDialog galleryDialog) Constructor. -
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.abstract I_CmsPreviewHandler<T>
Returns the preview handler.Returns the current locale.Returns the resource path of the current resource.protected static org.opencms.ade.galleries.shared.rpc.I_CmsPreviewServiceAsync
Returns the preview service.Returns the site independent perma link.void
Removes the preview widget.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opencms.ade.galleries.client.preview.I_CmsResourcePreview
getPreviewDialog, getPreviewName, loadResourceInfo, openPreview, saveProperties
-
Field Details
-
m_infoBean
The info bean of the binary preview dialog.
-
-
Constructor Details
-
A_CmsResourcePreview
Constructor.- Parameters:
galleryDialog
- the gallery dialog instance
-
-
Method Details
-
getService
Returns the preview service.- Returns:
- the preview service
-
getGalleryDialog
Description copied from interface:I_CmsResourcePreview
Gets the gallery dialog in which this preview is displayed.- Specified by:
getGalleryDialog
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Returns:
- the gallery dialog
- See Also:
-
getGalleryMode
Description copied from interface:I_CmsResourcePreview
Returns the gallery mode.- Specified by:
getGalleryMode
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Returns:
- the gallery mode
- See Also:
-
getHandler
Description copied from interface:I_CmsResourcePreview
Returns the preview handler.- Specified by:
getHandler
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Returns:
- the preview handler
- See Also:
-
getLocale
Description copied from interface:I_CmsResourcePreview
Returns the current locale.- Specified by:
getLocale
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Returns:
- the current locale
- See Also:
-
getResourcePath
Description copied from interface:I_CmsResourcePreview
Returns the resource path of the current resource.- Specified by:
getResourcePath
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Returns:
- the resource path
- See Also:
-
getViewLink
Description copied from interface:I_CmsResourcePreview
Returns the site independent perma link.- Specified by:
getViewLink
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Returns:
- the site independent link
- See Also:
-
removePreview
Description copied from interface:I_CmsResourcePreview
Removes the preview widget.- Specified by:
removePreview
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- See Also:
-
selectResource
Description copied from interface:I_CmsResourcePreview
Sets the selected resource in the opening editor for the given gallery mode.- Specified by:
selectResource
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Parameters:
resourcePath
- the resource pathstructureId
- the structure idtitle
- the resource title- See Also:
-
setDataInEditor
Description copied from interface:I_CmsResourcePreview
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.- Specified by:
setDataInEditor
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Returns:
true
when all data has been set,false
if there were any changes that need saving- See Also:
-
setResource
Sets the current resource within the editor or xml-content.- Specified by:
setResource
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
-
showData
Calls the preview handler to display the given data.- Specified by:
showData
in interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
- Parameters:
resourceInfo
- the resource info data
-