Class BaselineRepositoryImpl

java.lang.Object
org.japprove.repositories.BaselineRepositoryImpl
All Implemented Interfaces:
BaselineRepository

public class BaselineRepositoryImpl
extends java.lang.Object
implements BaselineRepository
An implementation of the BaselineRepository with a text file based approach.
  • Constructor Summary

    Constructors 
    Constructor Description
    BaselineRepositoryImpl​(ApprovalTestingConfiguration config)  
  • Method Summary

    Modifier and Type Method Description
    boolean baselineExists​(java.lang.String baselineCandidateName)
    Returns true if the baseline exists and false otherwise.
    void copyBaselineCandidateToBaseline​(java.lang.String baselineCandidateName)
    Copies the content of the baseline candidate to the baseline.
    void createBaselineCandidate​(com.fasterxml.jackson.databind.JsonNode data, java.lang.String name)
    Creates a new JsonFile and writes the data into this file.
    void createBaselineCandidate​(java.lang.String data, java.lang.String name)
    Creates a new TextFile and writes the data into this file.
    java.io.File getBaselineAsFile​(java.lang.String name)
    Returns the content of the baseline in a file.
    java.io.File getBaselineCandidateAsFile​(java.lang.String name)
    Returns the content of the baseline candidate in a file.
    java.util.List<java.lang.String> getBaselineCandidateNames()
    Returns a list of all baseline candidates names.
    com.fasterxml.jackson.databind.JsonNode getContentOfJsonBaseline​(java.lang.String baseline)
    Returns the content of the requested baseline.
    java.lang.String getContentOfTextBaseline​(java.lang.String baseline)
    Returns the content of the requested baseline.
    java.lang.String getDifferences​(java.lang.String baselineCandidateName)
    Computes differences of the baseline candidate and the baseline.
    boolean removeBaselineCandidate​(java.lang.String name)
    Removes an baseline candidate by its name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait