Source Code Cross Referenced for SVNStatusType.java in  » Source-Control » tmatesoft-SVN » org » tmatesoft » svn » core » wc » 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.wc 
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:        package org.tmatesoft.svn.core.wc;
013:
014:        /**
015:         * <b>SVNStatusType</b> provides information about versioned items' 
016:         * status type. This class contains a set of predefined constants each of that 
017:         * should be compared with a refrence to an <b>SVNStatusType</b> to find 
018:         * out the item's status type. That is done either in event handlers
019:         * (implementing <b>ISVNEventHandler</b>) registered for <b>SVN</b>*<b>Client</b>
020:         * objects like this:
021:         * <pre class="javacode">
022:         * <span class="javakeyword">import</span> org.tmatesoft.svn.core.wc.ISVNEventHandler;
023:         * <span class="javakeyword">import</span> org.tmatesoft.svn.core.wc.SVNStatusType;
024:         * <span class="javakeyword">import</span> org.tmatesoft.svn.core.wc.SVNEventAction;
025:         * ...
026:         * 
027:         * <span class="javakeyword">public class</span> MyCustomEventHandler <span class="javakeyword">implements</span> ISVNEventHandler {
028:         *     <span class="javakeyword">public void</span> handleEvent(SVNEvent event, <span class="javakeyword">double</span> progress){    
029:         *         ...
030:         *         
031:         *         <span class="javakeyword">if</span>(event.getAction() == SVNEventAction.UPDATE_UPDATE){
032:         *            <span class="javacomment">//get contents status type</span>
033:         *            SVNStatusType contentsStatus = event.getContentsStatus();
034:         *            <span class="javacomment">//parse it</span>
035:         *            <span class="javakeyword">if</span>(contentsStatus != SVNStatusType.INAPPLICABLE){
036:         *                <span class="javakeyword">if</span>(contentsStatus == SVNStatusType.CONFLICTED){
037:         *                    ...
038:         *                }
039:         *            }      
040:         *         
041:         *            <span class="javacomment">//get properties status type</span>
042:         *            SVNStatusType propertiesStatus = event.getPropertiesStatus();
043:         *            <span class="javacomment">//parse it</span>
044:         *            <span class="javakeyword">if</span>(propertiesStatus != SVNStatusType.INAPPLICABLE){
045:         *                <span class="javakeyword">if</span>(contentsStatus == SVNStatusType.CONFLICTED){
046:         *                    ...
047:         *                }
048:         *            }
049:         *         }
050:         *         ...
051:         *     }
052:         *     ...
053:         * }</pre>
054:         * <br>
055:         * or in a status handler (implementing <b>ISVNStatusHandler</b>) registered 
056:         * for an <b>SVNStatusClient</b> like this:
057:         * <pre class="javacode">
058:         * <span class="javakeyword">import</span> org.tmatesoft.svn.core.wc.ISVNStatusHandler;
059:         * <span class="javakeyword">import</span> org.tmatesoft.svn.core.wc.SVNStatus;
060:         * <span class="javakeyword">import</span> org.tmatesoft.svn.core.wc.SVNStatusType;
061:         * ...
062:         * 
063:         * <span class="javakeyword">public class</span> MyCustomStatusHandler <span class="javakeyword">implements</span> ISVNStatusHandler {
064:         *     <span class="javakeyword">public void</span> handleStatus(SVNStatus status){    
065:         *         ...
066:         *         
067:         *         <span class="javacomment">//get contents status type</span>
068:         *         SVNStatusType contentsStatus = status.getContentsStatus();
069:         *         <span class="javacomment">//parse it</span>
070:         *         <span class="javakeyword">if</span>(contentsStatus == SVNStatusType.STATUS_MODIFIED){
071:         *             ...
072:         *         }<span class="javakeyword">else if</span>(contentsStatus == SVNStatusType.STATUS_CONFLICTED){
073:         *             ...
074:         *         }      
075:         *         ...
076:         *         <span class="javacomment">//get properties status type</span>
077:         *         SVNStatusType propertiesStatus = status.getPropertiesStatus();
078:         *         <span class="javacomment">//parse it</span>
079:         *         <span class="javakeyword">if</span>(contentsStatus == SVNStatusType.STATUS_MODIFIED){
080:         *             ...
081:         *         }<span class="javakeyword">else if</span>(contentsStatus == SVNStatusType.STATUS_CONFLICTED){
082:         *             ...
083:         *         }
084:         *         ...
085:         *     }
086:         *     ...
087:         * }</pre>
088:         * 
089:         * @version 1.1.1
090:         * @author  TMate Software Ltd.
091:         * @see     SVNEvent
092:         * @see     SVNStatus
093:         */
094:        public class SVNStatusType {
095:
096:            private int myID;
097:            private String myName;
098:            private char myCode;
099:
100:            private SVNStatusType(int id, String name) {
101:                this (id, name, ' ');
102:            }
103:
104:            private SVNStatusType(int id, String name, char code) {
105:                myID = id;
106:                myName = name;
107:                myCode = code;
108:            }
109:
110:            /**
111:             * Returns this object's identifier as an integer nbumber.
112:             * Each constant field of the <b>SVNStatusType</b> class is also an 
113:             * <b>SVNStatusType</b> object with its own id. 
114:             * 
115:             * @return id of this object 
116:             */
117:            public int getID() {
118:                return myID;
119:            }
120:
121:            /**
122:             * Returns id of this object. 
123:             * 
124:             * @return id code
125:             */
126:            public char getCode() {
127:                return myCode;
128:            }
129:
130:            /**
131:             * Returns a string representation of this object. As a matter of fact
132:             * this is a string representation of this object's id.
133:             * 
134:             * @return a string representing this object
135:             */
136:            public String toString() {
137:                return myName == null ? Integer.toString(myID) : myName;
138:            }
139:
140:            /**
141:             * During some operations denotes that status info of item contents or
142:             * properties is inapplicable. For example, this takes place during a 
143:             * commit operation - if there is any {@link ISVNEventHandler} registered
144:             * for an {@link SVNCommitClient} then events that are dispatched to that event 
145:             * handler will have contents and properties status types set to <i>INAPPLICABLE</i>:
146:             * <pre class="javacode">
147:             * <span class="javakeyword">public class</span> MyCommitEventHandler <span class="javakeyword">implements</span> ISVNEventHandler{
148:             * ...    
149:             *     
150:             *     <span class="javakeyword">public void</span> handleEvent(SVNEvent event, <span class="javakeyword">double</span> progress){
151:             *         <span class="javacomment">//both are SVNStatusType.INAPPLICABLE</span>
152:             *         SVNStatusType contentsStatus = event.getContentsStatus();
153:             *         SVNStatusType propsStatus = event.getPropertiesStatus();
154:             *     }
155:             * ...
156:             * }</pre> 
157:             *  
158:             */
159:            public static final SVNStatusType INAPPLICABLE = new SVNStatusType(
160:                    0, "inapplicable");
161:
162:            /**
163:             * Denotes that the resultant status of the operation is for some
164:             * reason unknown.
165:             */
166:            public static final SVNStatusType UNKNOWN = new SVNStatusType(1,
167:                    "unknown");
168:
169:            /**
170:             * During an operation denotes that file item contents or file/directory
171:             * item properties are not changed.  For example, in a Working Copy-to-URL copying.
172:             */
173:            public static final SVNStatusType UNCHANGED = new SVNStatusType(2,
174:                    "unchanged");
175:
176:            /**
177:             * Denotes that the item is versioned but missing (deleted from the 
178:             * fylesystem).
179:             */
180:            public static final SVNStatusType MISSING = new SVNStatusType(3,
181:                    "missing");
182:
183:            /**
184:             * Denotes that the item has an unexpected kind or somehow damaged or
185:             * can not be managed by an operation.
186:             */
187:            public static final SVNStatusType OBSTRUCTED = new SVNStatusType(4,
188:                    "obstructed");
189:
190:            /**
191:             * During an operation (like an update) denotes that the item contents
192:             * or item properties were changed.
193:             */
194:            public static final SVNStatusType CHANGED = new SVNStatusType(5,
195:                    "changed");
196:
197:            /**
198:             * During an operation (like an update or merge) denotes that the file 
199:             * item contents or file/directory item properties were merged 
200:             * with changes that came from the repository, so that local modifications 
201:             * and arrived ones do not overlap. 
202:             */
203:            public static final SVNStatusType MERGED = new SVNStatusType(6,
204:                    "merged");
205:
206:            /**
207:             * During an operation (like an update) denotes that the file item contents 
208:             * or file/directory item properties are in conflict with those changes that
209:             * came from the repository. 
210:             */
211:            public static final SVNStatusType CONFLICTED = new SVNStatusType(7,
212:                    "conflicted");
213:
214:            /**
215:             * Denotes that the conflict state on the item is still unresolved.
216:             * For example, it can be set when trying to merge into a file that is
217:             * in conflict with the repository.  
218:             */
219:            public static final SVNStatusType CONFLICTED_UNRESOLVED = new SVNStatusType(
220:                    8, "conflicted_unresolved");
221:
222:            /**
223:             * During some operations denotes that lock status is inapplicable. 
224:             * For example, this takes place during a commit operation - if there 
225:             * is any {@link ISVNEventHandler} registered for {@link SVNCommitClient} 
226:             * then events that are dispatched to that event handler will have the 
227:             * lock status type set to <i>LOCK_INAPPLICABLE</i>:
228:             * <pre class="javacode">
229:             * <span class="javakeyword">public class</span> MyCommitEventHandler <span class="javakeyword">implements</span> ISVNEventHandler{
230:             * ...    
231:             *     
232:             *     <span class="javakeyword">public void</span> handleEvent(SVNEvent event, <span class="javakeyword">double</span> progress){
233:             *         <span class="javacomment">//is SVNStatusType.LOCK_INAPPLICABLE</span>
234:             *         SVNStatusType lockStatus = event.getLockStatus();
235:             *     }
236:             * ...
237:             * }</pre> 
238:             */
239:            public static final SVNStatusType LOCK_INAPPLICABLE = new SVNStatusType(
240:                    0, "lock_inapplicable");
241:
242:            /**
243:             * No lock information is known.
244:             */
245:            public static final SVNStatusType LOCK_UNKNOWN = new SVNStatusType(
246:                    1, "lock_unknown");
247:
248:            /**
249:             * During an operation denotes that the lock status wasn't changed. For example, in a 
250:             * Working Copy-to-URL copying.
251:             */
252:            public static final SVNStatusType LOCK_UNCHANGED = new SVNStatusType(
253:                    2, "lock_unchanged");
254:
255:            /**
256:             * During an operation denotes that the file item's locked. 
257:             */
258:            public static final SVNStatusType LOCK_LOCKED = new SVNStatusType(
259:                    3, "lock_locked");
260:
261:            /**
262:             * During an operation (like an update) denotes that the file item's lock 
263:             * was broken in the repositry by some other user.
264:             */
265:            public static final SVNStatusType LOCK_UNLOCKED = new SVNStatusType(
266:                    4, "lock_unlocked");
267:
268:            /**
269:             * In a status operation denotes that no status type information is 
270:             * available. 
271:             */
272:            public static final SVNStatusType STATUS_NONE = new SVNStatusType(
273:                    0, "none");
274:
275:            /**
276:             * In a status operation (if it's being running with an option to report
277:             * of all items set to <span class="javakeyword">true</span>) denotes that the 
278:             * item in the Working Copy being currently processed has no local changes 
279:             * (in a normal state).  
280:             */
281:            public static final SVNStatusType STATUS_NORMAL = new SVNStatusType(
282:                    1, "normal", ' ');
283:
284:            /**
285:             * In a status operation denotes that the item in the Working Copy being 
286:             * currently processed has local modifications.
287:             */
288:            public static final SVNStatusType STATUS_MODIFIED = new SVNStatusType(
289:                    2, "modified", 'M');
290:
291:            /**
292:             * In a status operation denotes that the item in the Working Copy being 
293:             * currently processed is scheduled for addition to the repository.
294:             */
295:            public static final SVNStatusType STATUS_ADDED = new SVNStatusType(
296:                    3, "added", 'A');
297:
298:            /**
299:             * In a status operation denotes that the item in the Working Copy being 
300:             * currently processed is scheduled for deletion from the repository.
301:             */
302:            public static final SVNStatusType STATUS_DELETED = new SVNStatusType(
303:                    4, "deleted", 'D');
304:
305:            /**
306:             * In a status operation denotes that the item in the Working Copy being 
307:             * currently processed is not under version control.
308:             */
309:            public static final SVNStatusType STATUS_UNVERSIONED = new SVNStatusType(
310:                    5, "unversioned", '?');
311:
312:            /**
313:             * In a status operation denotes that the item in the Working Copy being 
314:             * currently processed is under version control but is missing  - for example, 
315:             * removed from the filesystem with a non-SVN, non-SVNKit or 
316:             * any other SVN non-compatible delete command).
317:             */
318:            public static final SVNStatusType STATUS_MISSING = new SVNStatusType(
319:                    6, "missing", '!');
320:
321:            /**
322:             * In a status operation denotes that the item in the Working Copy being 
323:             * currently processed was replaced by another item with the same name (within
324:             * a single revision the item was scheduled for deletion and then a new one with
325:             * the same name was scheduled for addition). Though they may have the same name
326:             * the items have their own distinct histories. 
327:             */
328:            public static final SVNStatusType STATUS_REPLACED = new SVNStatusType(
329:                    7, "replaced", 'R');
330:
331:            /**
332:             * In a status operation denotes that the item in the Working Copy being 
333:             * currently processed is in a conflict state (local changes overlap those 
334:             * that came from the repository). The conflicting overlaps need to be manually
335:             * resolved.
336:             */
337:            public static final SVNStatusType STATUS_CONFLICTED = new SVNStatusType(
338:                    9, "conflicted", 'C');
339:
340:            /**
341:             * In a status operation denotes that the item in the Working Copy being 
342:             * currently processed has a non-expected kind. For example, a file is 
343:             * considered to be obstructed if it was deleted (with an SVN client non-compatible 
344:             * delete operation) and a directory with the same name as the file had had was added 
345:             * (but again with an SVN client non-compatible operation).
346:             */
347:            public static final SVNStatusType STATUS_OBSTRUCTED = new SVNStatusType(
348:                    10, "obstructed", '~');
349:
350:            /**
351:             * In a status operation denotes that the file item in the Working Copy being 
352:             * currently processed was set to be ignored (was added to svn:ignore property).
353:             */
354:            public static final SVNStatusType STATUS_IGNORED = new SVNStatusType(
355:                    11, "ignored", 'I');
356:
357:            /**
358:             * In a status operation denotes that the item in the Working Copy being 
359:             * currently processed is under version control but is somehow incomplete - 
360:             * for example, it may happen when the previous update was interrupted. 
361:             */
362:            public static final SVNStatusType STATUS_INCOMPLETE = new SVNStatusType(
363:                    12, "incomplete", '!');
364:
365:            /**
366:             * In a status operation denotes that the item in the Working Copy being 
367:             * currently processed is not under version control but is related to 
368:             * externals definitions. 
369:             */
370:            public static final SVNStatusType STATUS_EXTERNAL = new SVNStatusType(
371:                    13, "external", 'X');
372:
373:            /**
374:             * In a status operation denotes that the item in the Working Copy being 
375:             * currently processed was merged - that is it was applied the differences
376:             * (delta) between two sources in a merge operation.
377:             * 
378:             * @deprecated this status is never reported by 'status' operation 
379:             * in this version, 'update' and 'merge' uses {@link SVNStatusType#MERGED} instead. 
380:             *  
381:             */
382:            public static final SVNStatusType STATUS_MERGED = new SVNStatusType(
383:                    8, "merged", 'G');
384:
385:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.