org.mycore.datamodel.common
Class MCRActiveLinkException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.mycore.common.MCRCatchException
              extended by org.mycore.datamodel.common.MCRActiveLinkException
All Implemented Interfaces:
Serializable

public class MCRActiveLinkException
extends MCRCatchException

This exception holds information about a link condition that did not allow a certain action to be performed. As this exception does not extend RuntimeException it has to be caught for data integrity reasons.

Author:
Thomas Scheffler (yagee)
See Also:
Serialized Form

Field Summary
(package private)  Map<String,Collection<String>> linkTable
           
 
Constructor Summary
MCRActiveLinkException(String message)
           
MCRActiveLinkException(String message, Throwable cause)
           
 
Method Summary
 void addLink(String source, String dest)
          collects information on active links that do not permit a certain action on the repository.
 Map<String,Collection<String>> getActiveLinks()
           
 
Methods inherited from class org.mycore.common.MCRCatchException
getStackTraceAsString, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

linkTable

Map<String,Collection<String>> linkTable
Constructor Detail

MCRActiveLinkException

public MCRActiveLinkException(String message)
See Also:
MCRCatchException.MCRCatchException(String)

MCRActiveLinkException

public MCRActiveLinkException(String message,
                              Throwable cause)
See Also:
MCRCatchException.MCRCatchException(String, Throwable)
Method Detail

getActiveLinks

public Map<String,Collection<String>> getActiveLinks()
Returns:
a Hashtable with destinations (key) and List of sources (value)

addLink

public void addLink(String source,
                    String dest)
collects information on active links that do not permit a certain action on the repository.

Parameters:
source - the source of a link
dest - the destination of a link