org.tmapi.core
Class IdentityConstraintException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.tmapi.core.TMAPIRuntimeException
                  extended by org.tmapi.core.ModelConstraintException
                      extended by org.tmapi.core.IdentityConstraintException
All Implemented Interfaces:
java.io.Serializable

public class IdentityConstraintException
extends ModelConstraintException

This exception is used to report identity constraint violations. Assigning an item identifier, a subject identifier, or a subject locator to different objects causes an IdentityConstraintException to be thrown.

Version:
$Rev: 33 $ - $Date: 2008-08-02 16:42:29 +0200 (Sa, 02 Aug 2008) $
Author:
The TMAPI Project
See Also:
Serialized Form

Constructor Summary
IdentityConstraintException(Construct reporter, Construct existing, Locator locator, java.lang.String msg)
          Creates a new IdentityConstraintException with the specified message.
 
Method Summary
 Construct getExisting()
          Returns the Construct which already has the identity represented by the locator getLocator().
 Locator getLocator()
          Returns the locator representing the identity that caused the exception.
 
Methods inherited from class org.tmapi.core.ModelConstraintException
getReporter
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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

IdentityConstraintException

public IdentityConstraintException(Construct reporter,
                                   Construct existing,
                                   Locator locator,
                                   java.lang.String msg)
Creates a new IdentityConstraintException with the specified message.

Parameters:
reporter - The construct to which the identity should have been assigned to. In case a factory method has thrown this exception, the construct which provides the factory method.
existing - The construct which has the same identity.
locator - The locator representing the identity.
msg - The detail message.
Method Detail

getExisting

public Construct getExisting()
Returns the Construct which already has the identity represented by the locator getLocator().

Returns:
The existing construct.

getLocator

public Locator getLocator()
Returns the locator representing the identity that caused the exception.

Returns:
A locator representing the identity which has caused the exception.