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 Details

    • UrlPreview

      public UrlPreview()
      Empty constructor
  • Method Details

    • setTitle

      public void setTitle(String title)
      Set the title
      Parameters:
      title - the title
    • getTitle

      public String getTitle()
      Get the title
      Returns:
      the title
    • setDescription

      public void setDescription(String description)
      Set the description
      Parameters:
      description - the description
    • 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
    • setUrl

      public void setUrl(String url)
      Set the url
      Parameters:
      url - the url
    • getUrl

      public String getUrl()
      Get the url
      Returns:
      the 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 into
      tagName - the root tag name
      Throws:
      SAXException - if an error occurs while saxing