All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.ac.ceh.components.datastore.git.GitDataRevision Maven / Gradle / Ivy

The newest version!
package uk.ac.ceh.components.datastore.git;

import org.eclipse.jgit.revwalk.RevCommit;
import uk.ac.ceh.components.datastore.DataAuthor;
import uk.ac.ceh.components.datastore.DataRevision;

/**
 *
 * @author cjohn
 */
class GitDataRevision implements DataRevision {
    private final A author;
    private final RevCommit commit;
    
    GitDataRevision(A author, RevCommit commit) {
        this.author = author;
        this.commit = commit;
    }
    
    @Override public String getRevisionID() {
        return commit.getId().getName();
    }

    @Override public String getMessage() {
        return commit.getFullMessage();
    }

    @Override public String getShortMessage() {
        return commit.getShortMessage();
    }

    @Override public A getAuthor() {
        return author;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy