JPF 1.5.1

org.java.plugin.tools.mocks
Class MockPluginFragment

java.lang.Object
  extended by org.java.plugin.tools.mocks.MockIdentity
      extended by org.java.plugin.tools.mocks.MockPluginFragment
All Implemented Interfaces:
Documentable<PluginFragment>, Identity, PluginFragment, UniqueIdentity

public class MockPluginFragment
extends MockIdentity
implements PluginFragment

Version:
$Id$

Constructor Summary
MockPluginFragment()
           
 
Method Summary
 java.lang.String getDocsPath()
           
 Documentation<PluginFragment> getDocumentation()
           
 java.net.URL getLocation()
           
 MatchingRule getMatchingRule()
           
 java.lang.String getPluginId()
           
 Version getPluginVersion()
           
 PluginRegistry getRegistry()
           
 java.lang.String getUniqueId()
           
 java.lang.String getVendor()
           
 Version getVersion()
           
 boolean matches(PluginDescriptor descr)
          Checks is this fragment may contribute to given plug-in.
 MockPluginFragment setDocsPath(java.lang.String value)
           
 MockPluginFragment setDocumentation(Documentation<PluginFragment> value)
           
 MockPluginFragment setLocation(java.net.URL value)
           
 MockPluginFragment setMatchingRule(MatchingRule value)
           
 MockPluginFragment setPluginId(java.lang.String value)
           
 MockPluginFragment setPluginVersion(Version value)
           
 MockPluginFragment setRegistry(PluginRegistry value)
           
 MockPluginFragment setVendor(java.lang.String value)
           
 MockPluginFragment setVersion(Version value)
           
 
Methods inherited from class org.java.plugin.tools.mocks.MockIdentity
getId, setId
 
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
 

Constructor Detail

MockPluginFragment

public MockPluginFragment()
Method Detail

getLocation

public java.net.URL getLocation()
Specified by:
getLocation in interface PluginFragment
Returns:
location from which this fragment was registered
See Also:
PluginFragment.getLocation()

setLocation

public MockPluginFragment setLocation(java.net.URL value)
Parameters:
value - the location to set
Returns:
this instance

getPluginId

public java.lang.String getPluginId()
Specified by:
getPluginId in interface PluginFragment
Returns:
ID of plug-in to which this fragment may contribute
See Also:
PluginFragment.getPluginId()

setPluginId

public MockPluginFragment setPluginId(java.lang.String value)
Parameters:
value - the plug-in ID to set
Returns:
this instance

getPluginVersion

public Version getPluginVersion()
Specified by:
getPluginVersion in interface PluginFragment
Returns:
version identifier of plug-in to which this fragment may contribute or null if no version specified in manifest
See Also:
PluginFragment.getPluginVersion()

setPluginVersion

public MockPluginFragment setPluginVersion(Version value)
Parameters:
value - the plug-in version to set
Returns:
this instance

getRegistry

public PluginRegistry getRegistry()
Specified by:
getRegistry in interface PluginFragment
Returns:
plug-ins registry
See Also:
PluginFragment.getRegistry()

setRegistry

public MockPluginFragment setRegistry(PluginRegistry value)
Parameters:
value - the registry to set
Returns:
this instance

getVendor

public java.lang.String getVendor()
Specified by:
getVendor in interface PluginFragment
Returns:
vendor as specified in manifest file or empty string
See Also:
PluginFragment.getVendor()

setVendor

public MockPluginFragment setVendor(java.lang.String value)
Parameters:
value - the vendor to set
Returns:
this instance

getVersion

public Version getVersion()
Specified by:
getVersion in interface PluginFragment
Returns:
plug-in fragment version identifier as specified in manifest file
See Also:
PluginFragment.getVersion()

setVersion

public MockPluginFragment setVersion(Version value)
Parameters:
value - the version to set
Returns:
this instance

matches

public boolean matches(PluginDescriptor descr)
Description copied from interface: PluginFragment
Checks is this fragment may contribute to given plug-in.

Specified by:
matches in interface PluginFragment
Parameters:
descr - plug-in descriptor
Returns:
true if this fragment may contribute to given plug-in
See Also:
PluginFragment.matches( org.java.plugin.registry.PluginDescriptor)

getMatchingRule

public MatchingRule getMatchingRule()
Specified by:
getMatchingRule in interface PluginFragment
Returns:
the match rule as it specified in manifest
See Also:
PluginFragment.getMatchingRule()

setMatchingRule

public MockPluginFragment setMatchingRule(MatchingRule value)
Parameters:
value - the matching rule 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()

getDocsPath

public java.lang.String getDocsPath()
Specified by:
getDocsPath in interface Documentable<PluginFragment>
Returns:
path to documentation "home", it is used for resolving documentation references
See Also:
Documentable.getDocsPath()

setDocsPath

public MockPluginFragment setDocsPath(java.lang.String value)
Parameters:
value - the docs path to set
Returns:
this instance

getDocumentation

public Documentation<PluginFragment> getDocumentation()
Specified by:
getDocumentation in interface Documentable<PluginFragment>
Returns:
plug-in element documentation object or null if there is no documentation provided
See Also:
Documentable.getDocumentation()

setDocumentation

public MockPluginFragment setDocumentation(Documentation<PluginFragment> value)
Parameters:
value - the documentation to set
Returns:
this instance

JPF 1.5.1

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