org.infoglue.cms.util
Class AccessConstraintExceptionBuffer

java.lang.Object
  |
  +--org.infoglue.cms.util.ConstraintExceptionBuffer
        |
        +--org.infoglue.cms.util.AccessConstraintExceptionBuffer

public class AccessConstraintExceptionBuffer
extends ConstraintExceptionBuffer

An extension of the ConstraintExceptionBuffer to handle access control.


Constructor Summary
AccessConstraintExceptionBuffer()
          Constructs a ConstraintExceptionBuffer with no exceptions in it.
 
Method Summary
 void add(AccessConstraintException exception)
          Adds the specified exception to the exceptions of this buffer.
 void throwIfNotEmpty()
          Throws the root exception; if this buffer contains no exceptions, nothing happens.
 AccessConstraintException toAccessConstraintException()
          Converts the exceptions of this buffer to chained constraint exceptions.
 
Methods inherited from class org.infoglue.cms.util.ConstraintExceptionBuffer
add, add, equals, hashCode, isEmpty, toConstraintException, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessConstraintExceptionBuffer

public AccessConstraintExceptionBuffer()
Constructs a ConstraintExceptionBuffer with no exceptions in it.

Method Detail

add

public final void add(AccessConstraintException exception)
Adds the specified exception to the exceptions of this buffer. Any duplicate (ConstraintException.equals()) will be silently discarded.

Parameters:
exception - the exception to add (chained exceptions legal).

throwIfNotEmpty

public void throwIfNotEmpty()
                     throws AccessConstraintException
Throws the root exception; if this buffer contains no exceptions, nothing happens.

Overrides:
throwIfNotEmpty in class ConstraintExceptionBuffer
Throws:
ConstraintException - if this buffer contains any exceptions.
AccessConstraintException

toAccessConstraintException

public AccessConstraintException toAccessConstraintException()
Converts the exceptions of this buffer to chained constraint exceptions.

Returns:
the root exception of the chain.