org.dspace.app.xmlui.cocoon
Class DSpaceLocaleAction
java.lang.Object
org.apache.cocoon.util.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.dspace.app.xmlui.cocoon.DSpaceLocaleAction
- All Implemented Interfaces:
- org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.service.Serviceable, org.apache.cocoon.acting.Action
public class DSpaceLocaleAction
- extends org.apache.cocoon.acting.ServiceableAction
- implements org.apache.avalon.framework.configuration.Configurable
This action looks at several places to determine what locale should be used for
this request. We use cocoon's i18nUtils find local method which will look in
several places continuing to the next step if no local is found.:
1. HTTP Request parameter 'locale'
2. Session attribute 'locale'
3. First matching cookie parameter 'locale' within each cookie sent
4. Sitemap parameter "locale"
5. Locale setting of the requesting browser or server default
6. Default
7. Blank
8. Fail
Only those locales which are listed in xmlui.supported.locales will be identified,
if no acceptable locales are found then the default locale will be used.
- Author:
- Scott Phillips
| Fields inherited from class org.apache.cocoon.acting.ServiceableAction |
manager |
| Fields inherited from class org.apache.cocoon.acting.AbstractAction |
EMPTY_MAP |
| Fields inherited from interface org.apache.cocoon.acting.Action |
ROLE |
|
Method Summary |
Map |
act(org.apache.cocoon.environment.Redirector redirector,
org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String source,
org.apache.avalon.framework.parameters.Parameters parameters)
Action which obtains the current environments locale information, and
places it in the objectModel (and optionally in a session/cookie). |
void |
configure(org.apache.avalon.framework.configuration.Configuration config)
Configure the action. |
| Methods inherited from class org.apache.cocoon.acting.ServiceableAction |
service |
| Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
getLogger, setLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DSpaceLocaleAction
public DSpaceLocaleAction()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration config)
- Configure the action.
- Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
act
public Map act(org.apache.cocoon.environment.Redirector redirector,
org.apache.cocoon.environment.SourceResolver resolver,
Map objectModel,
String source,
org.apache.avalon.framework.parameters.Parameters parameters)
throws Exception
- Action which obtains the current environments locale information, and
places it in the objectModel (and optionally in a session/cookie).
- Specified by:
act in interface org.apache.cocoon.acting.Action
- Throws:
Exception
Copyright © 2012 DuraSpace. All Rights Reserved.