Source Code Cross Referenced for SVNCommitInfo.java in  » Source-Control » tmatesoft-SVN » org » tmatesoft » svn » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Source Control » tmatesoft SVN » org.tmatesoft.svn.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ====================================================================
003:         * Copyright (c) 2004-2008 TMate Software Ltd.  All rights reserved.
004:         *
005:         * This software is licensed as described in the file COPYING, which
006:         * you should have received as part of this distribution.  The terms
007:         * are also available at http://svnkit.com/license.html
008:         * If newer versions of this license are posted there, you may use a
009:         * newer version instead, at your option.
010:         * ====================================================================
011:         */
012:
013:        package org.tmatesoft.svn.core;
014:
015:        import java.util.Date;
016:
017:        /**
018:         * The <b>SVNCommitInfo</b> class represents information about a committed 
019:         * revision. Commit information includes:
020:         * <ol>
021:         * <li>a revision number;
022:         * <li>a datestamp when the revision was committed;
023:         * <li>the name of the revision author.
024:         * </ol>
025:         * In addition, this class provides anexception that, if a commit has failed,
026:         * has got a description of a failure reason.
027:         * 
028:         * @version 1.1.1
029:         * @author  TMate Software Ltd.
030:         */
031:        public class SVNCommitInfo {
032:            /**
033:             * Denotes an unsuccessful commit.
034:             */
035:            public static final SVNCommitInfo NULL = new SVNCommitInfo(-1,
036:                    null, null, null);
037:
038:            private long myNewRevision;
039:            private Date myDate;
040:            private String myAuthor;
041:            private SVNErrorMessage myErrorMessage;
042:
043:            /**
044:             * 
045:             * Constructs an <b>SVNCommitInfo</b> object.
046:             * 
047:             * @param revision 		a revision number 
048:             * @param author 		the name of the author who committed the revision
049:             * @param date 			the datestamp when the revision was committed
050:             */
051:            public SVNCommitInfo(long revision, String author, Date date) {
052:                this (revision, author, date, null);
053:            }
054:
055:            /**
056:             * Constructs an <b>SVNCommitInfo</b> object.
057:             * 
058:             * @param revision      a revision number 
059:             * @param author        the name of the author who committed the revision
060:             * @param date          the datestamp when the revision was committed
061:             * @param error         if a commit failed - this is an error description 
062:             *                      containing details on the failure 
063:             */
064:            public SVNCommitInfo(long revision, String author, Date date,
065:                    SVNErrorMessage error) {
066:                myNewRevision = revision;
067:                myAuthor = author;
068:                myDate = date;
069:                myErrorMessage = error;
070:            }
071:
072:            /**
073:             * Gets the revision number the repository was committed to.
074:             * 
075:             * @return 	a revision number
076:             */
077:            public long getNewRevision() {
078:                return myNewRevision;
079:            }
080:
081:            /**
082:             * Gets the name of the revision author
083:             * 
084:             * @return 	a revision author's name
085:             */
086:            public String getAuthor() {
087:                return myAuthor;
088:            }
089:
090:            /**
091:             * Gets the datestamp when the revision was committed.
092:             *
093:             * @return 	a revision datestamp
094:             */
095:            public Date getDate() {
096:                return myDate;
097:            }
098:
099:            /**
100:             * Gets an error message for a failed commit (if it 
101:             * has failed). This message will usually keep the entire 
102:             * stack trace of all the error messages as of results of errors
103:             * occurred. 
104:             * 
105:             * @return an error messages or <span class="javakeyword">null</span>. 
106:             */
107:            public SVNErrorMessage getErrorMessage() {
108:                return myErrorMessage;
109:            }
110:
111:            /**
112:             * @deprecated use {@link #getErrorMessage() } instead
113:             */
114:            public SVNException getError() {
115:                if (myErrorMessage != null) {
116:                    return new SVNException(getErrorMessage());
117:                }
118:                return null;
119:            }
120:
121:            /**
122:             * Gives a string representation of this object.
123:             * 
124:             * @return a string describing commit info
125:             */
126:            public String toString() {
127:                if (this  == NULL) {
128:                    return "EMPTY COMMIT";
129:                } else if (myErrorMessage == null) {
130:                    StringBuffer sb = new StringBuffer();
131:                    sb.append("r");
132:                    sb.append(myNewRevision);
133:                    if (myAuthor != null) {
134:                        sb.append(" by '");
135:                        sb.append(myAuthor);
136:                        sb.append("'");
137:                    }
138:                    if (myDate != null) {
139:                        sb.append(" at ");
140:                        sb.append(myDate);
141:                    }
142:                    return sb.toString();
143:                } else {
144:                    return myErrorMessage.getFullMessage();
145:                }
146:            }
147:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.