ERXRouteRequestHandler.NameFormat Class Reference

List of all members.

Public Types

enum  Case { CamelCase, LowerCamelCase, Lowercase, LowercaseUnderscore }

Public Member Functions

String formatEntityNamed (String entityName, boolean pluralizeIfNecessary)
 NameFormat (boolean pluralControllerName, boolean pluralRouteName, NameFormat.Case routeCase)
boolean pluralControllerName ()
boolean pluralRouteName ()
NameFormat.Case routeCase ()

Protected Member Functions

String caseifyEntityNamed (String entityName)

Private Attributes

boolean _pluralControllerName
boolean _pluralRouteName
Case _routeCase


Detailed Description

NameFormat specifies how routes and controller names should be capitalized by default.

Author:
mschrag

Member Enumeration Documentation

enum Case

An enumerated type specifying the case of your routes.

Author:
mschrag
Enumerator:
CamelCase  CamelCase
LowerCamelCase  lowerCamelCase
Lowercase  lowercase
LowercaseUnderscore  lowercase_underscore


Constructor & Destructor Documentation

NameFormat ( boolean  pluralControllerName,
boolean  pluralRouteName,
NameFormat.Case  routeCase 
)

Creates a new NameFormat.

Parameters:
pluralControllerName if true, controller names with be pluralized ("CompaniesController")
pluralRouteName if true, routes will be pluralizd ("/Companies.xml")
routeCase the case to use for the route name


Member Function Documentation

String caseifyEntityNamed ( String  entityName  )  [protected]

Applies the case transformation to the given string.

Parameters:
entityName the string to adjust the case of
Returns:
the case-adjusted string

String formatEntityNamed ( String  entityName,
boolean  pluralizeIfNecessary 
)

Formats the given entity name based on the rules of this format.

Parameters:
entityName the entity name to format
pluralizeIfNecessary if pluralRouteNames() is true, return the plural form
Returns:
the formatted entity name

boolean pluralControllerName (  ) 

Returns whether or not controller names should be pluralizd.

Returns:
whether or not controller names should be pluralizd

boolean pluralRouteName (  ) 

Returns whether or not routes should be pluralizd.

Returns:
whether or not routes should be pluralizd

NameFormat.Case routeCase (  ) 

Returns the case to use for routes.

Returns:
whether or not routes should be capitalized


Member Data Documentation

boolean _pluralControllerName [private]

boolean _pluralRouteName [private]

Case _routeCase [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:33 2012 for Project Wonder by  doxygen 1.5.8