public static class ERXRouteRequestHandler.NameFormat extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ERXRouteRequestHandler.NameFormat.Case
An enumerated type specifying the case of your routes.
|
Constructor and Description |
---|
NameFormat(boolean pluralControllerName,
boolean pluralRouteName,
ERXRouteRequestHandler.NameFormat.Case routeCase)
Creates a new NameFormat.
|
Modifier and Type | Method and Description |
---|---|
protected String |
caseifyEntityNamed(String entityName)
Applies the case transformation to the given string.
|
String |
formatEntityNamed(String entityName,
boolean pluralizeIfNecessary)
Formats the given entity name based on the rules of this format.
|
boolean |
pluralControllerName()
Returns whether or not controller names should be pluralizd.
|
boolean |
pluralRouteName()
Returns whether or not routes should be pluralizd.
|
ERXRouteRequestHandler.NameFormat.Case |
routeCase()
Returns the case to use for routes.
|
public NameFormat(boolean pluralControllerName, boolean pluralRouteName, ERXRouteRequestHandler.NameFormat.Case routeCase)
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 namepublic boolean pluralControllerName()
public boolean pluralRouteName()
public ERXRouteRequestHandler.NameFormat.Case routeCase()
protected String caseifyEntityNamed(String entityName)
entityName
- the string to adjust the case ofpublic String formatEntityNamed(String entityName, boolean pluralizeIfNecessary)
entityName
- the entity name to formatpluralizeIfNecessary
- if pluralRouteNames() is true, return the plural formCopyright © 2002 – 2020 Project Wonder.