wt.vc.baseline
Class BaselineVisitor

java.lang.Object
  extended bywt.visitor.VisitorAdapter
      extended bywt.vc.baseline.BaselineVisitor
All Implemented Interfaces:
Visitor

public class BaselineVisitor
extends VisitorAdapter
implements Visitor

This class implements the Visitor interface. This class contains a reference to a Baseline and the visit() method is implemented to add a Baselineable item to that Baseline.

This class also contains a reference to a StandardBaselineService. This is necessary becuase the visit() method must use a protected method on this service. Therefore, this class is only intended for use with the StandardBaselineService.

Supported API: true

Extendable: true


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
private  Baseline theBaseline
           
private  StandardBaselineService theStandardBaselineService
           
 
Constructor Summary
BaselineVisitor(Baseline a_baseline, StandardBaselineService a_baselineService)
          Constructs an instance using the specified Baseline.
 
Method Summary
 Baseline getBaseline()
          Gets the object for the association that plays role: theBaseline.
 void setBaseline(Baseline a_Baseline)
          Sets the object for the association that plays role: theBaseline.
private  void theBaselineValidate(Baseline a_Baseline)
           
 boolean visit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited)
          Visits a node and adds it to a Baseline.
 
Methods inherited from class wt.visitor.VisitorAdapter
visitLevel, visitLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wt.visitor.Visitor
visitLevel, visitLevel
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

theBaseline

private Baseline theBaseline

theStandardBaselineService

private StandardBaselineService theStandardBaselineService
Constructor Detail

BaselineVisitor

public BaselineVisitor(Baseline a_baseline,
                       StandardBaselineService a_baselineService)
                throws WTPropertyVetoException
Constructs an instance using the specified Baseline.

Supported API: true

Parameters:
a_baseline -
a_baselineService -
Throws:
WTPropertyVetoException
Method Detail

getBaseline

public Baseline getBaseline()
Gets the object for the association that plays role: theBaseline.

Supported API: true

Returns:
Baseline

setBaseline

public void setBaseline(Baseline a_Baseline)
                 throws WTPropertyVetoException
Sets the object for the association that plays role: theBaseline.

Supported API: true

Parameters:
a_Baseline -
Throws:
WTPropertyVetoException

theBaselineValidate

private void theBaselineValidate(Baseline a_Baseline)
                          throws WTPropertyVetoException
Parameters:
a_Baseline -
Throws:
WTPropertyVetoException

visit

public boolean visit(Persistable fromNode,
                     Link link,
                     Persistable toNode,
                     int level,
                     boolean previouslyVisited)
              throws WTException
Visits a node and adds it to a Baseline. If this node has been previously visited, then false is returned.

Supported API: true

Specified by:
visit in interface Visitor
Overrides:
visit in class VisitorAdapter
Parameters:
fromNode -
link -
toNode -
level -
previouslyVisited -
Returns:
boolean
Throws:
WTException