/********************************************************************
* API for Servlets and SignatureGenerators in RAP
*  enabling extensible behaviors for RAP Digital Objects
* RAP - Repository Access Protocol
********************************************************************/
package ServletAPI;

/**
 * A ParameterDescription is used to describe each parameter in a 
 * MethodSignature.  In the context of a MethodSignature, each 
 * parameter has a name, a type, a free text descriptor, and 
 * a domain of allowable values (possibly empty).
 *
 * Note that in the context of a MethodSignature, the parameter does
 * not have a value.  A value is only needed at runtime by the Servlet.
 *
 * @author Christophe Blanchi
 * @author Sandy Payette
 * @author Naomi Dushay
 **/
public class ParameterDescription
{
    /**
     * the parameter's name
     **/
    public String name;

    /**
     * the parameter's type, expressed as a java Class
     * note:  this is expressed as a TypeCode in the IDL
     **/
    public Class type;

    /**
     * a description of the parameter
     **/
    public String descriptor;

    /**
     * the domain is used to indicate allowable parameter values
     * as defined by the community creating the TypeSignature.  This
     * domain of values has a notion of fixity:  it will not vary
     * for the life of the TypeSignature, nor with implementations
     * of the TypeSignature (i.e. Servlets)
     * 
     * the domain should be empty when no such allowable list of
     * parameters is defined.
     *
     * Example:  for "GetDCField(element)", the list of DC elements
     **/
    public Domain[] domain;

    public ParameterDescription(
        String name,
        Class type,
        String descriptor,
        Domain[] domain)
    {
        this.name = name;
        this.type = type;
        this.descriptor = descriptor;
        this.domain = domain;
    }
}