Package org.java.plugin.tools.mocks
Class MockPluginDescriptor
java.lang.Object
org.java.plugin.tools.mocks.MockIdentity
org.java.plugin.tools.mocks.MockPluginDescriptor
- All Implemented Interfaces:
Documentable<PluginDescriptor>
,Identity
,PluginDescriptor
,UniqueIdentity
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(PluginAttribute attribute) addExtension
(Extension extension) addExtensionPoint
(ExtensionPoint extPoint) addFragment
(PluginFragment fragment) addLibrary
(Library library) getAttribute
(String id) Returns collection of all top level attributes defined in manifest.getAttributes
(String id) getExtension
(String id) Returns collection of all extension points defined in manifest.Returns collection of all extensions defined in manifest.Returns collection of plug-in fragments which contributes to this plug-in.Returns collection of all libraries defined in manifest.getLibrary
(String id) Returns collection of all prerequisites defined in manifest.setDocsPath
(String value) setLocation
(URL value) setPluginClassName
(String value) setRegistry
(PluginRegistry value) setVersion
(Version value) Methods inherited from class org.java.plugin.tools.mocks.MockIdentity
getId, setId
-
Constructor Details
-
MockPluginDescriptor
public MockPluginDescriptor()No-arguments constructor. -
MockPluginDescriptor
- Parameters:
id
- plug-in ID
-
MockPluginDescriptor
- Parameters:
id
- plug-in IDaVersion
- plug-in version
-
-
Method Details
-
getAttribute
- Specified by:
getAttribute
in interfacePluginDescriptor
- Parameters:
id
- ID of attribute to look for- Returns:
- top level attribute with given ID
- See Also:
-
getAttributes
Description copied from interface:PluginDescriptor
Returns collection of all top level attributes defined in manifest.- Specified by:
getAttributes
in interfacePluginDescriptor
- Returns:
- collection of
PluginAttribute
objects - See Also:
-
getAttributes
- Specified by:
getAttributes
in interfacePluginDescriptor
- Parameters:
id
- ID of attribute to look for- Returns:
- collection of all top level attributes with given ID
- See Also:
-
addAttribute
- Parameters:
attribute
- attribute to add- Returns:
- this instance
-
getExtension
- Specified by:
getExtension
in interfacePluginDescriptor
- Parameters:
id
- extension ID- Returns:
- extension object or
null
- See Also:
-
getExtensionPoint
- Specified by:
getExtensionPoint
in interfacePluginDescriptor
- Parameters:
id
- extension point ID- Returns:
- extension point object or
null
- See Also:
-
getExtensionPoints
Description copied from interface:PluginDescriptor
Returns collection of all extension points defined in manifest.- Specified by:
getExtensionPoints
in interfacePluginDescriptor
- Returns:
- collection of
ExtensionPoint
objects - See Also:
-
getExtensions
Description copied from interface:PluginDescriptor
Returns collection of all extensions defined in manifest.- Specified by:
getExtensions
in interfacePluginDescriptor
- Returns:
- collection of
Extension
objects - See Also:
-
addExtensionPoint
- Parameters:
extPoint
- extension point to add- Returns:
- this instance
-
addExtension
- Parameters:
extension
- extension to add- Returns:
- this instance
-
getFragments
Description copied from interface:PluginDescriptor
Returns collection of plug-in fragments which contributes to this plug-in. One plug-in fragment may contribute to several versions of the same plug-in, according to it's manifest.- Specified by:
getFragments
in interfacePluginDescriptor
- Returns:
- collection of
PluginFragment
objects - See Also:
-
addFragment
- Parameters:
fragment
- plug-in fragment to add- Returns:
- this instance
-
getLibraries
Description copied from interface:PluginDescriptor
Returns collection of all libraries defined in manifest.- Specified by:
getLibraries
in interfacePluginDescriptor
- Returns:
- collection of
Library
objects - See Also:
-
addLibrary
- Parameters:
library
- library to add- Returns:
- this instance
-
getLibrary
- Specified by:
getLibrary
in interfacePluginDescriptor
- Parameters:
id
- library ID- Returns:
- library object or
null
- See Also:
-
getLocation
- Specified by:
getLocation
in interfacePluginDescriptor
- Returns:
- location from which this plug-in was registered
- See Also:
-
setLocation
- Parameters:
value
- the location to set- Returns:
- this instance
-
getPluginClassName
- Specified by:
getPluginClassName
in interfacePluginDescriptor
- Returns:
- plug-in class name as specified in manifest file or
null
- See Also:
-
setPluginClassName
- Parameters:
value
- the plug-in class name to set- Returns:
- this instance
-
getPrerequisite
- Specified by:
getPrerequisite
in interfacePluginDescriptor
- Parameters:
id
- prerequisite ID- Returns:
- plug-in prerequisite object instance or
null
- See Also:
-
getPrerequisites
Description copied from interface:PluginDescriptor
Returns collection of all prerequisites defined in manifest.- Specified by:
getPrerequisites
in interfacePluginDescriptor
- Returns:
- collection of
PluginPrerequisite
objects - See Also:
-
addPrerequisite
- Parameters:
pre
- plug-in prerequisite to add- Returns:
- this instance
-
getRegistry
- Specified by:
getRegistry
in interfacePluginDescriptor
- Returns:
- plug-ins registry
- See Also:
-
setRegistry
- Parameters:
value
- the registry to set- Returns:
- this instance
-
getVendor
- Specified by:
getVendor
in interfacePluginDescriptor
- Returns:
- vendor as specified in manifest file or empty string
- See Also:
-
setVendor
- Parameters:
value
- the vendor to set- Returns:
- this instance
-
getVersion
- Specified by:
getVersion
in interfacePluginDescriptor
- Returns:
- plug-in version identifier as specified in manifest file
- See Also:
-
setVersion
- Parameters:
value
- the version to set- Returns:
- this instance
-
getUniqueId
- Specified by:
getUniqueId
in interfaceUniqueIdentity
- Returns:
- unique ID of plug-in element
- See Also:
-
getDocsPath
- Specified by:
getDocsPath
in interfaceDocumentable<PluginDescriptor>
- Returns:
- path to documentation "home", it is used for resolving documentation references
- See Also:
-
setDocsPath
- Parameters:
value
- the docs path to set- Returns:
- this instance
-
getDocumentation
- Specified by:
getDocumentation
in interfaceDocumentable<PluginDescriptor>
- Returns:
- plug-in element documentation object or
null
if there is no documentation provided - See Also:
-
setDocumentation
- Parameters:
value
- the documentation to set- Returns:
- this instance
-