org.java.plugin.tools.mocks
Class MockExtension
java.lang.Object
org.java.plugin.tools.mocks.MockIdentity
org.java.plugin.tools.mocks.MockPluginElement<Extension>
org.java.plugin.tools.mocks.MockExtension
- All Implemented Interfaces:
- Documentable<Extension>, Extension, Identity, PluginElement<Extension>, UniqueIdentity
public class MockExtension
- extends MockPluginElement<Extension>
- implements Extension
- Version:
- $Id$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.java.plugin.registry.Identity |
getId |
Methods inherited from interface org.java.plugin.registry.Identity |
getId |
MockExtension
public MockExtension()
- No-arguments constructor.
MockExtension
public MockExtension(java.lang.String id)
- Parameters:
id
- extension ID
MockExtension
public MockExtension(java.lang.String id,
PluginDescriptor declaringPluginDescriptor)
- Parameters:
id
- extension IDdeclaringPluginDescriptor
- declaring plug-in descriptor
getExtendedPluginId
public java.lang.String getExtendedPluginId()
- Specified by:
getExtendedPluginId
in interface Extension
- Returns:
- ID of plug-in, extended point belongs to
- See Also:
Extension.getExtendedPluginId()
setExtendedPluginId
public MockExtension setExtendedPluginId(java.lang.String value)
- Parameters:
value
- the extended plug-in id to set
- Returns:
- this instance
getExtendedPointId
public java.lang.String getExtendedPointId()
- Specified by:
getExtendedPointId
in interface Extension
- Returns:
- ID of extended point
- See Also:
Extension.getExtendedPointId()
setExtendedPointId
public MockExtension setExtendedPointId(java.lang.String value)
- Parameters:
value
- the extended point id to set
- Returns:
- this instance
getParameter
public Extension.Parameter getParameter(java.lang.String id)
- Description copied from interface:
Extension
- Returns top level parameter with given ID or
null
if no top
level parameters exist. If more than one top level parameters with given
ID found, the method should throw an IllegalArgumentException
.
- Specified by:
getParameter
in interface Extension
- Parameters:
id
- ID of parameter to look for
- Returns:
- top level parameter with given ID
- See Also:
Extension.getParameter(java.lang.String)
getParameters
public java.util.Collection<Extension.Parameter> getParameters()
- Description copied from interface:
Extension
- Returns collection of all top level parameters defined in this extension.
- Specified by:
getParameters
in interface Extension
- Returns:
- collection of
Extension.Parameter
objects - See Also:
Extension.getParameters()
getParameters
public java.util.Collection<Extension.Parameter> getParameters(java.lang.String id)
- Specified by:
getParameters
in interface Extension
- Parameters:
id
- ID of parameter to look for
- Returns:
- collection of all top level parameters with given ID
- See Also:
Extension.getParameters(java.lang.String)
addParameter
public MockExtension addParameter(Extension.Parameter parameter)
- Parameters:
parameter
- parameter to add
- Returns:
- this instance
isValid
public boolean isValid()
- Specified by:
isValid
in interface Extension
- Returns:
true
if extension is considered to be valid- See Also:
Extension.isValid()
setValid
public MockExtension setValid(boolean value)
- Parameters:
value
- the valid flag to set
- Returns:
- this instance
getUniqueId
public java.lang.String getUniqueId()
- Specified by:
getUniqueId
in interface UniqueIdentity
- Returns:
- unique ID of plug-in element
- See Also:
UniqueIdentity.getUniqueId()
Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.