Package org.java.plugin.registry
Interface Extension.Parameter
- All Superinterfaces:
Documentable<Extension.Parameter>
,Identity
,PluginElement<Extension.Parameter>
- All Known Implementing Classes:
MockParameter
- Enclosing interface:
Extension
This interface abstracts extension parameter according to extension
declaration in manifest.
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptionReturns definition for this extension parameter.Returns sub-parameter with given ID ornull
if no sub-parameters exist.Returns collection of all sub-parameters defined in this parameter.rawValue()
Returns "typed" value of parameter.Returns "typed" value of parameter.Returns "typed" value of parameter.Returns "typed" value of parameter.Returns "typed" value of parameter.Returns "typed" value of parameter.Returns "typed" value of parameter.Returns "typed" value of parameter.valueAsUrl
(PathResolver pathResolver) Returns "typed" value of parameter.Methods inherited from interface org.java.plugin.registry.Documentable
getDocsPath, getDocumentation
Methods inherited from interface org.java.plugin.registry.PluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment
-
Method Details
-
rawValue
String rawValue()- Returns:
- parameter value as it is specified in manifest, if no value provided there, this method should return empty string
-
getSubParameters
Collection<Extension.Parameter> getSubParameters()Returns collection of all sub-parameters defined in this parameter.- Returns:
- collection of
Extension.Parameter
objects
-
getSubParameter
Returns sub-parameter with given ID ornull
if no sub-parameters exist. If more than one sub-parameters with given ID found, the method should throw anIllegalArgumentException
.- Parameters:
id
- ID of sub-parameter to look for- Returns:
- sub-parameter with given ID
-
getSubParameters
- 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 returnnull
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
String valueAsString()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.STRING
, this method should throw anUnsupportedOperationException
.- Returns:
- value as String object
-
valueAsBoolean
Boolean valueAsBoolean()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.BOOLEAN
, this method should throw anUnsupportedOperationException
.- Returns:
- value as Boolean object
-
valueAsNumber
Number valueAsNumber()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.NUMBER
, this method should throw anUnsupportedOperationException
.- Returns:
- value as Number object
-
valueAsDate
Date valueAsDate()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.DATE
,ParameterType.TIME
orParameterType.DATE_TIME
, this method should throw anUnsupportedOperationException
.- Returns:
- value as Date object
-
valueAsPluginDescriptor
PluginDescriptor valueAsPluginDescriptor()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.PLUGIN_ID
, this method should throw anUnsupportedOperationException
.- Returns:
- value as PluginDescriptor object
-
valueAsExtensionPoint
ExtensionPoint valueAsExtensionPoint()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.EXTENSION_POINT_ID
, this method should throw anUnsupportedOperationException
.- Returns:
- value as ExtensionPoint object
-
valueAsExtension
Extension valueAsExtension()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.EXTENSION_ID
, this method should throw anUnsupportedOperationException
.- Returns:
- value as Extension object
-
valueAsUrl
URL valueAsUrl()Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.RESOURCE
, this method should throw anUnsupportedOperationException
.- Returns:
- value as absolute or relative URL as specified in manifest
-
valueAsUrl
Returns "typed" value of parameter. If this parameter is invalid or is not of typeParameterType.RESOURCE
, this method should throw anUnsupportedOperationException
.- Parameters:
pathResolver
- path resolver to make URL absolute- Returns:
- value as absolute URL
-