public class ParameterInfo extends DocumentedInfo
ResourceInfo
,
RequestInfo
, ResponseInfo
or RepresentationInfo
element.Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
LinkInfo |
getLink()
Returns the link element.
|
String |
getName()
Returns the name of this element.
|
List<OptionInfo> |
getOptions()
Returns the list of option elements for that 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 |
setLink(LinkInfo link)
Sets the link element.
|
void |
setName(String name)
Sets the name of this element.
|
void |
setOptions(List<OptionInfo> options)
Sets the list of option elements for that 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.
|
void |
updateNamespaces(Map<String,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.
|
getDocumentations, resolveNamespaces, setDocumentation, setDocumentation, setDocumentations
public ParameterInfo()
public ParameterInfo(String name, ParameterStyle style, DocumentationInfo documentation)
name
- The required name of the parameter.style
- The required style of the parameter.documentation
- A single documentation element.public ParameterInfo(String name, ParameterStyle style, List<DocumentationInfo> documentations)
name
- The required name of the parameter.style
- The required style of the parameter.documentations
- The list of documentation elements.public ParameterInfo(String name, ParameterStyle style, String documentation)
name
- The required name of the parameter.style
- The required style of the parameter.documentation
- A single documentation element.public ParameterInfo(String name, boolean required, String type, ParameterStyle style, String documentation)
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.public String getDefaultValue()
public String getFixed()
public String getIdentifier()
public LinkInfo getLink()
public String getName()
public List<OptionInfo> getOptions()
public String getPath()
public ParameterStyle getStyle()
public String getType()
public boolean isRepeating()
public boolean isRequired()
public void setDefaultValue(String defaultValue)
defaultValue
- The default value of this parameter.public void setFixed(String fixed)
fixed
- The fixed value for the parameter.public void setIdentifier(String identifier)
identifier
- The identifier of this parameter element.public void setLink(LinkInfo link)
link
- The link element.public void setName(String name)
name
- The name of this element.public void setOptions(List<OptionInfo> options)
options
- The list of option elements for that element.public void setPath(String path)
path
- The path to the value of this parameter (within a parent
representation).public void setRepeating(boolean repeating)
repeating
- True if the parameter is single valued or may have multiple
values, false otherwise.public void setRequired(boolean required)
required
- True if the parameter is required, false otherwise.public void setStyle(ParameterStyle style)
style
- The parameter style.public void setType(String type)
type
- The parameter type.public void updateNamespaces(Map<String,String> namespaces)
DocumentedInfo
updateNamespaces
in class DocumentedInfo
namespaces
- The given map of namespaces to complete.public void writeElement(XmlWriter writer) throws SAXException
writer
- The SAX writer.SAXException
Copyright © 2005–2015. All rights reserved.