|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
LocalizedContext
instances which can be obtained from PortalLocalizedContextHome
and PortletLocalizedContextHome
.
Obtains title or description of a localized object by
employing a fallback mechanism in case the title or description is not
available in the requested locale(s). This utilizes the expected behavior of
the Localized
methods: They only return non-null results in case they
keep a title or description in the requested locale.The resolver can be obtained through a JNDI lookup:
Context ctx = new InitialContext(); final LocalizedStringResolver resolver = (LocalizedStringResolver) ctx.lookup("portal:service/model/LocalizedStringResolver"); if (resolver != null) { final String title = resolver.getTitle(aLocalizedObject, aRequest.getLocales()); ... }
public interface LocalizedStringResolver
Identifiable
,
Localized
Method Summary | |
---|---|
java.lang.String |
getDescription(Localized anObject,
java.util.Enumeration<java.util.Locale> aLocaleEnumeration)
Deprecated. Returns the description of the given node in a locale given by the enumeration. |
java.lang.String |
getTitle(Localized anObject,
java.util.Enumeration<java.util.Locale> aLocaleEnumeration)
Deprecated. Returns the title of the given node in a locale given by the enumeration. |
Method Detail |
---|
java.lang.String getTitle(Localized anObject, java.util.Enumeration<java.util.Locale> aLocaleEnumeration)
anObject
- the object whose title to retrieveaLocaleEnumeration
- an enumeration of locales (e.g. obtained by calling ServletRequest.getLocales()
)
java.lang.String getDescription(Localized anObject, java.util.Enumeration<java.util.Locale> aLocaleEnumeration)
anObject
- the object whose description to retrieveaLocaleEnumeration
- an enumeration of locales (e.g. obtained by calling ServletRequest.getLocales()
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |