net.sf.jameleon.bean
Class FunctionalPoint

java.lang.Object
  extended by net.sf.jameleon.bean.FunctionalPoint
All Implemented Interfaces:
Serializable, Cloneable, XMLable

public class FunctionalPoint
extends Object
implements XMLable, Cloneable

This class represents a Functional Point in a TestCase. This is currently used only for test case documentation generation. Please see the docs on the instance variables for a full understanding of what a FunctionalPoint is

See Also:
Serialized Form

Field Summary
protected  ArrayList applications
          The applications supported by this functional point
protected  Map attributes
          A list of attributes that this functional point uses
protected  String author
          The name of the developer that wrote this FunctionalPoint
protected  String className
          The name of the class that this tag represents.
protected  String description
          A short summary about how this functional can be used
protected  String functionId
          The description of how the functional point is being used
protected  String shortDescription
          The first line of the description.
protected  ArrayList steps
          A list of steps that this FunctionalPoint uses during execution
protected  ArrayList tagNames
          The tags to be used in the test case macro language
protected  String type
          The type of the functional point.
 
Constructor Summary
FunctionalPoint()
          Default constructor only used to initialize variables
 
Method Summary
 void addApplication(String applicationName)
          Adds an application to the list of applications supported by this FunctionalPoint
 void addAttribute(Attribute attr)
          Adds an Attribute to the list of attributes used by this FunctionalPoint
 void addStep(String step)
          Adds a step to the list of steps required to execute this FunctionalPoint
 void addTagName(String tagName)
          Adds a tag name - a name used in the test case macro language Functional points can have multiple tag names
 Object clone()
           
 FunctionalPoint cloneFP()
           
 boolean equals(Object obj)
           
 ArrayList getApplications()
          Gets the applications supported by this functional point
 Attribute getAttribute(String name)
          Gets a particular attribute.
 Map getAttributes()
           
 String getAuthor()
           
 String getClassName()
           
 String getDefaultTagName()
           
 String getDescription()
           
 String getFunctionId()
           
 String getShortDescription()
          Gets the first line of the javadoc class comments.
 List getSteps()
           
 List getTagNames()
          Gets all tag names registered for this functional point Functional points can have multiple tag names
 String getType()
           
 int hashCode()
           
 void setAttributes(Map attributes)
          Sets A list of attributes that this functional point uses
 void setAuthor(String author)
          Sets the name of the developer that wrote this FunctionalPoint
 void setClassName(String className)
          Sets the name of the class that represents this FunctionalPoint
 void setDescription(String description)
          Sets a short summary about how this functional can be used
 void setFunctionId(String functionId)
          Sets a short summary about how this functional point is used
 void setShortDescription(String shortDescription)
          Sets the first line of the description
 void setSteps(ArrayList steps)
          Sets a list of steps that this FunctionalPoint uses during execution
 void setType(String type)
          Sets he type of the functional point
 String toString()
           
 String toXML()
          Implement this method the same way the toString method would be implemented, except the object's information should be in a valid XML format.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

author

protected String author
The name of the developer that wrote this FunctionalPoint


applications

protected ArrayList applications
The applications supported by this functional point


className

protected String className
The name of the class that this tag represents.


tagNames

protected ArrayList tagNames
The tags to be used in the test case macro language


description

protected String description
A short summary about how this functional can be used


shortDescription

protected String shortDescription
The first line of the description.


type

protected String type
The type of the functional point. Valid values are action, validation, navigation


functionId

protected String functionId
The description of how the functional point is being used


attributes

protected Map attributes
A list of attributes that this functional point uses


steps

protected ArrayList steps
A list of steps that this FunctionalPoint uses during execution

Constructor Detail

FunctionalPoint

public FunctionalPoint()
Default constructor only used to initialize variables

Method Detail

addAttribute

public void addAttribute(Attribute attr)
Adds an Attribute to the list of attributes used by this FunctionalPoint

Parameters:
attr - - An attribute used by this FunctionalPoint

addApplication

public void addApplication(String applicationName)
Adds an application to the list of applications supported by this FunctionalPoint

Parameters:
applicationName - - The name of the application supported

addStep

public void addStep(String step)
Adds a step to the list of steps required to execute this FunctionalPoint

Parameters:
step - - A simple instruction to execute this functional point

getAttribute

public Attribute getAttribute(String name)
Gets a particular attribute. It first tries by searching for the name (method name or instance name), then by searching via the contextName

Returns:
an attribute matching the given name or contextName

getApplications

public ArrayList getApplications()
Gets the applications supported by this functional point

Returns:
The applications supported by this functional point

getAuthor

public String getAuthor()
Returns:
The name of the developer that wrote this FunctionalPoint

setAuthor

public void setAuthor(String author)
Sets the name of the developer that wrote this FunctionalPoint

Parameters:
author - - The name of the developer that wrote this FunctionalPoint

getClassName

public String getClassName()
Returns:
The name of the class that represents this FunctionalPoint

setClassName

public void setClassName(String className)
Sets the name of the class that represents this FunctionalPoint

Parameters:
className - - the name of the class that represents this FunctionalPoint

getDefaultTagName

public String getDefaultTagName()
Returns:
The default tag name to be used in the test case macro language

getTagNames

public List getTagNames()
Gets all tag names registered for this functional point Functional points can have multiple tag names

Returns:
The tag name to be used in the test case macro language

addTagName

public void addTagName(String tagName)
Adds a tag name - a name used in the test case macro language Functional points can have multiple tag names

Parameters:
tagName - - The tag name to be used in the test case macro language

getDescription

public String getDescription()
Returns:
A short summary about how this functional can be used

setDescription

public void setDescription(String description)
Sets a short summary about how this functional can be used

Parameters:
description - - A short summary about how this functional can be used

getShortDescription

public String getShortDescription()
Gets the first line of the javadoc class comments.

Returns:
The first line of the javadoc class comments.

setShortDescription

public void setShortDescription(String shortDescription)
Sets the first line of the description

Parameters:
shortDescription - - the first line on the javadoc class comment.

getFunctionId

public String getFunctionId()
Returns:
A short summary about how this functional point is used

setFunctionId

public void setFunctionId(String functionId)
Sets a short summary about how this functional point is used

Parameters:
functionId - - A short summary about how this functional point is used

getType

public String getType()
               throws JameleonException
Returns:
The type of the functional point
Throws:
JameleonException - if the type is set and it isn't action, validation, nor navigation

setType

public void setType(String type)
Sets he type of the functional point

Parameters:
type - - Valid values are action, validation, navigation

getAttributes

public Map getAttributes()
Returns:
A list of attributes that this functional point uses

setAttributes

public void setAttributes(Map attributes)
Sets A list of attributes that this functional point uses

Parameters:
attributes - A list of attributes that this functional point uses

getSteps

public List getSteps()
Returns:
A list of steps that this FunctionalPoint uses during execution

setSteps

public void setSteps(ArrayList steps)
Sets a list of steps that this FunctionalPoint uses during execution

Parameters:
steps - - A list of steps that this FunctionalPoint uses during execution

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

cloneFP

public FunctionalPoint cloneFP()

toXML

public String toXML()
Description copied from interface: XMLable
Implement this method the same way the toString method would be implemented, except the object's information should be in a valid XML format.

Specified by:
toXML in interface XMLable

toString

public String toString()
Overrides:
toString in class Object
Returns:
The first (the default) tag name

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.