edu.nrao.sss.validation
Enum ValidationPurpose

java.lang.Object
  extended by java.lang.Enum<ValidationPurpose>
      extended by edu.nrao.sss.validation.ValidationPurpose
All Implemented Interfaces:
Serializable, Comparable<ValidationPurpose>

public enum ValidationPurpose
extends Enum<ValidationPurpose>

The reason why an object is to be validated.

Version Info:

$Revision: 329 $
$Date: 2007-02-06 11:43:05 -0700 (Tue, 06 Feb 2007) $
$Author: dharland $

Since:
2007-02-02
Author:
David M. Harland

Enum Constant Summary
CERTIFY_READY_TO_USE
          Indicates that the strictest possible validation is performed.
SAVE_IN_REPOSITORY
          Indicates that the client wishes to cease work on an object and store it somewhere for later recall.
 
Method Summary
static ValidationPurpose valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ValidationPurpose[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CERTIFY_READY_TO_USE

public static final ValidationPurpose CERTIFY_READY_TO_USE
Indicates that the strictest possible validation is performed. In this case the client is indicating that an object is fully formed and ready for use, and wishes validation to ensure that the object is properly formed.


SAVE_IN_REPOSITORY

public static final ValidationPurpose SAVE_IN_REPOSITORY
Indicates that the client wishes to cease work on an object and store it somewhere for later recall. The client may or may not have fully formed the object. The validation performed in this situation will not treat an incomplete object as dangerously flawed.

Method Detail

values

public static ValidationPurpose[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ValidationPurpose c : ValidationPurpose.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ValidationPurpose valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2009. All Rights Reserved.