ERXRestNameRegistry Class Reference

Collaboration diagram for ERXRestNameRegistry:

Collaboration graph
[legend]

List of all members.

Public Member Functions

String externalNameForInternalName (String internalName)
String internalNameForExternalName (String externalName)
void setExternalNameForInternalName (String externalName, String internalName)

Static Public Member Functions

static ERXRestNameRegistry registry ()

Protected Member Functions

void _setExternalNameForInternalName (String externalName, String internalName)
 ERXRestNameRegistry ()

Private Attributes

Map< String, String_externalNameForInternalName
Map< String, String_internalNameForExternalName

Static Private Attributes

static ERXRestNameRegistry _registry = new ERXRestNameRegistry()


Detailed Description

ERXNameRegistry provides a registry to remap the names of entities and keys to another name. ERXRestFormat applies these renames at parse and format time so that your code doesn't have to deal with it. The default routes also apply these naming rules, though the route variable that you use will be the internal name, not the external name.

Author:
mschrag

Constructor & Destructor Documentation

ERXRestNameRegistry (  )  [protected]


Member Function Documentation

void _setExternalNameForInternalName ( String  externalName,
String  internalName 
) [protected]

String externalNameForInternalName ( String  internalName  ) 

Returns the external name for the given internal name.

Parameters:
internalName the internal name of the entity
Returns:
the external name of the entity

String internalNameForExternalName ( String  externalName  ) 

Returns the internal name for the given external name.

Parameters:
externalName the external name of the entity
Returns:
the internal name of the entity

static ERXRestNameRegistry registry (  )  [static]

Returns the singleton name registry.

Returns:
the singleton name registry

void setExternalNameForInternalName ( String  externalName,
String  internalName 
)

Sets the external name for a given internal name. For instance, if your entity is named "Person" but you want to display it as "Employee" in your service, you would setExternalNameForInternalName("Employee", "Person").

Parameters:
externalName the name to expose in your service
internalName the name for use internally


Member Data Documentation


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

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