|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter
public class HtmlDocumentNewsletter
This classes provides implementation to retrieve urls from specified tags on an HTML page.
| Field Summary | |
|---|---|
static java.lang.String |
CONSTANT_PROTOCOL_DELIMITER
|
static java.lang.String |
CONSTANT_STATIC_URL
|
static fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl |
ELEMENT_A
To define a anchor, a element must have: "a" tag name The url is contained in the attributed named "href" |
static fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl |
ELEMENT_CSS
To define a CSS, html element must have: "link" tag name "rel" attribute equal to "stylesheet" The url is contained in the attributed named "href" |
static fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl |
ELEMENT_FORM
To define a form, form element must have: "form" tag name The url is contained in the attributed named "action" |
static fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl |
ELEMENT_IMG
To define an image, html element must have: "img" tag name The url is contained in the attributed named "src" |
static fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl |
ELEMENT_JAVASCRIPT
To define a javascript, html element must have: "script" tag name "type" attribute equal to "text/javascript" The url is contained in the attributed named "src" |
| Constructor Summary | |
|---|---|
HtmlDocumentNewsletter(java.lang.String strHtml,
java.lang.String strBaseUrl)
Instantiates an HtmlDocument after having built the DOM tree. |
|
| Method Summary | |
|---|---|
void |
convertAllRelativesUrls(fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl elementType)
Get the relatives urls of all html elements specified by elementType and convert its to absolutes urls |
void |
convertUrlsToUnsecuredUrls(fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl elementType,
java.lang.String strUnsecuredBaseUrl,
java.lang.String strUnsecuredFolderPath,
java.lang.String strUnsecuredFolder)
Get the urls of all html elements specified by elementType and convert its to unsecured urls and copy this elements into an unsecured folder |
java.lang.String |
getContent()
Get the document content |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONSTANT_STATIC_URL
public static final java.lang.String CONSTANT_PROTOCOL_DELIMITER
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl ELEMENT_CSS
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl ELEMENT_JAVASCRIPT
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl ELEMENT_IMG
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl ELEMENT_A
public static final fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl ELEMENT_FORM
| Constructor Detail |
|---|
public HtmlDocumentNewsletter(java.lang.String strHtml,
java.lang.String strBaseUrl)
strHtml - The Html code to be parsed.strBaseUrl - The Base url used to retrieve urls.| Method Detail |
|---|
public void convertAllRelativesUrls(fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl elementType)
elementType - the type of element to get
public void convertUrlsToUnsecuredUrls(fr.paris.lutece.plugins.newsletter.util.HtmlDocumentNewsletter.ElementUrl elementType,
java.lang.String strUnsecuredBaseUrl,
java.lang.String strUnsecuredFolderPath,
java.lang.String strUnsecuredFolder)
elementType - the type of element to getpublic java.lang.String getContent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||