public class Parameter extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Class<?> |
paramClass
The Class for the parameter type
|
protected Plugin |
plugin
The URL to the creole.xml file that defines the resource this parameter
belongs to.
|
protected ResourceData |
resData
The resource data that this parameter is part of.
|
Constructor and Description |
---|
Parameter(Plugin plugin)
Construct a new Parameter for a resource in a given plugin.
|
Modifier and Type | Method and Description |
---|---|
Object |
calculateDefaultValue()
Calculate and return the default value for this parameter
|
Object |
calculateValueFromString(String stringValue)
Calculate and return the value for this parameter starting from a String
|
String |
getComment()
Get the comment for this parameter
|
Object |
getDefaultValue()
Get the default value for this parameter.
|
String |
getDefaultValueString()
Get the default value string (unprocessed, from the metadata)
for the parameter
|
String |
getHelpURL()
Get the helpURL for this parameter
|
String |
getItemClassName()
If this parameter is a List type this will return the type of the items
in the list.
|
String |
getName()
Get the name for this parameter
|
protected Class<?> |
getParameterClass()
Find the class for this parameter type.
|
Set<String> |
getSuffixes()
Get the suffixes atached with this param.
|
String |
getTypeName()
Get the type name for this parameter
|
boolean |
isOptional()
Is the parameter optional?
|
boolean |
isRuntime()
Is the parameter runtime?
|
void |
setComment(String comment)
Set the comment for this parameter
|
void |
setDefaultValueString(String defaultValueString)
Set the default value string (from the metadata)
for the parameter
|
void |
setHelpURL(String helpURL)
Set the helpURL for this parameter
|
void |
setName(String name)
Set the name for this parameter
|
void |
setOptional(boolean optional)
Set optionality of this parameter
|
void |
setRuntime(boolean runtime)
Set runtime status of this parameter
|
void |
setTypeName(String typeName)
Set the type name for this parameter
|
String |
toString()
String representation
|
protected ResourceData resData
protected Plugin plugin
URL
.protected Class<?> paramClass
public Parameter(Plugin plugin)
plugin
- the plugin that defines the resource
this parameter belongs to. This will be used as context when deriving
default values for the parameters of type URL oe ResourceReference.public void setTypeName(String typeName)
public String getTypeName()
public void setOptional(boolean optional)
public boolean isOptional()
public Object calculateDefaultValue() throws ParameterException
ParameterException
public Object calculateValueFromString(String stringValue) throws ParameterException
ParameterException
public Object getDefaultValue() throws ParameterException
ParameterException
calculateDefaultValue()
public void setDefaultValueString(String defaultValueString)
public String getDefaultValueString()
public void setComment(String comment)
public String getComment()
public void setHelpURL(String helpURL)
public String getHelpURL()
public void setName(String name)
public String getName()
public Set<String> getSuffixes()
public void setRuntime(boolean runtime)
public boolean isRuntime()
protected Class<?> getParameterClass() throws ParameterException
ParameterException
public String getItemClassName()
Copyright © 2024 GATE. All rights reserved.