Interface I_CmsResourcePreview<T extends org.opencms.ade.galleries.shared.CmsResourceInfoBean>

    • 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 in I_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 functions setLink and setImage.
      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

      • getGalleryMode

        org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode getGalleryMode()
        Returns the gallery mode.

        Returns:
        the gallery mode
      • getLocale

        java.lang.String getLocale()
        Returns the current locale.

        Returns:
        the current locale
      • getPreviewName

        java.lang.String getPreviewName()
        Returns the preview name, should return the same as in I_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 path
        disableSelection - 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 properties
        afterSaveCommand - 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 path
        structureId - the structure id
        title - the resource title
      • setDataInEditor

        boolean setDataInEditor()
        Checks if further user input is required and other wise sets the selected resource via the provided integrator functions setLink and setImage.

        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

        void showData​(T resourceInfo)
        Calls the preview handler to display the given data.

        Parameters:
        resourceInfo - the resource info data