Package org.ametys.web.url
Class UrlPreview
- java.lang.Object
-
- org.ametys.web.url.UrlPreview
-
public class UrlPreview extends Object
This bean represents a url preview with title, description, image and favico
-
-
Constructor Summary
Constructors Constructor Description UrlPreview()Empty constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_saxNonNullElement(ContentHandler handler, String tagName, String value)StringgetDescription()Get the descriptionStringgetFavicon()Get the favicoStringgetImageUrl()Get the image urlStringgetTitle()Get the titleStringgetUrl()Get the urlvoidsetDescription(String description)Set the descriptionvoidsetFavicon(String favico)Set the absolute url of favicovoidsetImageUrl(String imgUrl)Set the absolute url of imagevoidsetTitle(String title)Set the titlevoidsetUrl(String url)Set the urlMap<String,String>toJSON()Get the JSON representation of this url previewvoidtoSAX(ContentHandler handler, String tagName)Generates sax events representing this url preview
-
-
-
Constructor Detail
-
UrlPreview
public UrlPreview()
Empty constructor
-
-
Method Detail
-
setDescription
public void setDescription(String description)
Set the description- Parameters:
description- the description
-
getDescription
public String getDescription()
Get the description- Returns:
- the description
-
setImageUrl
public void setImageUrl(String imgUrl)
Set the absolute url of image- Parameters:
imgUrl- the url of image
-
getImageUrl
public String getImageUrl()
Get the image url- Returns:
- the absolute url of the image
-
setFavicon
public void setFavicon(String favico)
Set the absolute url of favico- Parameters:
favico- the url of favico
-
getFavicon
public String getFavicon()
Get the favico- Returns:
- the favico absolute url
-
toJSON
public Map<String,String> toJSON()
Get the JSON representation of this url preview- Returns:
- the properties as json
-
toSAX
public void toSAX(ContentHandler handler, String tagName) throws SAXException
Generates sax events representing this url preview- Parameters:
handler- The content handler to sax intotagName- the root tag name- Throws:
SAXException- if an error occurs while saxing
-
_saxNonNullElement
private void _saxNonNullElement(ContentHandler handler, String tagName, String value) throws SAXException
- Throws:
SAXException
-
-