Class CmsPreviewInfo

java.lang.Object
org.opencms.gwt.shared.CmsPreviewInfo
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

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

  • Constructor Details

    • CmsPreviewInfo

      public CmsPreviewInfo(String content, String url, boolean newWindowRequired, String title, String sitePath, 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 Details

    • getHeight

      public int getHeight()
      Returns the required height.

      Returns:
      the required height
    • getLocale

      public String getLocale()
      Returns the locale.

      Returns:
      the locale
    • getLocales

      Returns the locales.

      Returns:
      the locales
    • getPreviewContent

      Returns the preview content.

      Returns:
      the preview content
    • getPreviewUrl

      Returns the preview URL.

      Returns:
      the preview URL
    • getSitePath

      public String getSitePath()
      Returns the site path.

      Returns:
      the site path
    • getTitle

      public 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(LinkedHashMap<String,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