Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.hipermail
Class HtmlMimeBodyPart

    java.lang.Object
      com.knowgate.hipermail.HtmlMimeBodyPart

    public class HtmlMimeBodyPart

extends java.lang.Object

Used to perform some maipulations in HTML source code for e-mails

Constructor Summary
`HtmlMimeBodyPart(java.lang.String sHtml, java.lang.String sEncoding)`

Method Summary
`java.lang.String` | `addClickThroughRedirector(java.lang.String sRedirectorUrl)` Replace HREF targets with an intermediate page for tracking click through
`java.lang.String` | `addPreffixToImgSrc(java.lang.String sPreffix)` Add a preffix to <IMG SRC="..."
`java.util.ArrayList<java.lang.String>` | `extractHrefs()`
`java.util.ArrayList<java.lang.String>` | `extractLocalUrls()` Get a list of
`java.util.HashMap` | `getImagesCids()`
`java.lang.String` | `removePreffixFromImgSrcs(java.lang.String sPreffix)` Remove a preffix from <IMG SRC="..."
`java.lang.String` | `replacePreffixFromImgSrcs(java.lang.String sFormerPreffix, java.lang.String sNewPreffix)` Replace a preffix from <IMG SRC="..."
`void` | `setHtml(java.lang.String sHtml)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HtmlMimeBodyPart

    public HtmlMimeBodyPart(java.lang.String sHtml,
                            java.lang.String sEncoding)

Method Detail

### setHtml

    public void setHtml(java.lang.String sHtml)

### extractHrefs

    public java.util.ArrayList<java.lang.String> extractHrefs()

### extractLocalUrls

    public java.util.ArrayList<java.lang.String> extractLocalUrls()
                                                           throws java.lang.ArrayIndexOutOfBoundsException

  Get a list of
  Throws:
    `java.lang.ArrayIndexOutOfBoundsException`

### getImagesCids

    public java.util.HashMap getImagesCids()

### addPreffixToImgSrc

    public java.lang.String addPreffixToImgSrc(java.lang.String sPreffix)
                                        throws ParserException

  Add a preffix to <IMG SRC="..."> <TABLE BACKGROUND="..."> and <TD BACKGROUND="..."> tags

  Parameters:
    `sPreffix` - String preffix to be added to <img> src attribute and <table> and <td> background
  Returns:
    New HTML source with preffixed attributes
  Throws:
    `ParserException`

### removePreffixFromImgSrcs

    public java.lang.String removePreffixFromImgSrcs(java.lang.String sPreffix)
                                              throws ParserException

  Remove a preffix from <IMG SRC="..."> <TABLE BACKGROUND="..."> and <TD BACKGROUND="..."> tags

  Parameters:
    `sPreffix` - String preffix to be removed from <img> src attribute and <table> and <td> background
  Returns:
    New HTML source with unpreffixed attributes
  Throws:
    `ParserException`

### replacePreffixFromImgSrcs

    public java.lang.String replacePreffixFromImgSrcs(java.lang.String sFormerPreffix,
                                                      java.lang.String sNewPreffix)
                                               throws ParserException

  Replace a preffix from <IMG SRC="..."> <TABLE BACKGROUND="..."> and <TD BACKGROUND="..."> tags with another one

  Parameters:
    `sFormerPreffix` - String
    `sNewPreffix` - String
  Returns:
    New HTML source with replaced preffixed attributes
  Throws:
    `ParserException`

### addClickThroughRedirector

    public java.lang.String addClickThroughRedirector(java.lang.String sRedirectorUrl)
                                               throws ParserException

  Replace HREF targets with an intermediate page for tracking click through

  Parameters:
    `sRedirectorUrl` - String Full HTTP path where all HREF URLs must be redirected
  Returns:
    New HTML source with replaced HREF attributes
  Throws:
    `ParserException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD