org.restlet.ext.wadl
Class ParameterInfo

java.lang.Object
  extended by org.restlet.ext.wadl.DocumentedInfo
      extended by org.restlet.ext.wadl.ParameterInfo

public class ParameterInfo
extends DocumentedInfo

Describes a parameterized aspect of a parent ResourceInfo, RequestInfo, ResponseInfo, RepresentationInfo or FaultInfo element.

Author:
Jerome Louvel

Constructor Summary
ParameterInfo()
          Constructor.
ParameterInfo(java.lang.String name, boolean required, java.lang.String type, ParameterStyle style, java.lang.String documentation)
          Constructor.
ParameterInfo(java.lang.String name, ParameterStyle style, DocumentationInfo documentation)
          Constructor with a single documentation element.
ParameterInfo(java.lang.String name, ParameterStyle style, java.util.List<DocumentationInfo> documentations)
          Constructor with a list of documentation elements.
ParameterInfo(java.lang.String name, ParameterStyle style, java.lang.String documentation)
          Constructor with a single documentation element.
 
Method Summary
 java.lang.String getDefaultValue()
          Returns the default value of this parameter.
 java.lang.String getFixed()
          Returns the fixed value for the parameter.
 java.lang.String getIdentifier()
          Returns the identifier of this parameter element.
 LinkInfo getLink()
          Returns the link element.
 java.lang.String getName()
          Returns the name of this element.
 java.util.List<OptionInfo> getOptions()
          Returns the list of option elements for that element.
 java.lang.String getPath()
          Returns the path to the value of this parameter (within a parent representation).
 ParameterStyle getStyle()
          Returns the parameter style.
 java.lang.String getType()
          Returns the parameter type.
 boolean isRepeating()
          Returns true if the parameter is single valued or may have multiple values, false otherwise.
 boolean isRequired()
          Indicates whether the parameter is required.
 void setDefaultValue(java.lang.String defaultValue)
          Sets the default value of this parameter.
 void setFixed(java.lang.String fixed)
          Sets the fixed value for the parameter.
 void setIdentifier(java.lang.String identifier)
          Sets the identifier of this parameter element.
 void setLink(LinkInfo link)
          Sets the link element.
 void setName(java.lang.String name)
          Sets the name of this element.
 void setOptions(java.util.List<OptionInfo> options)
          Sets the list of option elements for that element.
 void setPath(java.lang.String path)
          Sets the path to the value of this parameter (within a parent representation).
 void setRepeating(boolean repeating)
          Indicates whether the parameter is single valued or may have multiple values.
 void setRequired(boolean required)
          Indicates whether the parameter is required.
 void setStyle(ParameterStyle style)
          Sets the parameter style.
 void setType(java.lang.String type)
          Sets the parameter type.
 void updateNamespaces(java.util.Map<java.lang.String,java.lang.String> namespaces)
          Completes the given map of namespaces with the namespaces used in the documentation elements.
 void writeElement(XmlWriter writer)
          Writes the current object as an XML element using the given SAX writer.
 
Methods inherited from class org.restlet.ext.wadl.DocumentedInfo
getDocumentations, resolveNamespaces, setDocumentation, setDocumentation, setDocumentations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterInfo

public ParameterInfo()
Constructor.


ParameterInfo

public ParameterInfo(java.lang.String name,
                     ParameterStyle style,
                     DocumentationInfo documentation)
Constructor with a single documentation element.

Parameters:
name - The required name of the parameter.
style - The required style of the parameter.
documentation - A single documentation element.

ParameterInfo

public ParameterInfo(java.lang.String name,
                     ParameterStyle style,
                     java.util.List<DocumentationInfo> documentations)
Constructor with a list of documentation elements.

Parameters:
name - The required name of the parameter.
style - The required style of the parameter.
documentations - The list of documentation elements.

ParameterInfo

public ParameterInfo(java.lang.String name,
                     ParameterStyle style,
                     java.lang.String documentation)
Constructor with a single documentation element.

Parameters:
name - The required name of the parameter.
style - The required style of the parameter.
documentation - A single documentation element.

ParameterInfo

public ParameterInfo(java.lang.String name,
                     boolean required,
                     java.lang.String type,
                     ParameterStyle style,
                     java.lang.String documentation)
Constructor.

Parameters:
name - The name of the parameter.
required - True if thes parameter is required.
type - The type of the parameter.
style - The style of the parameter.
documentation - A single documentation element.
Method Detail

getDefaultValue

public java.lang.String getDefaultValue()
Returns the default value of this parameter.

Returns:
The default value of this parameter.

getFixed

public java.lang.String getFixed()
Returns the fixed value for the parameter.

Returns:
The fixed value for the parameter.

getIdentifier

public java.lang.String getIdentifier()
Returns the identifier of this parameter element.

Returns:
The identifier of this parameter element.

getLink

public LinkInfo getLink()
Returns the link element.

Returns:
The link element.

getName

public java.lang.String getName()
Returns the name of this element.

Returns:
The name of this element.

getOptions

public java.util.List<OptionInfo> getOptions()
Returns the list of option elements for that element.

Returns:
The list of option elements for that element.

getPath

public java.lang.String getPath()
Returns the path to the value of this parameter (within a parent representation).

Returns:
The path to the value of this parameter (within a parent representation).

getStyle

public ParameterStyle getStyle()
Returns the parameter style.

Returns:
The parameter style.

getType

public java.lang.String getType()
Returns the parameter type.

Returns:
The parameter type.

isRepeating

public boolean isRepeating()
Returns true if the parameter is single valued or may have multiple values, false otherwise.

Returns:
True if the parameter is single valued or may have multiple values, false otherwise.

isRequired

public boolean isRequired()
Indicates whether the parameter is required.

Returns:
True if the parameter is required, false otherwise.

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Sets the default value of this parameter.

Parameters:
defaultValue - The default value of this parameter.

setFixed

public void setFixed(java.lang.String fixed)
Sets the fixed value for the parameter.

Parameters:
fixed - The fixed value for the parameter.

setIdentifier

public void setIdentifier(java.lang.String identifier)
Sets the identifier of this parameter element.

Parameters:
identifier - The identifier of this parameter element.

setLink

public void setLink(LinkInfo link)
Sets the link element.

Parameters:
link - The link element.

setName

public void setName(java.lang.String name)
Sets the name of this element.

Parameters:
name - The name of this element.

setOptions

public void setOptions(java.util.List<OptionInfo> options)
Sets the list of option elements for that element.

Parameters:
options - The list of option elements for that element.

setPath

public void setPath(java.lang.String path)
Sets the path to the value of this parameter (within a parent representation).

Parameters:
path - The path to the value of this parameter (within a parent representation).

setRepeating

public void setRepeating(boolean repeating)
Indicates whether the parameter is single valued or may have multiple values.

Parameters:
repeating - True if the parameter is single valued or may have multiple values, false otherwise.

setRequired

public void setRequired(boolean required)
Indicates whether the parameter is required.

Parameters:
required - True if the parameter is required, false otherwise.

setStyle

public void setStyle(ParameterStyle style)
Sets the parameter style.

Parameters:
style - The parameter style.

setType

public void setType(java.lang.String type)
Sets the parameter type.

Parameters:
type - The parameter type.

updateNamespaces

public void updateNamespaces(java.util.Map<java.lang.String,java.lang.String> namespaces)
Description copied from class: DocumentedInfo
Completes the given map of namespaces with the namespaces used in the documentation elements. The key is the URI of the namespace and the value, the prefix.

Specified by:
updateNamespaces in class DocumentedInfo
Parameters:
namespaces - The given map of namespaces to complete.

writeElement

public void writeElement(XmlWriter writer)
                  throws org.xml.sax.SAXException
Writes the current object as an XML element using the given SAX writer.

Parameters:
writer - The SAX writer.
Throws:
org.xml.sax.SAXException


Copyright © 2005-2008 Noelios Technologies.