de.twenty11.skysail.server.restlet
Class ParameterInfo

java.lang.Object
  extended by de.twenty11.skysail.server.restlet.DocumentedInfo
      extended by de.twenty11.skysail.server.restlet.ParameterInfo

public class ParameterInfo
extends DocumentedInfo


Constructor Summary
ParameterInfo()
          Constructor.
ParameterInfo(String name, boolean required, String type, ParameterStyle style, String documentation)
          Constructor.
ParameterInfo(String name, ParameterStyle style, DocumentationInfo documentation)
          Constructor with a single documentation element.
ParameterInfo(String name, ParameterStyle style, List<DocumentationInfo> documentations)
          Constructor with a list of documentation elements.
ParameterInfo(String name, ParameterStyle style, String documentation)
          Constructor with a single documentation element.
 
Method Summary
 String getDefaultValue()
          Returns the default value of this parameter.
 String getFixed()
          Returns the fixed value for the parameter.
 String getIdentifier()
          Returns the identifier of this parameter element.
 String getName()
          Returns the name of this element.
 String getPath()
          Returns the path to the value of this parameter (within a parent representation).
 ParameterStyle getStyle()
          Returns the parameter style.
 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(String defaultValue)
          Sets the default value of this parameter.
 void setFixed(String fixed)
          Sets the fixed value for the parameter.
 void setIdentifier(String identifier)
          Sets the identifier of this parameter element.
 void setName(String name)
          Sets the name of this element.
 void setPath(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(String type)
          Sets the parameter type.
 String toString()
           
 void updateNamespaces(Map<String,String> namespaces)
          Completes the given map of namespaces with the namespaces used in the documentation elements.
 
Methods inherited from class de.twenty11.skysail.server.restlet.DocumentedInfo
getDocumentations, resolveNamespaces, setDocumentation, setDocumentation, setDocumentations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterInfo

public ParameterInfo()
Constructor.


ParameterInfo

public ParameterInfo(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(String name,
                     ParameterStyle style,
                     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(String name,
                     ParameterStyle style,
                     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(String name,
                     boolean required,
                     String type,
                     ParameterStyle style,
                     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

toString

public String toString()
Overrides:
toString in class Object

getDefaultValue

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

Returns:
The default value of this parameter.

getFixed

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

Returns:
The fixed value for the parameter.

getIdentifier

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

Returns:
The identifier of this parameter element.

getName

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

Returns:
The name of this element.

getPath

public 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 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(String defaultValue)
Sets the default value of this parameter.

Parameters:
defaultValue - The default value of this parameter.

setFixed

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

Parameters:
fixed - The fixed value for the parameter.

setIdentifier

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

Parameters:
identifier - The identifier of this parameter element.

setName

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

Parameters:
name - The name of this element.

setPath

public void setPath(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(String type)
Sets the parameter type.

Parameters:
type - The parameter type.

updateNamespaces

public void updateNamespaces(Map<String,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.


Copyright © 2011-2013. All Rights Reserved.