Package com.uc4.api

Class UC4ObjectName

  • Direct Known Subclasses:
    UC4HostName, UC4TimezoneName, UC4UserName

    public class UC4ObjectName
    extends java.lang.Object
    This class represents the name of an object in the Automation Engine.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int maxLength  
    • Constructor Summary

      Constructors 
      Constructor Description
      UC4ObjectName​(UC4ObjectName name)
      This constructor is required for creating copy of UC4ObjectName
      UC4ObjectName​(java.lang.String name)
      Constructs an UC4ObjectName object using the specified name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsVariable()  
      boolean containsVariable​(java.lang.String val)
      Tests if the supplied name is the valid name of a Script Variable
      boolean equals​(java.lang.Object obj)  
      java.lang.String getAllowedChars()
      Returns the allowed characters of an object name
      java.lang.String getName()
      Returns the name or an empty string if the name is not set.
      int hashCode()  
      boolean isEmpty()
      Tests if the name is empty.
      boolean isValid​(java.lang.String objectName)
      Tests if the supplied name would be a valid name for an object in the Automation Engine.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • maxLength

        protected int maxLength
    • Constructor Detail

      • UC4ObjectName

        public UC4ObjectName​(java.lang.String name)
        Constructs an UC4ObjectName object using the specified name. Trailing and leading spaces are removed. The parameter name is converted to upper case before the check starts. If name is not a valid object name an InvalidUC4NameException is thrown. An empty string is valid. In this case the method isEmpty returns true.
        Parameters:
        name - name
        Throws:
        InvalidUC4NameException - if the name is not valid
      • UC4ObjectName

        public UC4ObjectName​(UC4ObjectName name)
        This constructor is required for creating copy of UC4ObjectName
        Parameters:
        name - UC4ObjectName
    • Method Detail

      • getName

        public java.lang.String 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

        public boolean containsVariable​(java.lang.String val)
        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

        public boolean isValid​(java.lang.String objectName)
        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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getAllowedChars

        public java.lang.String getAllowedChars()
        Returns the allowed characters of an object name
        Returns:
        String containing allowed characters. NULL is never returned.