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 String
getDescription()
Get the descriptionString
getFavicon()
Get the favicoString
getImageUrl()
Get the image urlString
getTitle()
Get the titleString
getUrl()
Get the urlvoid
setDescription(String description)
Set the descriptionvoid
setFavicon(String favico)
Set the absolute url of favicovoid
setImageUrl(String imgUrl)
Set the absolute url of imagevoid
setTitle(String title)
Set the titlevoid
setUrl(String url)
Set the urlMap<String,String>
toJSON()
Get the JSON representation of this url previewvoid
toSAX(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
-
-