org.openmrs.api
Class ConceptsLockedException

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.ConceptsLockedException
All Implemented Interfaces:
java.io.Serializable

public class ConceptsLockedException
extends APIException

This exception is thrown when a specific implementation has chosen to lock down their concepts and prevent editing. Currently this is simply done through a global property being true/false. Any call that will manipulate a concept or concept_* table should throw this.

See Also:
OpenmrsConstants.GLOBAL_PROPERTY_CONCEPTS_LOCKED, ConceptService.checkIfLocked(), ConceptService.saveConcept(org.openmrs.Concept), Serialized Form

Constructor Summary
ConceptsLockedException()
          Generic constructor that gives a normal message about editing not being allowed to the user.
ConceptsLockedException(java.lang.String message)
          Convenience constructor to give the user a message other than normal default one
ConceptsLockedException(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.
ConceptsLockedException(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

ConceptsLockedException

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


ConceptsLockedException

public ConceptsLockedException(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

ConceptsLockedException

public ConceptsLockedException(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

ConceptsLockedException

public ConceptsLockedException(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 ConceptsLockedException(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