atg.nucleus.naming
Class ParameterName

java.lang.Object
  extended by atg.nucleus.naming.ParameterName

public class ParameterName
extends java.lang.Object

A ParameterName object can represent any parameter name used in Dynamo. Use this class when building your own droplets to create unique parameter names. The parameter names will then be stored in a global hashtable keyed by strings. Using this class allows the parameters of a droplet to be publicly available (for example, to the Workbench) as well as enforcing good coding standards whereby the parameter name string only appears once in the java code.

To get the unique ParameterName for a given String call the static getParameterName() method. This method will look the given string up in the hashtable of parameter names and either return the value or create a new one with the string that was passed in. For example, you might have the following code :

public final static ParameterName EMPTY = ParameterName.getParamterName("empty");

Then, every time you wish to reference that parameter name, you would reference EMPTY as in the following piece of code :

request.serviceLocalParameter(EMPTY, request, response);


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 java.lang.Object[] getDimensions()
          Retrieve the dimensions of this parameter name.
 java.lang.String getName()
          Return the full name of this component
 ParameterName getNameWithoutDimensions()
          If the name has dimensions this returns the name without dimensions
static ParameterName getParameterName(java.lang.String pName)
          Looks up a ParameterName, or creates a new one using this string and adds it to the hashtable of parameter names.
 int getStackCount()
          How many .'s were at the beginning of this component name
 ParameterName[] getSubNames()
          Get the sub names for this component.
 boolean hasDimensions()
          Does this parameter name have array dimensions (delimmitted by "[" and "]")?
 boolean hasSubNames()
          Does this component name have subnames (delimmitted by ".")?
 java.lang.String toString()
          toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Method Detail

getParameterName

public static ParameterName getParameterName(java.lang.String pName)
Looks up a ParameterName, or creates a new one using this string and adds it to the hashtable of parameter names.

Parameters:
pName - the name/string to look up or create.

getName

public java.lang.String getName()
Return the full name of this component


hasSubNames

public boolean hasSubNames()
Does this component name have subnames (delimmitted by ".")?


getSubNames

public ParameterName[] getSubNames()
Get the sub names for this component. null will be returned if there are no sub-names


getStackCount

public int getStackCount()
How many .'s were at the beginning of this component name


getNameWithoutDimensions

public ParameterName getNameWithoutDimensions()
If the name has dimensions this returns the name without dimensions


hasDimensions

public boolean hasDimensions()
Does this parameter name have array dimensions (delimmitted by "[" and "]")?


getDimensions

public java.lang.Object[] getDimensions()
Retrieve the dimensions of this parameter name. If there are no dimensions null will be returned.


toString

public java.lang.String toString()
toString()

Overrides:
toString in class java.lang.Object