uPortal 2.4.1
API Documentation

org.jasig.portal.i18n
Class LocaleAwareXSLT

java.lang.Object
  extended byorg.jasig.portal.utils.XSLT
      extended byorg.jasig.portal.i18n.LocaleAwareXSLT

public class LocaleAwareXSLT
extends XSLT

Selects XSLT stylesheets based on locale information.

Since:
uPortal 2.2
Version:
$Revision: 1.11 $
Author:
Shoji Kajita kajita@itc.nagoya-u.ac.jp

Constructor Summary
LocaleAwareXSLT(java.lang.Object instance)
          Constructor that configures the calling class.
LocaleAwareXSLT(java.lang.Object instance, java.util.Locale[] locales)
          Constructor that configures both the calling class and the locale list.
 
Method Summary
static java.lang.String getLocaleAwareXslUri(java.lang.String xslUri, java.util.Locale[] locales, java.lang.Object caller)
          Finds localized version of stylesheet according to the supplied list of locales.
 void setLocales(java.util.Locale[] locales)
          Sets the locales.
 void setXSL(java.lang.String sslUri, BrowserInfo browserInfo)
          Configures the xsl source by choosing the appropriate stylesheet from the provided stylesheet list file, taking into account the list of locales.
 void setXSL(java.lang.String sslUri, java.lang.String stylesheetTitle, BrowserInfo browserInfo)
          Configures the xsl source by choosing the appropriate stylesheet from the provided stylesheet list file, taking into account the list of locales.
 
Methods inherited from class org.jasig.portal.utils.XSLT
getSAXTFactory, getStylesheetSet, getStylesheetURI, getStylesheetURI, getTemplates, getTemplates, getTransformer, getTransformer, getTransformer, getTransformer, getTransformerHandler, getTransformerHandler, setResourceBundle, setStylesheetParameter, setStylesheetParameters, setStylesheetParameters, setTarget, setTarget, setTarget, setXML, setXML, setXML, setXML, setXSL, transform, transform
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleAwareXSLT

public LocaleAwareXSLT(java.lang.Object instance)
Constructor that configures the calling class.

Parameters:
instance - class name used to search for resources

LocaleAwareXSLT

public LocaleAwareXSLT(java.lang.Object instance,
                       java.util.Locale[] locales)
Constructor that configures both the calling class and the locale list.

Parameters:
instance - class name used to search for resources
locales - a list of locales
Method Detail

setLocales

public void setLocales(java.util.Locale[] locales)
Sets the locales.

Parameters:
locales - a list of locales

setXSL

public void setXSL(java.lang.String sslUri,
                   java.lang.String stylesheetTitle,
                   BrowserInfo browserInfo)
            throws PortalException
Configures the xsl source by choosing the appropriate stylesheet from the provided stylesheet list file, taking into account the list of locales.

Overrides:
setXSL in class XSLT
Parameters:
sslUri - the URL of the stylesheet list file
stylesheetTitle - the title of a stylesheet within the stylesheet list file
browserInfo - the browser info object
Throws:
PortalException

setXSL

public void setXSL(java.lang.String sslUri,
                   BrowserInfo browserInfo)
            throws PortalException
Configures the xsl source by choosing the appropriate stylesheet from the provided stylesheet list file, taking into account the list of locales.

Overrides:
setXSL in class XSLT
Parameters:
sslUri - the URL of the stylesheet list file
browserInfo - the browser info object
Throws:
PortalException

getLocaleAwareXslUri

public static java.lang.String getLocaleAwareXslUri(java.lang.String xslUri,
                                                    java.util.Locale[] locales,
                                                    java.lang.Object caller)
Finds localized version of stylesheet according to the supplied list of locales.

Parameters:
xslUri - the URL of the stylesheet file
locales - the list of locales
caller - the calling class

uPortal 2.4.1
API Documentation