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

## org.jasig.portal.channels.webproxy
Class CWebProxyURLFilter

    java.lang.Object
      org.jasig.portal.utils.SAX2FilterImpl
          org.jasig.portal.channels.webproxy.CWebProxyURLFilter

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

Direct Known Subclasses:
  CWebProxyWMLURLFilter, CWebProxyXHTMLURLFilter

    public abstract class CWebProxyURLFilter

extends SAX2FilterImpl

Rewrites URLs for CWebProxy.

Version:
  $Revision: 1.6 $
Author:
  Sarah Arnott, sarnott@mun.ca

Field Summary
`protected java.lang.String` | `baseUrl`
`protected ChannelRuntimeData` | `runtimeData`

Fields inherited from class org.jasig.portal.utils.SAX2FilterImpl
`contentHandler, dtdHandler, entityResolver, errorHandler, lexicalHandler, locator, log`

Constructor Summary
`protected` | `CWebProxyURLFilter(org.xml.sax.ContentHandler handler)` A constructor which receives a ContentHandler to which filtered SAX events are passed.

Method Summary
`protected java.lang.String` | `getBase(java.lang.String url)` Returns the portion of the URL without the query string.
`protected java.lang.String` | `getQueryString(java.lang.String url)` Returns the query string portion of the URL.
`static CWebProxyURLFilter` | `newCWebProxyURLFilter(java.lang.String mimeType, ChannelRuntimeData runtimeData, org.xml.sax.ContentHandler handler)` A factory method that uses mimeType to determine which type of CWebProxyURLFilter to return.
`protected void` | `rewriteURL(java.lang.String elementName, java.lang.String attName, java.lang.String qName, org.xml.sax.Attributes atts, org.xml.sax.helpers.AttributesImpl attsImpl)` A helper method which rewrites an attribute that has a URL value for CWebProxy.

Methods inherited from class org.jasig.portal.utils.SAX2FilterImpl
`characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setAllHandlers, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setLexicalHandler, setParent, setProperty, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, unparsedEntityDecl, warning`

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

Field Detail

### runtimeData

    protected ChannelRuntimeData runtimeData

### baseUrl

    protected java.lang.String baseUrl

Constructor Detail

### CWebProxyURLFilter

    protected CWebProxyURLFilter(org.xml.sax.ContentHandler handler)

  A constructor which receives a ContentHandler to which filtered SAX events are passed.

  Parameters:
    `handler` - the ContentHandler to which filtered SAX events are passed

Method Detail

### newCWebProxyURLFilter

    public static final CWebProxyURLFilter newCWebProxyURLFilter(java.lang.String mimeType,
                                                                 ChannelRuntimeData runtimeData,
                                                                 org.xml.sax.ContentHandler handler)
                                                          throws PortalException

  A factory method that uses mimeType to determine which type of CWebProxyURLFilter to return. There are currently two types of markup supported: XHTML and WML.

  Parameters:
    `handler` - the ContentHandler used to pass along filtered SAX events
    `runtimeData` - the CWebProxy channel runtime data
  Throws:
    `PortalException`

### rewriteURL

    protected final void rewriteURL(java.lang.String elementName,
                                    java.lang.String attName,
                                    java.lang.String qName,
                                    org.xml.sax.Attributes atts,
                                    org.xml.sax.helpers.AttributesImpl attsImpl)

  A helper method which rewrites an attribute that has a URL value for CWebProxy. The URL rewriting is dependant upon the values of runtime data parameters (see CWebProxy documentation).

  Parameters:
    `elementName` - the element name containing an attribute of name attName
    `attName` - the name of the attribute of elementName
    `qName` - the name of the current element
    `attsImpl` - the attributes implementation to contain the new attribute value

### getBase

    protected java.lang.String getBase(java.lang.String url)

  Returns the portion of the URL without the query string.

  Parameters:
    `url` - A String representing the absolute URL.

### getQueryString

    protected java.lang.String getQueryString(java.lang.String url)

  Returns the query string portion of the URL.

  Parameters:
    `url` - A String representing the absolute URL.

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