Package com.uc4.api
Class UC4ObjectName
java.lang.Object
com.uc4.api.UC4ObjectName
- Direct Known Subclasses:
UC4HostName
,UC4TimezoneName
,UC4UserName
This class represents the name of an object in the Automation Engine.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUC4ObjectName
(UC4ObjectName name) This constructor is required for creating copy of UC4ObjectNameUC4ObjectName
(String name) Constructs anUC4ObjectName
object using the specified name. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
containsVariable
(String val) Tests if the supplied name is the valid name of a Script Variableboolean
Returns the allowed characters of an object namegetName()
Returns the name or an empty string if the name is not set.int
hashCode()
boolean
isEmpty()
Tests if the name is empty.boolean
Tests if the supplied name would be a valid name for an object in the Automation Engine.toString()
-
Field Details
-
maxLength
protected int maxLength
-
-
Constructor Details
-
UC4ObjectName
Constructs anUC4ObjectName
object using the specified name. Trailing and leading spaces are removed. The parametername
is converted to upper case before the check starts. Ifname
is not a valid object name anInvalidUC4NameException
is thrown. An empty string is valid. In this case the methodisEmpty
returnstrue
.- Parameters:
name
- name- Throws:
InvalidUC4NameException
- if the name is not valid
-
UC4ObjectName
This constructor is required for creating copy of UC4ObjectName- Parameters:
name
-UC4ObjectName
-
-
Method Details
-
getName
Returns the name or an empty string if the name is not set.- Returns:
- name
-
isEmpty
public boolean isEmpty()Tests if the name is empty.- Returns:
true
if the name is an empty string
-
containsVariable
public boolean containsVariable()- Returns:
- true if the name contains a Script variable
-
containsVariable
Tests if the supplied name is the valid name of a Script Variable- Parameters:
val
- Name to be tested- Returns:
- true if the name is valid
-
isValid
Tests if the supplied name would be a valid name for an object in the Automation Engine. The test is case insensitive.- Parameters:
objectName
- Name to be tested- Returns:
- true if this is a valid name of an object
-
toString
-
hashCode
public int hashCode() -
equals
-
getAllowedChars
Returns the allowed characters of an object name- Returns:
- String containing allowed characters. NULL is never returned.
-