org.tmapi.core
Class TopicsMustMergeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.tmapi.core.TMAPIRuntimeException
                  extended byorg.tmapi.core.MergeException
                      extended byorg.tmapi.core.TopicsMustMergeException
All Implemented Interfaces:
java.io.Serializable

public class TopicsMustMergeException
extends MergeException

Exception raised when a Topic is changed in such a way that it would have to be merged with another Topic in the same TopicMap. This exception should only be thrown if the "Automatic Merging" feature ( http://tmapi.org/features/automerge) is disabled. If automatic merging is enabled, then the merge should take place transparently to the API user.

If an implementation throws this exception, then the property change which caused the exception to be raised MUST NOT be completed.

See Also:
Serialized Form

Constructor Summary
TopicsMustMergeException(Topic modified, Topic unmodified, java.lang.String msg)
          Creates a new TopicMustMergeException with the specified message
 
Method Summary
 Topic getModifiedTopic()
          Returns the Topic which was changed in the operation that raised this exception.
 Topic getUnmodifiedTopic()
          Returns the Topic which was unchanged in the operation that raised this exception.
 
Methods inherited from class org.tmapi.core.TMAPIRuntimeException
getCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, 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

TopicsMustMergeException

public TopicsMustMergeException(Topic modified,
                                Topic unmodified,
                                java.lang.String msg)
Creates a new TopicMustMergeException with the specified message

Parameters:
modified - the Topic which was modified by the operation that raised this exception
unmodified - the Topic which was not modified by the operation that raised this exception
msg - the message for this exception
Method Detail

getUnmodifiedTopic

public Topic getUnmodifiedTopic()
Returns the Topic which was unchanged in the operation that raised this exception.

Returns:
a Topic instance

getModifiedTopic

public Topic getModifiedTopic()
Returns the Topic which was changed in the operation that raised this exception.

Returns:
a Topic instance