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

## oracle.portal.provider.v1.http
Class HtmlFilter

    java.lang.Object
      |
      +--oracle.portal.provider.v1.http.BaseContentFilter
            |
            +--oracle.portal.provider.v1.http.HtmlFilter

All Implemented Interfaces:
  ContentFilter

Direct Known Subclasses:
  SelectiveRenderingFilter

public class HtmlFilter
extends BaseContentFilter

HtmlFilter `oracle.portal.utils.xml.v1.ContentFilter` gets HTML contents from an URL and then applies the filtering directives as specified in the provider.xml.

- trims the HTML header contents.
- replaces relative path into absolute paths.
- href’s are converted to have a target as _blank.
- trims footer content.

Constructor Summary
`HtmlFilter()`

Method Summary
`void` | `filterContent(oracle.portal.provider.v1.PortletRenderRequest pr, java.io.InputStream urlStream)` filterResponse method takes PortletRenderRequest and InputStream as arguments, It does the necessary scrapping of URL contents, depending on the directives in the provider.xml
`java.lang.String` | `getConvertTarget()` Returns value of convertTarget tag in provider.xml
`protected java.lang.String` | `modifyClassProperty(java.lang.String tableRowTag, java.lang.String style)`
`protected java.lang.String` | `removeTag(java.lang.String urlContent, java.lang.String tag)`
`protected java.lang.String` | `replaceHRefClassProperty(java.lang.String urlContent, java.lang.String style)`
`protected java.lang.String` | `replaceTableBackground(java.lang.String urlContent, java.lang.String style)`
`protected java.lang.String` | `replaceTableClassProperty(java.lang.String urlContent, java.lang.String style)`
`protected java.lang.String` | `replaceTagAttribute(oracle.portal.provider.v1.PortletRenderRequest pr, java.lang.String attribute, java.lang.String InhtmlSource, java.lang.String baseHref, java.lang.String secBaseHref)` Method replaces relative URLS to Absolute URLS, in the passed content.
`void` | `setConvertTarget(java.lang.String convertTarget)` Specifies if link in URLContent need to be opened in new window.
`void` | `setFooterTrimTag(java.lang.String footerTrimTag)` Setter method specified in provider.xml
`void` | `setHeaderTrimTag(java.lang.String headerTrimTag)` Setter method for trim tag specified in provider.xml

Methods inherited from class oracle.portal.provider.v1.http.BaseContentFilter
`addJavaScriptSubmitFunction, addJavaScriptToLink, authenticateBasicLoginLinks, authenticateFormLoginLinks, getBaseHRef, getBaseHRef, getInlineRendering, getRedirectUrlFieldName, getSecBaseHRef, getUrlContentType, getUseAuthLinks, getUsePortalStyle, parseBaseHref, popBaseHref, renderContents, replaceAuthLinks, setBaseHRef, setInlineRendering, setRedirectUrlFieldName, setRemoveClassProperty, setSecBaseHRef, setUrlContentType, setUseAuthLinks, setUsePortalStyle`

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

Constructor Detail

### HtmlFilter

    public HtmlFilter()

Method Detail

### setHeaderTrimTag

    public void setHeaderTrimTag(java.lang.String headerTrimTag)

  Setter method for trim tag specified in provider.xml

### setFooterTrimTag

    public void setFooterTrimTag(java.lang.String footerTrimTag)

  Setter method specified in provider.xml
  Parameters:
    `footerTrimTag` - specifies the tag after which the url contents have to be removed.

### setConvertTarget

    public void setConvertTarget(java.lang.String convertTarget)

  Specifies if link in URLContent need to be opened in new window.
  Parameters:
    `convertTarget` - true/false

### getConvertTarget

    public java.lang.String getConvertTarget()

  Returns value of convertTarget tag in provider.xml

### filterContent

    public void filterContent(oracle.portal.provider.v1.PortletRenderRequest pr,
                              java.io.InputStream urlStream)
                       throws java.io.IOException,
                              oracle.portal.provider.v1.PortletException

  filterResponse method takes PortletRenderRequest and InputStream as arguments, It does the necessary scrapping of URL contents, depending on the directives in the provider.xml
  Parameters:
    `PortletRenderRequest` - pr
    `java.io.InputStream` - urlStream

### replaceTagAttribute

    protected java.lang.String replaceTagAttribute(oracle.portal.provider.v1.PortletRenderRequest pr,
                                                   java.lang.String attribute,
                                                   java.lang.String InhtmlSource,
                                                   java.lang.String baseHref,
                                                   java.lang.String secBaseHref)

  Method replaces relative URLS to Absolute URLS, in the passed content.
  Parameters:
    `pr` - ProviderRequest for this rendering.
    `tag` - contains tag ,that contains relative url
    `attribute` - contains the attribute containing relative url
    `InhtmlSource` - String containing the HtmlSource of pageURL
    `baseHref` - contains BaseHref tag
    `secBaseHref` - contains alias path appended to domain URL.
  Returns:
    String contents with absolute url

### replaceTableBackground

    protected java.lang.String replaceTableBackground(java.lang.String urlContent,
                                                      java.lang.String style)

### replaceHRefClassProperty

    protected java.lang.String replaceHRefClassProperty(java.lang.String urlContent,
                                                        java.lang.String style)

### removeTag

    protected java.lang.String removeTag(java.lang.String urlContent,
                                         java.lang.String tag)

### modifyClassProperty

    protected java.lang.String modifyClassProperty(java.lang.String tableRowTag,
                                                   java.lang.String style)

### replaceTableClassProperty

    protected java.lang.String replaceTableClassProperty(java.lang.String urlContent,
                                                         java.lang.String style)

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