JPF 1.5.1

org.java.plugin.tools.mocks
Class MockPluginAttribute

java.lang.Object
  extended by org.java.plugin.tools.mocks.MockIdentity
      extended by org.java.plugin.tools.mocks.MockPluginElement<PluginAttribute>
          extended by org.java.plugin.tools.mocks.MockPluginAttribute
All Implemented Interfaces:
Documentable<PluginAttribute>, Identity, PluginAttribute, PluginElement<PluginAttribute>

public class MockPluginAttribute
extends MockPluginElement<PluginAttribute>
implements PluginAttribute

Version:
$Id$

Constructor Summary
MockPluginAttribute()
          No-arguments constructor.
MockPluginAttribute(java.lang.String id, java.lang.String aValue)
           
 
Method Summary
 MockPluginAttribute addSubAttribute(PluginAttribute attribute)
           
 PluginAttribute getSubAttribute(java.lang.String id)
           
 java.util.Collection<PluginAttribute> getSubAttributes()
           
 java.util.Collection<PluginAttribute> getSubAttributes(java.lang.String id)
           
 PluginAttribute getSuperAttribute()
           
 java.lang.String getValue()
           
 MockPluginAttribute setSuperAttribute(PluginAttribute attribute)
           
 MockPluginAttribute setValue(java.lang.String attributeValue)
           
 
Methods inherited from class org.java.plugin.tools.mocks.MockPluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment, getDocsPath, getDocumentation, setDeclaringPluginDescriptor, setDeclaringPluginFragment, setDocsPath, setDocumentation
 
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.PluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment
 
Methods inherited from interface org.java.plugin.registry.Identity
getId
 
Methods inherited from interface org.java.plugin.registry.Documentable
getDocsPath, getDocumentation
 

Constructor Detail

MockPluginAttribute

public MockPluginAttribute()
No-arguments constructor.


MockPluginAttribute

public MockPluginAttribute(java.lang.String id,
                           java.lang.String aValue)
Parameters:
id - attribute ID
aValue - attribute value
Method Detail

getSubAttribute

public PluginAttribute getSubAttribute(java.lang.String id)
Specified by:
getSubAttribute in interface PluginAttribute
Parameters:
id - ID of sub-attribute to look for
Returns:
sub-attribute with given ID
See Also:
PluginAttribute.getSubAttribute( java.lang.String)

getSubAttributes

public java.util.Collection<PluginAttribute> getSubAttributes()
Specified by:
getSubAttributes in interface PluginAttribute
Returns:
collection of all sub-attributes of this attribute
See Also:
PluginAttribute.getSubAttributes()

getSubAttributes

public java.util.Collection<PluginAttribute> getSubAttributes(java.lang.String id)
Specified by:
getSubAttributes in interface PluginAttribute
Parameters:
id - ID of sub-attribute to look for
Returns:
collection of all sub-attributes with given ID
See Also:
PluginAttribute.getSubAttributes( java.lang.String)

addSubAttribute

public MockPluginAttribute addSubAttribute(PluginAttribute attribute)
Parameters:
attribute - sub-attribute to add
Returns:
this instance

getSuperAttribute

public PluginAttribute getSuperAttribute()
Specified by:
getSuperAttribute in interface PluginAttribute
Returns:
attribute, of which this one is child or null if this is top level attribute
See Also:
PluginAttribute.getSuperAttribute()

setSuperAttribute

public MockPluginAttribute setSuperAttribute(PluginAttribute attribute)
Parameters:
attribute - the super attribute to set
Returns:
this instance

getValue

public java.lang.String getValue()
Specified by:
getValue in interface PluginAttribute
Returns:
attribute value as it is specified in manifest
See Also:
PluginAttribute.getValue()

setValue

public MockPluginAttribute setValue(java.lang.String attributeValue)
Parameters:
attributeValue - the attribute value to set
Returns:
this instance

JPF 1.5.1

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