public class ContentPresenterUtils
- extends Object
This is a utility method that can be used to determine the best title to use for a
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static String determineBestTitleForNode(javax.servlet.http.HttpServletRequest request,
- This is a utility method that can be used to determine the best title to use for a
given node. How this is done is the node's properties are iterated over, and if a
with the name 'title' is found, the value of that property will be used. If not, a
property with the name 'name' will be used. If neither of these are found, then we
check a couple of other properties to guess the best title. If there's a binary, we'll
use the the file name of the first binary property who's MIME type starts with 'application/',
if not then we'll choose any property that contains the word 'title' or 'name'
(internationalized strings), if not then we'll use the name of the file of the first binary
property we can find, regardless of MIME type. If all else fails, the node's name will be
returned. Since this logic is subjective, we encourage editing of this method to tailor it to
customer specific needs, rules, or conventions.
If any exceptions are encountered, an empty String ("") will be returned.
One other thing to note, the values of 'title' and 'name' are i18n'd, and can be found in
com/bea/content/ui/jsp/ContentPresenterUtils.properties within the message bundle jar.
request - - The request, used for localization
node - - The Node we want to determine the best title for
- The best determined title for the node
Copyright © 2011, Oracle. All rights reserved.