public abstract class ParameterAccessor
extends java.lang.Object
Constructor and Description |
---|
ParameterAccessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
getBooleanParameter(java.lang.String id)
Return the given parameter as a boolean.
|
java.util.Collection<java.lang.Boolean> |
getBooleanParameters(java.lang.String id)
Return all booleans stored for the given id in no particular order.
|
java.lang.Object |
getClassParameter(java.lang.String id)
Will return an singleton instance for the given class parameter.
|
java.util.Collection<java.lang.Object> |
getClassParameters(java.lang.String id)
See
getClassParameter(String) for details how singleton
instances are created. |
java.util.Date |
getDateParameter(java.lang.String id)
Return the Date stored in the given parameter.
|
java.util.Collection<java.util.Date> |
getDateParameters(java.lang.String id)
Return all dates stored for the given id.
|
abstract org.java.plugin.Plugin |
getDeclaringPlugin()
If subclasses extend ParameterAccessor they should provide the plugin
instance here from which to query the parameter.
|
abstract java.lang.String |
getId() |
java.lang.Number |
getNumberParameter(java.lang.String id)
Return the Number stored in the given parameter.
|
java.util.Collection<java.lang.Number> |
getNumberParameters(java.lang.String id)
Return all numbers stored for the given id.
|
abstract org.java.plugin.registry.Extension.Parameter |
getParameter(java.lang.String id)
Should return the parameter for this accessor with the given id.
|
abstract java.util.Collection<org.java.plugin.registry.Extension.Parameter> |
getParameters()
Should get all parameters for this accessor.
|
abstract java.util.Collection<org.java.plugin.registry.Extension.Parameter> |
getParameters(java.lang.String id)
Should return all parameters for this accessor with the given id.
|
java.net.URL |
getResourceParameter(java.lang.String id)
Will return the resource URL stored in the parameter with the given id.
|
java.net.URL |
getResourceParameter(java.lang.String id,
java.lang.String relative)
Will return the resource URL stored in the parameter with the given id.
|
java.util.Collection<java.net.URL> |
getResourceParameters(java.lang.String id)
Will return all resource URLs stored in parameters with the given id.
|
java.util.Collection<java.net.URL> |
getResourceParameters(java.lang.String id,
java.lang.String relative)
Will return the resource URLs stored in the parameter with the given id.
|
java.lang.String |
getStringParameter(java.lang.String id)
Return the string parameter for the given id using the rawValue()
function of the parameter with the given id.
|
java.util.Collection<java.lang.String> |
getStringParameters(java.lang.String id)
Return all string values for the given id.
|
public abstract org.java.plugin.Plugin getDeclaringPlugin()
public abstract org.java.plugin.registry.Extension.Parameter getParameter(java.lang.String id)
id
- public abstract java.util.Collection<org.java.plugin.registry.Extension.Parameter> getParameters()
public abstract java.util.Collection<org.java.plugin.registry.Extension.Parameter> getParameters(java.lang.String id)
id
- public abstract java.lang.String getId()
public java.lang.Number getNumberParameter(java.lang.String id)
public java.util.Collection<java.lang.Number> getNumberParameters(java.lang.String id)
public boolean getBooleanParameter(java.lang.String id)
id
- Id for which to return a boolean parameter.public java.util.Collection<java.lang.Boolean> getBooleanParameters(java.lang.String id)
public java.lang.String getStringParameter(java.lang.String id)
id
- The id for which to retrieve the string value.public java.util.Collection<java.lang.String> getStringParameters(java.lang.String id)
id
- The id for which to retrieve the string values.public java.net.URL getResourceParameter(java.lang.String id)
id
- The id of the parameter from which to retrieve a resource URL.public java.util.Collection<java.net.URL> getResourceParameters(java.lang.String id)
id
- The id of the parameters from which to retrieve resource URLs.public java.net.URL getResourceParameter(java.lang.String id, java.lang.String relative)
getResourceParameter(String)
this method will
append the given relative path component to the end of the URL.
This is useful if the resource URL points to a directory from which you
want to load a specific file.
If the stored URL is relative it will be resolved relative to the plug-in
root.id
- The id of the parameter from which to retrieve a resource URL.relative
- A relative path component to append to the end of the stored
URL.
The method will take care to put a path separator between stored URL and
given relative path.public java.util.Collection<java.net.URL> getResourceParameters(java.lang.String id, java.lang.String relative)
getResourceParameters(String)
this method will
append the given relative path component to the end of each URL.
This is useful if the resource URLs points to directories from which you
want to load specific (albeit identically named) files .
If the stored URLs are relative they will be resolved relative to the
plug-in root.id
- The id of the parameters from which to retrieve resource URLs.relative
- A relative path component to append to the end of the stored
URLs.
The method will take care to put a path separator between each stored URL
and the given relative path.public java.util.Date getDateParameter(java.lang.String id)
public java.util.Collection<java.util.Date> getDateParameters(java.lang.String id)
public java.lang.Object getClassParameter(java.lang.String id)
id
- public java.util.Collection<java.lang.Object> getClassParameters(java.lang.String id)
getClassParameter(String)
for details how singleton
instances are created.
This method will create a singleton instance for each parameter with the
given id.id
- The id for which to retrieve parameters.