Package com.uc4.api

Class InvalidUC4NameException

  • All Implemented Interfaces:
    java.io.Serializable

    public class InvalidUC4NameException
    extends java.lang.RuntimeException
    This runtime exception is thrown if the name of an object is invalid. The getInvalidName() method returns and the invalid name.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      InvalidUC4NameException​(java.lang.String invalidName)
      Constructs an InvalidUC4NameException using the specified name.
      InvalidUC4NameException​(java.lang.String invalidName, java.lang.String allowedCharacters, int maxLength)
      Constructs an InvalidUC4NameException using the specified name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAllowedCharacters()
      Returns the allowed characters.
      java.lang.String getInvalidName()
      Returns the invalid name.
      int getMaxLength()
      Returns the maximal allowed length of the name or zero if no restriction is set.
      java.lang.String getMessage()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • InvalidUC4NameException

        public InvalidUC4NameException​(java.lang.String invalidName)
        Constructs an InvalidUC4NameException using the specified name.
        Parameters:
        invalidName - name
      • InvalidUC4NameException

        public InvalidUC4NameException​(java.lang.String invalidName,
                                       java.lang.String allowedCharacters,
                                       int maxLength)
        Constructs an InvalidUC4NameException using the specified name.
        Parameters:
        invalidName - name
        allowedCharacters - allowed characters, use empty string if all characters are allowed
        maxLength - maximal allowed length, use 0 if no length restriction is given
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
      • getInvalidName

        public java.lang.String getInvalidName()
        Returns the invalid name.
        Returns:
        name
      • getAllowedCharacters

        public java.lang.String getAllowedCharacters()
        Returns the allowed characters. Empty if no restriction is set.
        Returns:
        allowed characters
      • getMaxLength

        public int getMaxLength()
        Returns the maximal allowed length of the name or zero if no restriction is set.
        Returns:
        length