Class EntityException

  • All Implemented Interfaces:
    Serializable

    public class EntityException
    extends Exception
    The EntityException is thrown whenever an error is is encountered while performing an operation on the data store.
    See Also:
    Serialized Form
    • Constructor Detail

      • EntityException

        public EntityException​(String msg,
                               String errorCode)
        Constructs a new EntityException with detailed message.
        Parameters:
        msg - The detailed message
        errorCode - Matches the appropriate entry in amProfile.properties.
      • EntityException

        public EntityException​(String msg,
                               String errorCode,
                               Object[] args)
        Constructs a new EntityException with detailed message.
        Parameters:
        msg - The detailed message
        errorCode - Matches the appropriate entry in amProfile.properties
        args - if the error message needs specific values to be set
    • Method Detail

      • getErrorCode

        public String getErrorCode()
        Method to obtain the error code. This error code can be used with the arguments to construct a localized message.
        Returns:
        the error code which can be used to map the message to a user specific locale.
      • getMessageArgs

        public Object[] getMessageArgs()
        Method to obtain the arguments corresponding to the error code.
        Returns:
        the arguments corresponding to the error code or null if no arguments are need to construct the message
      • getMessage

        public String getMessage()
        Overriding the default getMessage() method of super class Exception.
        Overrides:
        getMessage in class Throwable
        Returns:
        The error message string
      • getLDAPErrorCode

        public String getLDAPErrorCode()
        Method to obtain the LDAP error code.
        Returns:
        The error code, which can be used to map the message to a specific locale. returns a null, if not an LDAP error