|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.utils.SAX2FilterImpl
org.jasig.portal.StylesheetSet
public class StylesheetSet
A tool for managing a collection of stylesheets. StylesheetSet allows you to instansiate a list of stylesheets in memory and select one according to the request/title/media parameters.
Nested Class Summary | |
---|---|
(package private) class |
StylesheetSet.OrderedProps
COPIED FROM XALAN SOURCE Stores the keys and values from a file (similar to a properties file) and can return the first value which has a key contained in its string. |
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
|
protected static java.lang.String |
m_defaultMediaPropsUri
|
protected static java.util.Hashtable |
m_mediaPropsCache
|
protected java.lang.String |
m_myMediaPropsUri
|
protected java.util.Hashtable |
title_table
|
Fields inherited from class org.jasig.portal.utils.SAX2FilterImpl |
---|
contentHandler, dtdHandler, entityResolver, errorHandler, lexicalHandler, locator |
Constructor Summary | |
---|---|
StylesheetSet()
|
|
StylesheetSet(org.xml.sax.ContentHandler dt)
Create a SAX filter that will pick up stylesheet bindings in a document that's processed through this filter. |
|
StylesheetSet(java.lang.String uri)
Creates a new StylesheetSet instance given a .ssl file URI. |
Method Summary | |
---|---|
void |
addStyleSheet(StylesheetDescription sd)
Add a stylesheet to the list. |
protected java.lang.String |
getMedia(BrowserInfo bi)
|
protected java.lang.String |
getMedia(javax.servlet.http.HttpServletRequest req)
|
protected StylesheetSet.OrderedProps |
getMediaProps()
|
javax.xml.transform.Source |
getStylesheet()
Obtains a default stylesheet. |
javax.xml.transform.Source |
getStylesheet(javax.servlet.http.HttpServletRequest req)
Obtain a stylesheet source. |
javax.xml.transform.Source |
getStylesheet(java.lang.String title)
Obtain a stylesheet transform source |
javax.xml.transform.Source |
getStylesheet(java.lang.String title,
BrowserInfo bi)
Obtain a stylesheet |
javax.xml.transform.Source |
getStylesheet(java.lang.String title,
javax.servlet.http.HttpServletRequest req)
Obtain a stylesheet source. |
javax.xml.transform.Source |
getStylesheet(java.lang.String title,
java.lang.String media)
Obtain a stylesheet. |
javax.xml.transform.Source |
getStylesheetByMedia(java.lang.String media)
Obtain a stylesheet for a given media. |
protected StylesheetDescription |
getStylesheetDescription(java.lang.String media)
|
java.lang.String |
getStylesheetURI(BrowserInfo bi)
Obtain a matching stylesheet URI |
java.lang.String |
getStylesheetURI(javax.servlet.http.HttpServletRequest req)
Obtain a matching stylesheet. |
java.lang.String |
getStylesheetURI(java.lang.String media)
Returns the URI of the stylesheet matching the media |
java.lang.String |
getStylesheetURI(java.lang.String title,
BrowserInfo bi)
Describe getStylesheetURI method here. |
java.lang.String |
getStylesheetURI(java.lang.String title,
javax.servlet.http.HttpServletRequest req)
Obtain stylesheet URI |
java.lang.String |
getStylesheetURI(java.lang.String title,
java.lang.String media)
Obtain a stylesheet URI |
protected java.util.Hashtable |
getTitleTable()
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Fills StylesheetSet by accepting SAX events |
void |
setMediaProps(java.lang.String uri)
Set the location of the media properties object. |
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, 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 |
---|
private static final org.apache.commons.logging.Log log
protected static final java.lang.String m_defaultMediaPropsUri
protected static java.util.Hashtable m_mediaPropsCache
protected java.lang.String m_myMediaPropsUri
protected java.util.Hashtable title_table
Constructor Detail |
---|
public StylesheetSet()
public StylesheetSet(org.xml.sax.ContentHandler dt)
dt
- a ContentHandler
of the downstream SAX listener..public StylesheetSet(java.lang.String uri) throws PortalException
StylesheetSet
instance given a .ssl file URI.
uri
- a String
value
PortalException
- if an error occursMethod Detail |
---|
public javax.xml.transform.Source getStylesheet(java.lang.String title)
title
- a String
value
Source
for a given stylesheetpublic javax.xml.transform.Source getStylesheet()
Source
for a default stylesheet.public javax.xml.transform.Source getStylesheet(java.lang.String title, java.lang.String media)
title
- stylesheet titlemedia
- stylesheet media
Source
for the stylesheet.public javax.xml.transform.Source getStylesheet(java.lang.String title, BrowserInfo bi) throws PortalException
title
- stylesheet titlebi
- current BrowserInfo
value
Source
for the stylesheet
PortalException
- if an error occurspublic java.lang.String getStylesheetURI(java.lang.String media) throws GeneralRenderingException
media
-
GeneralRenderingException
public java.lang.String getStylesheetURI(javax.servlet.http.HttpServletRequest req) throws PortalException
req
- current request value.
String
stylesheet URI
PortalException
- if an error occurspublic java.lang.String getStylesheetURI(BrowserInfo bi) throws PortalException
bi
- a BrowserInfo
value
String
styleshet
PortalException
- if an error occurspublic java.lang.String getStylesheetURI(java.lang.String title, javax.servlet.http.HttpServletRequest req) throws PortalException
title
- stylesheet titlereq
- a HttpServletRequest
value
String
stylesheet URI
PortalException
- if an error occurspublic java.lang.String getStylesheetURI(java.lang.String title, BrowserInfo bi) throws PortalException
getStylesheetURI
method here.
title
- a stylesheet titlebi
- a BrowserInfo
value
String
stylesheet URI
PortalException
- if an error occurspublic java.lang.String getStylesheetURI(java.lang.String title, java.lang.String media) throws GeneralRenderingException
title
- stylesheet titlemedia
- media value
String
stylesheet URI
GeneralRenderingException
- if an error occursprotected StylesheetDescription getStylesheetDescription(java.lang.String media) throws GeneralRenderingException
GeneralRenderingException
public javax.xml.transform.Source getStylesheet(java.lang.String title, javax.servlet.http.HttpServletRequest req) throws PortalException
title
- stylesheet titlereq
- current request
Source
for the stylesheet.
PortalException
- if an error occurspublic javax.xml.transform.Source getStylesheet(javax.servlet.http.HttpServletRequest req) throws PortalException
req
- an HttpServletRequest
value
Source
for the stylesheet
PortalException
- if an error occurspublic javax.xml.transform.Source getStylesheetByMedia(java.lang.String media) throws GeneralRenderingException
media
- desired media
Source
for the stylesheet.
GeneralRenderingException
- if an error occurspublic void addStyleSheet(StylesheetDescription sd)
sd
- a StylesheetDescription
valuepublic void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class SAX2FilterImpl
target
- data
-
org.xml.sax.SAXException
ContentHandler.processingInstruction(java.lang.String, java.lang.String)
protected StylesheetSet.OrderedProps getMediaProps() throws PortalException
PortalException
public void setMediaProps(java.lang.String uri) throws PortalException
uri
- a String
value
PortalException
- if an error occursprotected java.util.Hashtable getTitleTable()
protected java.lang.String getMedia(javax.servlet.http.HttpServletRequest req) throws PortalException
PortalException
protected java.lang.String getMedia(BrowserInfo bi) throws PortalException
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |