Class NameAlreadyExistsException

  • All Implemented Interfaces:
    L10NMessage, Serializable

    public class NameAlreadyExistsException
    extends PolicyException
    Exception thrown if a name of an object such as policy, rule or referral already exists (used by another object of the same type)
    See Also:
    Serialized Form
    • Constructor Detail

      • NameAlreadyExistsException

        public NameAlreadyExistsException​(String msg,
                                          String name,
                                          int type)
        Constructs a NameAlreadyExistsException instance.
        Parameters:
        msg - exception message
        name - name that already exists
        type - type of object whose name already exist
      • NameAlreadyExistsException

        public NameAlreadyExistsException​(String rbName,
                                          String errorCode,
                                          Object[] args,
                                          String name,
                                          int type)
        Constructs a NameAlreadyExistsException instance. With localized error message
        Parameters:
        rbName - Resource bundle name
        errorCode - error code to use access the resource bundle
        args - parameters for message formatting
        name - name that already exists
        type - type of object whose name already exist
      • NameAlreadyExistsException

        public NameAlreadyExistsException​(String rbName,
                                          String errorCode,
                                          Object[] args,
                                          Throwable t,
                                          String name,
                                          int type)
        Constructs a NameAlreadyExistsException instance. With localized error message
        Parameters:
        rbName - Resource bundle name
        errorCode - error code to use access the resource bundle
        args - parameters for message formatting
        t - nested root cause exception
        name - name that already exists
        type - type of object whose name already exist
      • NameAlreadyExistsException

        public NameAlreadyExistsException​(Throwable t,
                                          String name,
                                          int type)
        Constructs a NameAlreadyExistsException instance.
        Parameters:
        t - nested root cause exception
        name - name that already exists
        type - type of object whose name already exist
    • Method Detail

      • getName

        public String getName()
        Gets the name that already exists.
        Returns:
        name that already exists
      • getObjectType

        public int getObjectType()
        Gets the type of object which encountered the invalid name. The defined objects are POLICY, RULE, ORGANIZATION, USER_COLLECTION RESPONSE_PROVIDER_COLLECTION CONDITION_COLLECTION REFERRAL_COLLECTION REFERRAL_TYPE SUBJECT_TYPE and SERVICE
        Returns:
        type of object that already exists
      • getMessage

        public String getMessage()
        Gets messages of the exceptions including the chained exceptions
        Specified by:
        getMessage in interface L10NMessage
        Overrides:
        getMessage in class Throwable
        Returns:
        messages of the exceptions including chained exceptions. The returned string is formed by concatenating messages of all the exceptions, with a new line separator, starting from this exception, all the way to the root exception, by following the chained exceptions.
      • printStackTrace

        public void printStackTrace()
        Prints the stack trace of the root exception to standard error stream. Also prints the messages of all the exceptions starting from top exception to the root exception, at the top of stack trace
        Overrides:
        printStackTrace in class Throwable
      • printStackTrace

        public void printStackTrace​(PrintWriter pw)
        Prints the stack trace of the root exception to a PrintWriter Also prints the messages of all the exceptions starting from top exception to the root exception, at the top of stack trace
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        pw - PrintWriter to which to print the stack trace
      • printStackTrace

        public void printStackTrace​(PrintStream ps)
        Prints the stack trace of the root exception to a PrintStream Also prints the messages of all the exceptions starting from top exception to the root exception, at the top of stack trace
        Overrides:
        printStackTrace in class Throwable
        Parameters:
        ps - PrintStream to which to print the stack trace
      • getNestedException

        public Throwable getNestedException()