net.dpml.test.composite
Class PartsComponent

java.lang.Object
  extended by net.dpml.test.composite.PartsComponent
All Implemented Interfaces:
ColorManager

public class PartsComponent
extends Object
implements ColorManager

This component declares an inner Parts interface through which it accesses a map of the context infomation of a subsidiary component named 'child'. The subsidiary component is defined and established within the component types definition (see build file for details).

Version:
1.2.0
Author:
Digital Product Meta Library

Nested Class Summary
static interface PartsComponent.Context
          The construction criteria.
 
Constructor Summary
PartsComponent(Logger logger, PartsComponent.Context context, PartsManager parts)
          Creation of a new composite component instance.
 
Method Summary
 ChildComponent getChild()
          Return the child component for evaluation by the testcase.
 Color getColor()
          Return the color value assigned to the component context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartsComponent

public PartsComponent(Logger logger,
                      PartsComponent.Context context,
                      PartsManager parts)
               throws UnknownKeyException,
                      RemoteException
Creation of a new composite component instance.

Parameters:
logger - the assingned logging channel
context - a context implementation
parts - the parts manager
Throws:
UnknownKeyException - if the implementation uses a bad reference
RemoteException - if a remote I/O error occurs
Method Detail

getColor

public Color getColor()
Return the color value assigned to the component context.

Specified by:
getColor in interface ColorManager
Returns:
the color value

getChild

public ChildComponent getChild()
                        throws Exception
Return the child component for evaluation by the testcase.

Returns:
the child
Throws:
Exception - if an error occurs