PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/hudson-core/src/main/java/hudson/scm/ChangeLogEntry.java

http://github.com/hudson/hudson
Java | 104 lines | 13 code | 9 blank | 82 comment | 0 complexity | a33d562df77d8adbafd101c13de53e59 MD5 | raw file
  1/*
  2 * The MIT License
  3 *
  4 * Copyright (c) 2011, Oracle Corporation, Nikita Levyankov
  5 *
  6 * Permission is hereby granted, free of charge, to any person obtaining a copy
  7 * of this software and associated documentation files (the "Software"), to deal
  8 * in the Software without restriction, including without limitation the rights
  9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 10 * copies of the Software, and to permit persons to whom the Software is
 11 * furnished to do so, subject to the following conditions:
 12 *
 13 * The above copyright notice and this permission notice shall be included in
 14 * all copies or substantial portions of the Software.
 15 *
 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 22 * THE SOFTWARE.
 23 */
 24package hudson.scm;
 25
 26import hudson.model.User;
 27import java.util.Collection;
 28
 29/**
 30 * Interface that represents entry from change log.
 31 * Note: this interface is gonna be used in email-ext plugin and some other plugins.
 32 * So, changing methods signatures could broke existing logic.
 33 * <p/>
 34 * <p/>
 35 * Date: 5/23/11
 36 *
 37 * @author Nikita Levyankov
 38 */
 39interface ChangeLogEntry {
 40    ChangeLogSet getParent();
 41
 42    /**
 43     * Gets the text fully marked up by {@link ChangeLogAnnotator}.
 44     *
 45     * @return annotated message.
 46     */
 47    String getMsgAnnotated();
 48
 49    /**
 50     * Gets the "commit message".
 51     * <p/>
 52     * The exact definition depends on the individual SCM implementation.
 53     *
 54     * @return Can be empty but never null.
 55     */
 56    String getMsg();
 57
 58    /**
 59     * Returns a set of paths in the workspace that was
 60     * affected by this change.
 61     * <p/>
 62     * Contains string like 'foo/bar/zot'. No leading/trailing '/',
 63     * and separator must be normalized to '/'.
 64     *
 65     * @return never null.
 66     */
 67    Collection<String> getAffectedPaths();
 68
 69    /**
 70     * The user who made this change.
 71     *
 72     * @return never null.
 73     */
 74    User getAuthor();
 75
 76    /**
 77     * Return string representation of user.
 78     *
 79     * @return name or id.
 80     */
 81    String getUser();
 82
 83    /**
 84     * Returns revision version.
 85     * Some VCS's use string representation of revision number, for ex. git or cvs;
 86     * perforce, svn - use numeric values for revisions
 87     *
 88     * @return revision version.
 89     */
 90    String getCurrentRevision();
 91
 92    /**
 93     * Returns a set of paths in the workspace that was
 94     * affected by this change.
 95     * <p/>
 96     * Noted: since this is a new interface, some of the SCMs may not have
 97     * implemented this interface. The default implementation for this
 98     * interface is throw UnsupportedOperationException
 99     *
100     * @return AffectedFile never null.
101     * @since 2.0.1
102     */
103    Collection<? extends ChangeLogSet.AffectedFile> getAffectedFiles();
104}