com.sun.identity.policy
Class NameAlreadyExistsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sun.identity.policy.PolicyException
              extended by com.sun.identity.policy.NameAlreadyExistsException

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

Field Summary
 
Fields inherited from class com.sun.identity.policy.PolicyException
CONDITION_COLLECTION, ORGANIZATION, POLICY, REFERRAL_COLLECTION, REFERRAL_TYPE, RESPONSE_PROVIDER_COLLECTION, RULE, SERVICE, SUBJECT_TYPE, USER_COLLECTION
 
Constructor Summary
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.
 
Method Summary
 String getName()
          Gets the name that already exists.
 int getObjectType()
          Gets the type of object which encountered the invalid name.
 

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