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

com.tw.go.plugin.model.Revision Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
package com.tw.go.plugin.model;

import com.tw.go.plugin.util.ListUtil;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Revision {
    private String revision;
    private Date timestamp;
    private String comment;
    private String user;
    private String emailId;
    private List modifiedFiles;
    private boolean isMergeCommit;

    public Revision(String revision) {
        this.revision = revision;
        this.isMergeCommit = false;
    }

    public Revision(String revision, Date timestamp, String comment, String user, String emailId, List modifiedFiles) {
        this.revision = revision;
        this.timestamp = timestamp;
        this.comment = comment;
        this.user = user;
        this.emailId = emailId;
        this.modifiedFiles = modifiedFiles;
        this.isMergeCommit = false;
    }

    public String getRevision() {
        return revision;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getEmailId() {
        return emailId;
    }

    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    public List getModifiedFiles() {
        return modifiedFiles;
    }

    public void setModifiedFiles(List modifiedFiles) {
        this.modifiedFiles = modifiedFiles;
    }

    public final ModifiedFile createModifiedFile(String filename, String action) {
        ModifiedFile file = new ModifiedFile(filename, action);
        if (ListUtil.isEmpty(modifiedFiles)) {
            modifiedFiles = new ArrayList();
        }
        modifiedFiles.add(file);
        return file;
    }

    public boolean isMergeCommit() {
        return isMergeCommit;
    }

    public void setMergeCommit(boolean mergeCommit) {
        isMergeCommit = mergeCommit;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy