org.tynamo.util
Class Utils

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

public class Utils
extends Object


Field Summary
static String ADD_NEW_MESSAGE
           
static String ADDED_MESSAGE
           
static String APPLY_AND_RETURN_MESSAGE
           
static String APPLY_MESSAGE
           
static String CANCEL_MESSAGE
           
static String EDIT_MESSAGE
           
static String LIST_MESSAGE
           
static String LISTALL_LINK_MESSAGE
           
static String NEW_MESSAGE
           
static String REMOVE_MESSAGE
           
static String SAVED_MESSAGE
           
static int SC_NOT_FOUND
          Status code (404) indicating that the requested resource is not available.
static String SC_NOT_FOUND_MESSAGE
           
static String SHOW_MESSAGE
           
 
Constructor Summary
Utils()
           
 
Method Summary
static boolean isExcluded(String name, Collection<String> exclusionPatterns)
          Tests whether or not a name matches against at least one exclude pattern.
static org.apache.tapestry5.services.HttpError new404(org.apache.tapestry5.ioc.Messages messages)
           
static String pluralize(String singularNoun)
          Thank you, AndroMDA project...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLY_MESSAGE

public static final String APPLY_MESSAGE
See Also:
Constant Field Values

APPLY_AND_RETURN_MESSAGE

public static final String APPLY_AND_RETURN_MESSAGE
See Also:
Constant Field Values

REMOVE_MESSAGE

public static final String REMOVE_MESSAGE
See Also:
Constant Field Values

CANCEL_MESSAGE

public static final String CANCEL_MESSAGE
See Also:
Constant Field Values

ADD_NEW_MESSAGE

public static final String ADD_NEW_MESSAGE
See Also:
Constant Field Values

EDIT_MESSAGE

public static final String EDIT_MESSAGE
See Also:
Constant Field Values

SHOW_MESSAGE

public static final String SHOW_MESSAGE
See Also:
Constant Field Values

LIST_MESSAGE

public static final String LIST_MESSAGE
See Also:
Constant Field Values

NEW_MESSAGE

public static final String NEW_MESSAGE
See Also:
Constant Field Values

ADDED_MESSAGE

public static final String ADDED_MESSAGE
See Also:
Constant Field Values

SAVED_MESSAGE

public static final String SAVED_MESSAGE
See Also:
Constant Field Values

LISTALL_LINK_MESSAGE

public static final String LISTALL_LINK_MESSAGE
See Also:
Constant Field Values

SC_NOT_FOUND

public static final int SC_NOT_FOUND
Status code (404) indicating that the requested resource is not available.

See Also:
Constant Field Values

SC_NOT_FOUND_MESSAGE

public static final String SC_NOT_FOUND_MESSAGE
See Also:
Constant Field Values
Constructor Detail

Utils

public Utils()
Method Detail

pluralize

public static String pluralize(String singularNoun)
Thank you, AndroMDA project... Linguistically pluralizes a singular noun.

Whitespace as well as null> arguments will return an empty String.

Parameters:
singularNoun - A singularNoun to pluralize
Returns:
The plural of the argument singularNoun

isExcluded

public static boolean isExcluded(String name,
                                 Collection<String> exclusionPatterns)
Tests whether or not a name matches against at least one exclude pattern.

Parameters:
name - The name to match. Must not be null.
exclusionPatterns - the list of exclude patterns to test against
Returns:
true when the name matches against at least one exclude pattern, or false otherwise.

new404

public static org.apache.tapestry5.services.HttpError new404(org.apache.tapestry5.ioc.Messages messages)


Copyright © 2004-2012. All Rights Reserved.