com.arsdigita.util.parameter
Class EnumerationParameter

java.lang.Object
  extended bycom.arsdigita.util.parameter.AbstractParameter
      extended bycom.arsdigita.util.parameter.EnumerationParameter
All Implemented Interfaces:
Parameter

public class EnumerationParameter
extends AbstractParameter

Subject to change. A parameter that maps keys to values and, given a key, marshals or unmarshals to the corresponding value.

Version:
$Id: //core-platform/dev/src/com/arsdigita/util/parameter/EnumerationParameter.java#6 $
Author:
Justin Ross <jross@redhat.com>
See Also:
Parameter

Field Summary
static String versionId
           
 
Fields inherited from interface com.arsdigita.util.parameter.Parameter
OPTIONAL, REQUIRED
 
Constructor Summary
EnumerationParameter(String name)
           
EnumerationParameter(String name, int multiplicity, Object defaalt)
           
 
Method Summary
protected  String marshal(Object value)
          Converts value to a representative String, which is returned.
 void put(String name, Object value)
           
protected  Object unmarshal(String value, ErrorList errors)
          Converts a literal String value, value, to a Java object, which is returned.
 
Methods inherited from class com.arsdigita.util.parameter.AbstractParameter
doRead, doValidate, doWrite, getDefaultValue, getInfo, getName, isRequired, read, setInfo, toString, validate, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

EnumerationParameter

public EnumerationParameter(String name,
                            int multiplicity,
                            Object defaalt)

EnumerationParameter

public EnumerationParameter(String name)
Method Detail

put

public final void put(String name,
                      Object value)

unmarshal

protected Object unmarshal(String value,
                           ErrorList errors)
Description copied from class: AbstractParameter
Converts a literal String value, value, to a Java object, which is returned.

Overrides:
unmarshal in class AbstractParameter
Parameters:
value - The String value to convert from; it cannot be null
errors - An ErrorList that holds any errors encountered during unmarshaling; it cannot be null

marshal

protected String marshal(Object value)
Description copied from class: AbstractParameter
Converts value to a representative String, which is returned.

Overrides:
marshal in class AbstractParameter
Parameters:
value - The value to marshal; it may be null
Returns:
The String literal representation of value; it may be null


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC