001: package org.tigris.subversion.javahl;
002:
003: import java.util.Date;
004:
005: /**
006: * @copyright
007: * ====================================================================
008: * Copyright (c) 2003-2004 CollabNet. All rights reserved.
009: *
010: * This software is licensed as described in the file COPYING, which
011: * you should have received as part of this distribution. The terms
012: * are also available at http://subversion.tigris.org/license-1.html.
013: * If newer versions of this license are posted there, you may use a
014: * newer version instead, at your option.
015: *
016: * This software consists of voluntary contributions made by many
017: * individuals. For exact contribution history, see the revision
018: * history and logs, available at http://subversion.tigris.org/.
019: * ====================================================================
020: * @endcopyright
021: */
022: /**
023: * this class describes a single subversion revision with log message,
024: * author and date
025: */
026: public class LogMessage {
027: /**
028: * the log message for the revision
029: */
030: private String message;
031: /**
032: * the date of the commit
033: */
034: private Date date;
035: /**
036: * the number of the revision
037: */
038: private long revision;
039: /**
040: * the author of the commit
041: */
042: private String author;
043:
044: /**
045: * the items changed by this commit (only set when
046: * SVNClientInterface.logmessage is used with discoverPaths true.
047: */
048: private ChangePath[] changedPaths;
049:
050: /**
051: * this constructor is only called only from JNI code
052: * @param m the log message text
053: * @param d the date of the commit
054: * @param r the number of the revision
055: * @param a the author of the commit
056: * @param cp the items changed by this commit
057: */
058: LogMessage(String m, Date d, long r, String a, ChangePath[] cp) {
059: message = m;
060: date = d;
061: revision = r;
062: author = a;
063: changedPaths = cp;
064: }
065:
066: /**
067: * Return the log message text
068: * @return the log message text
069: */
070: public String getMessage() {
071: return message;
072: }
073:
074: /**
075: * Returns the date of the commit
076: * @return the date of the commit
077: */
078: public Date getDate() {
079: return date;
080: }
081:
082: /**
083: * Returns the revision as a Revision object
084: * @return the revision number as a Revision object
085: */
086: public Revision.Number getRevision() {
087: return Revision.createNumber(revision);
088: }
089:
090: /**
091: * Returns the revision as a long integer
092: * @return the revision number as a long integer
093: */
094: public long getRevisionNumber() {
095: return revision;
096: }
097:
098: /**
099: * Returns the author of the commit
100: * @return the author of the commit
101: */
102: public String getAuthor() {
103: return author;
104: }
105:
106: /**
107: * Returns the changes items by this commit
108: * @return the changes items by this commit
109: */
110: public ChangePath[] getChangedPaths() {
111: return changedPaths;
112: }
113:
114: }
|