JPF 1.5.1

org.java.plugin.registry
Interface Extension.Parameter

All Superinterfaces:
Documentable<Extension.Parameter>, Identity, PluginElement<Extension.Parameter>
All Known Implementing Classes:
MockParameter
Enclosing interface:
Extension

public static interface Extension.Parameter
extends PluginElement<Extension.Parameter>

This interface abstracts extension parameter according to extension declaration in manifest.

Version:
$Id$

Method Summary
 Extension getDeclaringExtension()
           
 ExtensionPoint.ParameterDefinition getDefinition()
          Returns definition for this extension parameter.
 Extension.Parameter getSubParameter(java.lang.String id)
          Returns sub-parameter with given ID or null if no sub-parameters exist.
 java.util.Collection<Extension.Parameter> getSubParameters()
          Returns collection of all sub-parameters defined in this parameter.
 java.util.Collection<Extension.Parameter> getSubParameters(java.lang.String id)
           
 Extension.Parameter getSuperParameter()
           
 java.lang.String rawValue()
           
 java.lang.Boolean valueAsBoolean()
          Returns "typed" value of parameter.
 java.util.Date valueAsDate()
          Returns "typed" value of parameter.
 Extension valueAsExtension()
          Returns "typed" value of parameter.
 ExtensionPoint valueAsExtensionPoint()
          Returns "typed" value of parameter.
 java.lang.Number valueAsNumber()
          Returns "typed" value of parameter.
 PluginDescriptor valueAsPluginDescriptor()
          Returns "typed" value of parameter.
 java.lang.String valueAsString()
          Returns "typed" value of parameter.
 java.net.URL valueAsUrl()
          Returns "typed" value of parameter.
 java.net.URL valueAsUrl(PathResolver pathResolver)
          Returns "typed" value of parameter.
 
Methods inherited from interface org.java.plugin.registry.PluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment
 
Methods inherited from interface org.java.plugin.registry.Identity
getId
 
Methods inherited from interface org.java.plugin.registry.Documentable
getDocsPath, getDocumentation
 

Method Detail

rawValue

java.lang.String rawValue()
Returns:
parameter value as it is specified in manifest, if no value provided there, this method should return empty string

getSubParameters

java.util.Collection<Extension.Parameter> getSubParameters()
Returns collection of all sub-parameters defined in this parameter.

Returns:
collection of Extension.Parameter objects

getSubParameter

Extension.Parameter getSubParameter(java.lang.String id)
Returns sub-parameter with given ID or null if no sub-parameters exist. If more than one sub-parameters with given ID found, the method should throw an IllegalArgumentException.

Parameters:
id - ID of sub-parameter to look for
Returns:
sub-parameter with given ID

getSubParameters

java.util.Collection<Extension.Parameter> getSubParameters(java.lang.String id)
Parameters:
id - ID of sub-parameter to look for
Returns:
collection of all sub-parameters with given ID

getDeclaringExtension

Extension getDeclaringExtension()
Returns:
extension this parameter belongs to

getDefinition

ExtensionPoint.ParameterDefinition getDefinition()
Returns definition for this extension parameter. May return null for "invalid" parameters.

Returns:
parameter definition or null, if this parameter is "invalid"

getSuperParameter

Extension.Parameter getSuperParameter()
Returns:
parameter, of which this one is child or null if this is top level parameter

valueAsString

java.lang.String valueAsString()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.STRING, this method should throw an UnsupportedOperationException.

Returns:
value as String object

valueAsBoolean

java.lang.Boolean valueAsBoolean()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.BOOLEAN, this method should throw an UnsupportedOperationException.

Returns:
value as Boolean object

valueAsNumber

java.lang.Number valueAsNumber()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.NUMBER, this method should throw an UnsupportedOperationException.

Returns:
value as Number object

valueAsDate

java.util.Date valueAsDate()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.DATE, ParameterType.TIME or ParameterType.DATE_TIME, this method should throw an UnsupportedOperationException.

Returns:
value as Date object

valueAsPluginDescriptor

PluginDescriptor valueAsPluginDescriptor()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.PLUGIN_ID, this method should throw an UnsupportedOperationException.

Returns:
value as PluginDescriptor object

valueAsExtensionPoint

ExtensionPoint valueAsExtensionPoint()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.EXTENSION_POINT_ID, this method should throw an UnsupportedOperationException.

Returns:
value as ExtensionPoint object

valueAsExtension

Extension valueAsExtension()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.EXTENSION_ID, this method should throw an UnsupportedOperationException.

Returns:
value as Extension object

valueAsUrl

java.net.URL valueAsUrl()
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.RESOURCE, this method should throw an UnsupportedOperationException.

Returns:
value as absolute or relative URL as specified in manifest

valueAsUrl

java.net.URL valueAsUrl(PathResolver pathResolver)
Returns "typed" value of parameter. If this parameter is invalid or is not of type ParameterType.RESOURCE, this method should throw an UnsupportedOperationException.

Parameters:
pathResolver - path resolver to make URL absolute
Returns:
value as absolute URL

JPF 1.5.1

Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.