Class CmsPreviewInfo

  • All Implemented Interfaces:
    com.google.gwt.user.client.rpc.IsSerializable

    public class CmsPreviewInfo
    extends java.lang.Object
    implements com.google.gwt.user.client.rpc.IsSerializable
    Info needed to preview a resource.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CmsPreviewInfo()
      Constructor.
        CmsPreviewInfo​(java.lang.String content, java.lang.String url, boolean newWindowRequired, java.lang.String title, java.lang.String sitePath, java.lang.String locale)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getHeight()
      Returns the required height.
      java.lang.String getLocale()
      Returns the locale.
      java.util.Map<java.lang.String,​java.lang.String> getLocales()
      Returns the locales.
      java.lang.String getPreviewContent()
      Returns the preview content.
      java.lang.String getPreviewUrl()
      Returns the preview URL.
      java.lang.String getSitePath()
      Returns the site path.
      java.lang.String getTitle()
      Returns the title.
      int getWidth()
      Returns the required width.
      boolean hasAdditionalLocales()
      Returns if the given preview content has additional locales.
      boolean hasDimensions()
      Returns if the preview requires specific dimensions.
      boolean hasPreviewContent()
      Returns if preview HTML content is available to display directly.
      boolean hasPreviewUrl()
      Returns if there a URL available to call for the preview.
      boolean isNewWindowRequired()
      Returns if it is required to open the preview in a new window.
      void setHeight​(int height)
      Sets the required height.
      void setLocales​(java.util.LinkedHashMap<java.lang.String,​java.lang.String> locales)
      Sets the locales.
      void setWidth​(int width)
      Sets the required width.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsPreviewInfo

        public CmsPreviewInfo​(java.lang.String content,
                              java.lang.String url,
                              boolean newWindowRequired,
                              java.lang.String title,
                              java.lang.String sitePath,
                              java.lang.String locale)
        Constructor.

        Parameters:
        content - the preview content
        url - the preview URL
        newWindowRequired - flag indicating that the preview should be opened in a new window
        title - the title
        sitePath - the site path
        locale - the preview locale
      • CmsPreviewInfo

        protected CmsPreviewInfo()
        Constructor. For serialization only.

    • Method Detail

      • getHeight

        public int getHeight()
        Returns the required height.

        Returns:
        the required height
      • getLocale

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

        Returns:
        the locale
      • getLocales

        public java.util.Map<java.lang.String,​java.lang.String> getLocales()
        Returns the locales.

        Returns:
        the locales
      • getPreviewContent

        public java.lang.String getPreviewContent()
        Returns the preview content.

        Returns:
        the preview content
      • getPreviewUrl

        public java.lang.String getPreviewUrl()
        Returns the preview URL.

        Returns:
        the preview URL
      • getSitePath

        public java.lang.String getSitePath()
        Returns the site path.

        Returns:
        the site path
      • getTitle

        public java.lang.String getTitle()
        Returns the title.

        Returns:
        the title
      • getWidth

        public int getWidth()
        Returns the required width.

        Returns:
        the required width
      • hasAdditionalLocales

        public boolean hasAdditionalLocales()
        Returns if the given preview content has additional locales.

        Returns:
        true if the given preview content has additional locales
      • hasDimensions

        public boolean hasDimensions()
        Returns if the preview requires specific dimensions.

        Returns:
        true if the dialog requires dimensions
      • hasPreviewContent

        public boolean hasPreviewContent()
        Returns if preview HTML content is available to display directly.

        Returns:
        if preview HTML content is available to display directly
      • hasPreviewUrl

        public boolean hasPreviewUrl()
        Returns if there a URL available to call for the preview.

        Returns:
        if there a URL available to call for the preview
      • isNewWindowRequired

        public boolean isNewWindowRequired()
        Returns if it is required to open the preview in a new window.

        Returns:
        true if it is required to open the preview in a new window
      • setHeight

        public void setHeight​(int height)
        Sets the required height.

        Parameters:
        height - the required height to set
      • setLocales

        public void setLocales​(java.util.LinkedHashMap<java.lang.String,​java.lang.String> locales)
        Sets the locales.

        Parameters:
        locales - the locales to set
      • setWidth

        public void setWidth​(int width)
        Sets the required width.

        Parameters:
        width - the required width to set