org.tynamo.util
Class DisplayNameUtils

java.lang.Object
  extended by org.tynamo.util.DisplayNameUtils

public class DisplayNameUtils
extends Object


Constructor Summary
DisplayNameUtils()
           
 
Method Summary
static String getDisplayName(Class type, org.apache.tapestry5.ioc.Messages messages)
          Looks for a label within the messages based on the class name.
static String getDisplayName(TynamoClassDescriptor classDescriptor, org.apache.tapestry5.ioc.Messages messages)
          Looks for a label within the messages based on the class name.
static String getDisplayName(TynamoPropertyDescriptor propertyDescriptor, org.apache.tapestry5.ioc.Messages messages)
          Looks for a label within the messages based on the property name.
static String getPluralDisplayName(TynamoClassDescriptor classDescriptor, org.apache.tapestry5.ioc.Messages messages)
          Looks for a label within the messages based on the class name.
static String getShortDescription(TynamoClassDescriptor classDescriptor, org.apache.tapestry5.ioc.Messages messages)
          Looks for a label within the messages based on the class name.
static String getShortDescription(TynamoPropertyDescriptor propertyDescriptor, org.apache.tapestry5.ioc.Messages messages)
          Looks for a label within the messages based on the property name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayNameUtils

public DisplayNameUtils()
Method Detail

getPluralDisplayName

public static String getPluralDisplayName(TynamoClassDescriptor classDescriptor,
                                          org.apache.tapestry5.ioc.Messages messages)
Looks for a label within the messages based on the class name. If found, it is used, otherwise the name is "linguistically pluralized" (only works in English) The message key is the full or the simple name of the entity suffixed with "-plural".


getDisplayName

public static String getDisplayName(TynamoClassDescriptor classDescriptor,
                                    org.apache.tapestry5.ioc.Messages messages)
Looks for a label within the messages based on the class name. If found, it is used, otherwise the name is converted to a user presentable form. The message key is either the full name of the entity or the simpleName


getDisplayName

public static String getDisplayName(Class type,
                                    org.apache.tapestry5.ioc.Messages messages)
Looks for a label within the messages based on the class name. If found, it is used, otherwise the name is converted to a user presentable form. The message key is either the full name of the entity or the simpleName


getDisplayName

public static String getDisplayName(TynamoPropertyDescriptor propertyDescriptor,
                                    org.apache.tapestry5.ioc.Messages messages)
Looks for a label within the messages based on the property name. If found, it is used, otherwise the name is converted to a user presentable form. The message key is the property name suffixed with "-label".


getShortDescription

public static String getShortDescription(TynamoClassDescriptor classDescriptor,
                                         org.apache.tapestry5.ioc.Messages messages)
Looks for a label within the messages based on the class name. If found, it is used, otherwise an empty string is returned The message key is the property name suffixed with "-shortDescription".


getShortDescription

public static String getShortDescription(TynamoPropertyDescriptor propertyDescriptor,
                                         org.apache.tapestry5.ioc.Messages messages)
Looks for a label within the messages based on the property name. If found, it is used, otherwise an empty string is returned The message key is the full or the simple name of the entity suffixed with "-shortDescription".



Copyright © 2004-2009. All Rights Reserved.