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:
getAttributein interfacePluginDescriptor- Parameters:
id- ID of attribute to look for- Returns:
- top level attribute with given ID
- See Also:
-
getAttributes
Description copied from interface:PluginDescriptorReturns collection of all top level attributes defined in manifest.- Specified by:
getAttributesin interfacePluginDescriptor- Returns:
- collection of
PluginAttributeobjects - See Also:
-
getAttributes
- Specified by:
getAttributesin 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:
getExtensionin interfacePluginDescriptor- Parameters:
id- extension ID- Returns:
- extension object or
null - See Also:
-
getExtensionPoint
- Specified by:
getExtensionPointin interfacePluginDescriptor- Parameters:
id- extension point ID- Returns:
- extension point object or
null - See Also:
-
getExtensionPoints
Description copied from interface:PluginDescriptorReturns collection of all extension points defined in manifest.- Specified by:
getExtensionPointsin interfacePluginDescriptor- Returns:
- collection of
ExtensionPointobjects - See Also:
-
getExtensions
Description copied from interface:PluginDescriptorReturns collection of all extensions defined in manifest.- Specified by:
getExtensionsin interfacePluginDescriptor- Returns:
- collection of
Extensionobjects - 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:PluginDescriptorReturns 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:
getFragmentsin interfacePluginDescriptor- Returns:
- collection of
PluginFragmentobjects - See Also:
-
addFragment
- Parameters:
fragment- plug-in fragment to add- Returns:
- this instance
-
getLibraries
Description copied from interface:PluginDescriptorReturns collection of all libraries defined in manifest.- Specified by:
getLibrariesin interfacePluginDescriptor- Returns:
- collection of
Libraryobjects - See Also:
-
addLibrary
- Parameters:
library- library to add- Returns:
- this instance
-
getLibrary
- Specified by:
getLibraryin interfacePluginDescriptor- Parameters:
id- library ID- Returns:
- library object or
null - See Also:
-
getLocation
- Specified by:
getLocationin 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:
getPluginClassNamein 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:
getPrerequisitein interfacePluginDescriptor- Parameters:
id- prerequisite ID- Returns:
- plug-in prerequisite object instance or
null - See Also:
-
getPrerequisites
Description copied from interface:PluginDescriptorReturns collection of all prerequisites defined in manifest.- Specified by:
getPrerequisitesin interfacePluginDescriptor- Returns:
- collection of
PluginPrerequisiteobjects - See Also:
-
addPrerequisite
- Parameters:
pre- plug-in prerequisite to add- Returns:
- this instance
-
getRegistry
- Specified by:
getRegistryin interfacePluginDescriptor- Returns:
- plug-ins registry
- See Also:
-
setRegistry
- Parameters:
value- the registry to set- Returns:
- this instance
-
getVendor
- Specified by:
getVendorin 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:
getVersionin 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:
getUniqueIdin interfaceUniqueIdentity- Returns:
- unique ID of plug-in element
- See Also:
-
getDocsPath
- Specified by:
getDocsPathin 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:
getDocumentationin interfaceDocumentable<PluginDescriptor>- Returns:
- plug-in element documentation object or
nullif there is no documentation provided - See Also:
-
setDocumentation
- Parameters:
value- the documentation to set- Returns:
- this instance
-