org.kuali.rice.krad.data.provider.annotation
Enum SerializationContext

java.lang.Object
  extended by java.lang.Enum<SerializationContext>
      extended by org.kuali.rice.krad.data.provider.annotation.SerializationContext
All Implemented Interfaces:
Serializable, Comparable<SerializationContext>

public enum SerializationContext
extends Enum<SerializationContext>

Defines different context(s) for serialization in Rice.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Enum Constant Summary
ALL
          Matches all the other contexts defined in SerializationContext.
MAINTENANCE
          The context for serializing within the maintenance document framework.
 
Method Summary
 boolean matches(SerializationContext[] serializationContexts)
          Does the given array of serializationContexts match this one?
static SerializationContext valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SerializationContext[] 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

ALL

public static final SerializationContext ALL
Matches all the other contexts defined in SerializationContext.


MAINTENANCE

public static final SerializationContext MAINTENANCE
The context for serializing within the maintenance document framework.

Method Detail

values

public static SerializationContext[] 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 (SerializationContext c : SerializationContext.values())
    System.out.println(c);

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

valueOf

public static SerializationContext 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

matches

public boolean matches(SerializationContext[] serializationContexts)
Does the given array of serializationContexts match this one?

Either an exact match, or SerializationContext.ALL will suffice

Parameters:
serializationContexts - the serializationContexts to test against
Returns:
true if there is a matching context


Copyright © 2005–2015 The Kuali Foundation. All rights reserved.