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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedA_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.GalleryModeReturns 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_CmsPreviewServiceAsyncReturns the preview service.Returns the site independent perma link.voidRemoves the preview widget.voidselectResource(String resourcePath, org.opencms.util.CmsUUID structureId, String title) Sets the selected resource in the opening editor for the given gallery mode.booleanChecks if further user input is required and other wise sets the selected resource via the provided integrator functionssetLinkandsetImage.voidSets the current resource within the editor or xml-content.voidCalls 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, waitMethods 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_CmsResourcePreviewGets the gallery dialog in which this preview is displayed.- Specified by:
getGalleryDialogin interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Returns:
- the gallery dialog
- See Also:
-
getGalleryMode
Description copied from interface:I_CmsResourcePreviewReturns the gallery mode.- Specified by:
getGalleryModein interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Returns:
- the gallery mode
- See Also:
-
getHandler
Description copied from interface:I_CmsResourcePreviewReturns the preview handler.- Specified by:
getHandlerin interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Returns:
- the preview handler
- See Also:
-
getLocale
Description copied from interface:I_CmsResourcePreviewReturns the current locale.- Specified by:
getLocalein interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Returns:
- the current locale
- See Also:
-
getResourcePath
Description copied from interface:I_CmsResourcePreviewReturns the resource path of the current resource.- Specified by:
getResourcePathin interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Returns:
- the resource path
- See Also:
-
getViewLink
Description copied from interface:I_CmsResourcePreviewReturns the site independent perma link.- Specified by:
getViewLinkin interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Returns:
- the site independent link
- See Also:
-
removePreview
Description copied from interface:I_CmsResourcePreviewRemoves the preview widget.- Specified by:
removePreviewin interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- See Also:
-
selectResource
Description copied from interface:I_CmsResourcePreviewSets the selected resource in the opening editor for the given gallery mode.- Specified by:
selectResourcein 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_CmsResourcePreviewChecks if further user input is required and other wise sets the selected resource via the provided integrator functionssetLinkandsetImage.Returning
truewhen 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:
setDataInEditorin interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Returns:
truewhen all data has been set,falseif there were any changes that need saving- See Also:
-
setResource
Sets the current resource within the editor or xml-content.- Specified by:
setResourcein interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>
-
showData
Calls the preview handler to display the given data.- Specified by:
showDatain interfaceI_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>- Parameters:
resourceInfo- the resource info data
-