public class

ChangeHistorySet

extends Object
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.changehistory.ChangeHistorySet

Class Overview

This represents a easier way to test change history. A ChangeHistorySet is a set of ChangeHistoryField objects by a specified user.

Summary

Public Constructors
ChangeHistorySet(ChangeHistoryList changeHistoryList, String changedBy)
ChangeHistorySet(ChangeHistorySet changeHistorySet)
Constructs a new ChangeHistorySet based on an existing one.
Public Methods
ChangeHistorySet add(String fieldName, String newValue)
A shortcut method to add change history field entries.
ChangeHistorySet add(String fieldName, String oldValue, String newValue)
Adds a new ChangeHistoryField to the change history entry.
boolean equals(Object o)
String getChangedBy()
ChangeHistoryList getContainingChangeHistoryList()
Set getFieldChanges()
int hashCode()
boolean isSuperSetOf(ChangeHistorySet that)
Returns true if that ChangeHistorySet has the same name and has zero of more fields that occur in this ChangeHistorySet
Iterator iterator()
ChangeHistoryField lastOf(String fieldName)
Returns the last ChangeHistoryField with the specified field name.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ChangeHistorySet (ChangeHistoryList changeHistoryList, String changedBy)

public ChangeHistorySet (ChangeHistorySet changeHistorySet)

Constructs a new ChangeHistorySet based on an existing one.

Parameters
changeHistorySet The existing ChangeHistorySet.

Public Methods

public ChangeHistorySet add (String fieldName, String newValue)

A shortcut method to add change history field entries. This will look back up in the containing ChangeHistoryList and get the previous field values for the named field. It will then use the previous "new value" as the "old value" in this new ChangeHistoryField .

Parameters
fieldName the name of the field
newValue the new value
Returns
  • this

public ChangeHistorySet add (String fieldName, String oldValue, String newValue)

Adds a new ChangeHistoryField to the change history entry. It is a complete field entry with old and new value

Parameters
fieldName the name of the field
oldValue the old value
newValue the new value
Returns
  • this

public boolean equals (Object o)

public String getChangedBy ()

public ChangeHistoryList getContainingChangeHistoryList ()

public Set getFieldChanges ()

public int hashCode ()

public boolean isSuperSetOf (ChangeHistorySet that)

Returns true if that ChangeHistorySet has the same name and has zero of more fields that occur in this ChangeHistorySet

Parameters
that the other ChangeHistorySet
Returns
  • true if we are a super set of that ChangeHistorySet

public Iterator iterator ()

public ChangeHistoryField lastOf (String fieldName)

Returns the last ChangeHistoryField with the specified field name. Does this by navigating back up the enclosing ChangeHistoryList

Parameters
fieldName the name of the field
Returns
  • null if it cant be found

public String toString ()