org.opends.server.admin.client
Class OperationRejectedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.opends.server.types.OpenDsException
              extended by org.opends.server.admin.AdminException
                  extended by org.opends.server.admin.client.AdminClientException
                      extended by org.opends.server.admin.client.OperationRejectedException
All Implemented Interfaces:
java.io.Serializable

public class OperationRejectedException
extends AdminClientException

This exception is thrown when the client or server refuses to create, delete, or modify a managed object due to one or more constraints that cannot be satisfied.

Operations can be rejected either by a client-side constraint violation triggered by ClientConstraintHandler, or by a server-side error.

For example, the Directory Server might not be able perform an operation due to some OS related problem, such as lack of disk space, or missing files.

See Also:
Serialized Form

Nested Class Summary
static class OperationRejectedException.OperationType
          The type of operation that caused this exception.
 
Constructor Summary
OperationRejectedException(OperationRejectedException.OperationType type, Message ufn)
          Creates a new operation rejected exception with a default message.
OperationRejectedException(OperationRejectedException.OperationType type, Message ufn, java.util.Collection<Message> messages)
          Creates a new operation rejected exception with the provided messages.
OperationRejectedException(OperationRejectedException.OperationType type, Message ufn, Message message)
          Creates a new operation rejected exception with the provided message.
 
Method Summary
 java.util.Collection<Message> getMessages()
          Gets an unmodifiable collection view of the messages describing the constraint violations that occurred.
 Message getMessagesAsSingleMessage()
          Creates a single message listing all the messages combined into a single list separated by semi-colons.
 OperationRejectedException.OperationType getOperationType()
          Gets the type of operation that caused this exception.
 Message getUserFriendlyName()
          Gets the user friendly name of the component that caused this exception.
 
Methods inherited from class org.opends.server.types.OpenDsException
getMessageObject
 
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

OperationRejectedException

public OperationRejectedException(OperationRejectedException.OperationType type,
                                  Message ufn)
Creates a new operation rejected exception with a default message.

Parameters:
type - The type of operation that caused this exception.
ufn - The user friendly name of the component that caused this exception.

OperationRejectedException

public OperationRejectedException(OperationRejectedException.OperationType type,
                                  Message ufn,
                                  java.util.Collection<Message> messages)
Creates a new operation rejected exception with the provided messages.

Parameters:
type - The type of operation that caused this exception.
ufn - The user friendly name of the component that caused this exception.
messages - The messages describing the constraint violations that occurred (must be non-null and non-empty).

OperationRejectedException

public OperationRejectedException(OperationRejectedException.OperationType type,
                                  Message ufn,
                                  Message message)
Creates a new operation rejected exception with the provided message.

Parameters:
type - The type of operation that caused this exception.
ufn - The user friendly name of the component that caused this exception.
message - The message describing the constraint violation that occurred.
Method Detail

getMessages

public java.util.Collection<Message> getMessages()
Gets an unmodifiable collection view of the messages describing the constraint violations that occurred.

Returns:
Returns an unmodifiable collection view of the messages describing the constraint violations that occurred.

getMessagesAsSingleMessage

public Message getMessagesAsSingleMessage()
Creates a single message listing all the messages combined into a single list separated by semi-colons.

Returns:
Returns a single message listing all the messages combined into a single list separated by semi-colons.

getOperationType

public OperationRejectedException.OperationType getOperationType()
Gets the type of operation that caused this exception.

Returns:
Returns the type of operation that caused this exception.

getUserFriendlyName

public Message getUserFriendlyName()
Gets the user friendly name of the component that caused this exception.

Returns:
Returns the user friendly name of the component that caused this exception.