Package org.opencms.gwt.shared
Class CmsPreviewInfo
java.lang.Object
org.opencms.gwt.shared.CmsPreviewInfo
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
Info needed to preview a resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the required height.Returns the locale.Returns the locales.Returns the preview content.Returns the preview URL.Returns the site path.getTitle()Returns the title.intgetWidth()Returns the required width.booleanReturns if the given preview content has additional locales.booleanReturns if the preview requires specific dimensions.booleanReturns if preview HTML content is available to display directly.booleanReturns if there a URL available to call for the preview.booleanReturns if it is required to open the preview in a new window.voidsetHeight(int height) Sets the required height.voidsetLocales(LinkedHashMap<String, String> locales) Sets the locales.voidsetWidth(int width) Sets the required width.
-
Constructor Details
-
CmsPreviewInfo
public CmsPreviewInfo(String content, String url, boolean newWindowRequired, String title, String sitePath, String locale) Constructor.- Parameters:
content- the preview contenturl- the preview URLnewWindowRequired- flag indicating that the preview should be opened in a new windowtitle- the titlesitePath- the site pathlocale- the preview locale
-
CmsPreviewInfo
protected CmsPreviewInfo()Constructor. For serialization only.
-
-
Method Details
-
getHeight
Returns the required height.- Returns:
- the required height
-
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
Returns the site path.- Returns:
- the site path
-
getTitle
Returns the title.- Returns:
- the title
-
getWidth
Returns the required width.- Returns:
- the required width
-
hasAdditionalLocales
Returns if the given preview content has additional locales.- Returns:
trueif the given preview content has additional locales
-
hasDimensions
Returns if the preview requires specific dimensions.- Returns:
trueif the dialog requires dimensions
-
hasPreviewContent
Returns if preview HTML content is available to display directly.- Returns:
- if preview HTML content is available to display directly
-
hasPreviewUrl
Returns if there a URL available to call for the preview.- Returns:
- if there a URL available to call for the preview
-
isNewWindowRequired
Returns if it is required to open the preview in a new window.- Returns:
trueif it is required to open the preview in a new window
-
setHeight
Sets the required height.- Parameters:
height- the required height to set
-
setLocales
Sets the locales.- Parameters:
locales- the locales to set
-
setWidth
Sets the required width.- Parameters:
width- the required width to set
-