Class ChangeHistorySet

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

public class ChangeHistorySet extends Object
This represents a easier way to test change history. A ChangeHistorySet is a set of ChangeHistoryField objects by a specified user.
Since:
v3.13
  • Constructor Details

    • ChangeHistorySet

      public ChangeHistorySet(ChangeHistoryList changeHistoryList, String changedBy, String id)
    • ChangeHistorySet

      public ChangeHistorySet(ChangeHistorySet changeHistorySet)
      Constructs a new ChangeHistorySet based on an existing one.
      Parameters:
      changeHistorySet - The existing ChangeHistorySet.
  • Method Details

    • getContainingChangeHistoryList

      public ChangeHistoryList getContainingChangeHistoryList()
    • getChangedBy

      public String getChangedBy()
    • getId

      public String getId()
    • getFieldChanges

      public Set getFieldChanges()
    • add

      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
    • add

      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
    • lastOf

      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
    • iterator

      public Iterator iterator()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isSuperSetOf

      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