public class NameAlreadyExistsException extends PolicyException
CONDITION_COLLECTION, ORGANIZATION, POLICY, REFERRAL_COLLECTION, REFERRAL_TYPE, RESPONSE_PROVIDER_COLLECTION, RULE, SERVICE, SUBJECT_TYPE, USER_COLLECTION
Constructor and Description |
---|
NameAlreadyExistsException(String msg,
String name,
int type)
Constructs a
NameAlreadyExistsException instance. |
NameAlreadyExistsException(String rbName,
String errorCode,
Object[] args,
String name,
int type)
Constructs a
NameAlreadyExistsException instance. |
NameAlreadyExistsException(String rbName,
String errorCode,
Object[] args,
Throwable t,
String name,
int type)
Constructs a
NameAlreadyExistsException instance. |
NameAlreadyExistsException(Throwable t,
String name,
int type)
Constructs a
NameAlreadyExistsException instance. |
Modifier and Type | Method and Description |
---|---|
String |
getCompleteL10NMessage(Locale locale) |
String |
getErrorCode()
Use this method to chain this exception with another to get localized
error messge use getL10NMessage method
|
String |
getL10NMessage(Locale locale)
Use this method to get localized error message directly.
|
String |
getMessage()
Gets messages of the exceptions including the chained exceptions
|
Object[] |
getMessageArgs()
Use this method to chain this exception with another to get localized
error messge use getL10NMessage method
|
String |
getName()
Gets the name that already exists.
|
Throwable |
getNestedException() |
int |
getObjectType()
Gets the type of object which encountered
the invalid name.
|
String |
getResourceBundleName()
Use this method to chain this exception with another to get localized
error messge use getL10NMessage method
|
void |
printStackTrace()
Prints the stack trace of the root exception to standard error
stream.
|
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
|
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
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public NameAlreadyExistsException(String msg, String name, int type)
NameAlreadyExistsException
instance.msg
- exception messagename
- name that already existstype
- type of object whose name already existpublic NameAlreadyExistsException(String rbName, String errorCode, Object[] args, String name, int type)
NameAlreadyExistsException
instance.
With localized error messagerbName
- Resource bundle nameerrorCode
- error code to use access the resource bundleargs
- parameters for message formattingname
- name that already existstype
- type of object whose name already existpublic NameAlreadyExistsException(String rbName, String errorCode, Object[] args, Throwable t, String name, int type)
NameAlreadyExistsException
instance.
With localized error messagerbName
- Resource bundle nameerrorCode
- error code to use access the resource bundleargs
- parameters for message formattingt
- nested root cause exceptionname
- name that already existstype
- type of object whose name already existpublic String getName()
public int getObjectType()
POLICY
,
RULE
, ORGANIZATION
,
USER_COLLECTION
RESPONSE_PROVIDER_COLLECTION
CONDITION_COLLECTION
REFERRAL_COLLECTION
REFERRAL_TYPE
SUBJECT_TYPE
and SERVICE
public String getL10NMessage(Locale locale)
L10NMessage
getL10NMessage
in interface L10NMessage
locale
- Locale
to be used.ChainedException(String, String, Object[], Throwable)
public String getCompleteL10NMessage(Locale locale)
locale
- Locale
to be used.ChainedException(String, String, Object[], Throwable)
public String getResourceBundleName()
L10NMessage
getResourceBundleName
in interface L10NMessage
ChainedException(String, String, Object[], Throwable)
,
- to get localized error message.
public String getErrorCode()
L10NMessage
getErrorCode
in interface L10NMessage
ChainedException(String, String, Object[], Throwable)
,
- to get localized error message.
public Object[] getMessageArgs()
L10NMessage
getMessageArgs
in interface L10NMessage
MessageFormat
class to format the message
It can be null.ChainedException(String, String, Object[], Throwable)
,
- to get localized error message.
public String getMessage()
getMessage
in interface L10NMessage
getMessage
in class Throwable
public void printStackTrace()
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter pw)
printStackTrace
in class Throwable
pw
- PrintWriter to which to print the stack tracepublic void printStackTrace(PrintStream ps)
printStackTrace
in class Throwable
ps
- PrintStream to which to print the stack tracepublic Throwable getNestedException()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.