public class NameController
extends java.lang.Object
Constructor and Description |
---|
NameController() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHaveDuplicateNames()
Returns false by default.
|
java.lang.String |
getDefaultName(java.lang.String type,
java.lang.String objName)
Returns a default name for the given object type and name.
|
static java.lang.String |
getEntityName(java.lang.String databaseName)
Given the name of a database object (typically uppercase with no spaces)
this method constructs a default java-like entity name.
|
java.lang.String |
getExternalName(java.lang.String name) |
java.lang.String |
getInternalName(java.lang.String name) |
java.lang.String |
getItemLabel(java.lang.String objectName,
java.lang.String otherName)
Returns the label for the item in the shuttle picker that should be
displayed for an item representing an object (e.g.
|
java.lang.String |
getNameLabel() |
void |
validateName(java.lang.String type,
java.lang.String name)
Validates the given name entered by the user and throws an Exception if
it isn't valid.
|
public java.lang.String getNameLabel()
public boolean canHaveDuplicateNames()
public void validateName(java.lang.String type, java.lang.String name) throws InvalidNameException
InvalidNameException
- if the name is invalid. The message should
detail why it is invalid.public java.lang.String getDefaultName(java.lang.String type, java.lang.String objName)
By default this method produces an init-capped version of the database object name.
type
- - the object type that we're dealing withobjName
- - the object name we're creating a default frompublic java.lang.String getInternalName(java.lang.String name)
public java.lang.String getExternalName(java.lang.String name)
public java.lang.String getItemLabel(java.lang.String objectName, java.lang.String otherName)
objectName
- the name of the real database object chosenotherName
- the extra name provided by the user through the text
fieldpublic static final java.lang.String getEntityName(java.lang.String databaseName)
databaseName
- the database object name to convert.