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.i18n
Class LocaleAwareXSLT

    java.lang.Object
      org.jasig.portal.utils.XSLT
          org.jasig.portal.i18n.LocaleAwareXSLT

    public class LocaleAwareXSLT

extends XSLT

Selects XSLT stylesheets based on locale information.

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

Field Summary
`protected java.util.Locale[]` | `locales`
`private static org.apache.commons.logging.Log` | `log`
`private static org.apache.oro.text.perl.Perl5Util` | `perl5Util`

Fields inherited from class org.jasig.portal.utils.XSLT
`caller, l18n, mediaProps, stylesheetParams, stylesheetRootCache, stylesheetRootCacheEnabled, stylesheetSetCache, stylesheetSetCacheEnabled, xmlResult, xmlSource, xslURI`

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
`addLocalization, escape, getSAXTFactory, getStylesheetCacheSize, getStylesheetSet, getStylesheetURI, getStylesheetURI, getTemplates, getTemplates, getTransformer, getTransformer, getTransformer, getTransformer, getTransformerHandler, getTransformerHandler, purgeStylesheetCache, setResourceBundle, setStylesheetParameter, setStylesheetParameters, setStylesheetParameters, setTarget, setTarget, setTarget, setXML, setXML, setXML, setXML, setXSL, toString, transform, transform`

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

Field Detail

### log

    private static final org.apache.commons.logging.Log log

### locales

    protected java.util.Locale[] locales

### perl5Util

    private static org.apache.oro.text.perl.Perl5Util perl5Util

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

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