org.openmrs.api
Class ConceptInUseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.openmrs.api.APIException
                  extended by org.openmrs.api.ConceptInUseException
All Implemented Interfaces:
java.io.Serializable

public class ConceptInUseException
extends APIException

This exception is thrown when concept is used/attached to an observation.

Since:
Version 1.7
See Also:
ConceptService#checkIfConceptIsAttachedToAnObservation(), ConceptService.saveConcept(org.openmrs.Concept), Serialized Form

Constructor Summary
ConceptInUseException()
          Generic constructor that gives a normal message about editing not being allowed to the user.
ConceptInUseException(java.lang.String message)
          Convenience constructor to give the user a message other than normal default one
ConceptInUseException(java.lang.String message, java.lang.Throwable cause)
          Convenience constructor to give the user a message other than the normal one and to chain this exception with a parent exception.
ConceptInUseException(java.lang.Throwable cause)
          Convenience constructor used to only set the parent exception to chain with.
 
Method Summary
 
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

ConceptInUseException

public ConceptInUseException()
Generic constructor that gives a normal message about editing not being allowed to the user.


ConceptInUseException

public ConceptInUseException(java.lang.String message)
Convenience constructor to give the user a message other than normal default one

Parameters:
message - the String to show to the user as to why the concepts are locked

ConceptInUseException

public ConceptInUseException(java.lang.String message,
                             java.lang.Throwable cause)
Convenience constructor to give the user a message other than the normal one and to chain this exception with a parent exception.

Parameters:
message - the String to show to the user as to why the concepts are locked
cause - the parent exception

ConceptInUseException

public ConceptInUseException(java.lang.Throwable cause)
Convenience constructor used to only set the parent exception to chain with. This does not set the error message for the user as to why an exception is being thrown. The ConceptInUseException(String, Throwable) constructor is preferred over this one.

Parameters:
cause - the parent exception

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change