Java Doc for SVNEvent.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 Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.tmatesoft.svn.core.wc.SVNEvent

SVNEvent
public class SVNEvent (Code)
The SVNEvent class is used to provide detailed information on an operation progress to the ISVNEventHandler (if any) registered for an SVN*Client object. Such events are generated by an operation invoked by do*() method of an SVN*Client object and passed to a developer's event handler for notification. Retrieving information out of an SVNEvent the developer can decide how it should be interpreted.

This is an example:
implementing ISVNEventHandler

 import org.tmatesoft.svn.core.wc.ISVNEventHandler;
 import org.tmatesoft.svn.core.SVNCancelException;
 import org.tmatesoft.svn.core.wc.SVNEvent;
 import org.tmatesoft.svn.core.wc.SVNEventAction;
 import org.tmatesoft.svn.core.wc.SVNStatusType;
 import org.tmatesoft.svn.core.SVNNodeKind;
 import java.io.File;
 ...
 public class MyCustomUpdateEventHandler implements ISVNEventHandler {
 public void handleEvent(SVNEvent event, double progress) {
 //get the action type
 if(event.getAction() == SVNEventAction.UPDATE_UPDATE){
 //get the item's node kind
 SVNNodeKind kind = even.getNodeKind();
 //get the item's contents status
 if(event.getContentsStatus() == SVNStatusType.CHANGED &&
 kind == SVNNodeKind.FILE){
 ...
 }
 ...
 //get the item's properties status
 if(event.getPropertiesStatus() == SVNStatusType.MERGED){
 ...
 }
 //get the item's lock status
 if(event.getLockStatus() == SVNStatusType.LOCK_UNLOCKED){
 ...
 }
 //get the item's relative path
 String path = event.getPath();
 //or in a java.io.File representation
 File fsEntry = event.getFile(); 
 //get update revision
 long revision = event.getRevision(); 
 ...
 }
 ...
 }
 public void checkCancelled() throws SVNCancelException{
 throw new SVNCancelException("cancelled!");
 }
 }

then registering a handler:
 import org.tmatesoft.svn.core.wc.SVNUpdateClient;
 ...
 SVNUpdateClient updateClient;
 ...
 updateClient.setEventHandler(new MyCustomUpdateEventHandler());
 ...

now when invoking an update operation:
 updateClient.doUpdate(...);

the registered instance of the ISVNEventHandler implementation will be dispatched progress events.


version:
   1.1.1
author:
   TMate Software Ltd.
See Also:   ISVNEventHandler
See Also:   SVNStatusType
See Also:   SVNEventAction
See Also:    Examples



Constructor Summary
public  SVNEvent(SVNErrorMessage errorMessage)
     Constructs an SVNEvent object given an error message for a filed operation.
public  SVNEvent(SVNAdminAreaInfo info, SVNAdminArea adminArea, String name, SVNEventAction action, SVNEventAction expectedAction, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)
     Constructs an SVNEvent object.

Used by SVNKit internals to construct and initialize an SVNEvent object.

public  SVNEvent(SVNAdminAreaInfo info, SVNAdminArea adminArea, String name, SVNEventAction action, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)
     Constructs an SVNEvent object.

Used by SVNKit internals to construct and initialize an SVNEvent object.

public  SVNEvent(File rootFile, File file, SVNEventAction action, SVNEventAction expected, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)
     Constructs an SVNEvent object filling it with informational details most of that would be retrieved and analized by an ISVNEventHandler implementation.
public  SVNEvent(File rootFile, File file, SVNEventAction action, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)
     Constructs an SVNEvent object filling it with informational details most of that would be retrieved and analized by an ISVNEventHandler implementation.

Method Summary
public  SVNEventActiongetAction()
     Gets the type of an action performed upon the item.
public  SVNStatusTypegetContentsStatus()
     Gets the status type of either file or directory contents. Use predefined SVNStatusType constants to examine the item's status.
public  SVNErrorMessagegetErrorMessage()
     Gets the error message that (if it's an error situation and therefore the string is not null) points to some fault.
public  SVNEventActiongetExpectedAction()
     Returns the expected action.
public  FilegetFile()
     Gets a java.io.File representation of the item's path.
public  SVNLockgetLock()
     Gets the file item's lock information (if any) represented by an SVNLock object.
public  SVNStatusTypegetLockStatus()
     Gets the file item's lock status.
public  StringgetMimeType()
     Gets the MIME type of the item relying upon the special SVN's 'svn:mime-type' property.
public  SVNNodeKindgetNodeKind()
     Gets the node kind of the item characterizing it as an entry - whether it's a directory, file, etc.
public  StringgetPath()
     Gets the item's path relative to the Working Copy root directory.
public  SVNStatusTypegetPropertiesStatus()
     Gets the status type of the item's properties.
public  longgetRevision()
     Gets the revision number specific for the action context.
public  voidsetErrorMessage(SVNErrorMessage errorMessage)
    
public  voidsetPath(String path)
     Sets the item's path relative to the Working Copy root.


Constructor Detail
SVNEvent
public SVNEvent(SVNErrorMessage errorMessage)(Code)
Constructs an SVNEvent object given an error message for a filed operation.

Used by SVNKit internals to construct and initialize an SVNEvent object. It's not intended for users (from an API point of view).
Parameters:
  errorMessage - the message describing the operation fault




SVNEvent
public SVNEvent(SVNAdminAreaInfo info, SVNAdminArea adminArea, String name, SVNEventAction action, SVNEventAction expectedAction, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)(Code)
Constructs an SVNEvent object.

Used by SVNKit internals to construct and initialize an SVNEvent object. It's not intended for users (from an API point of view).
Parameters:
  info - admin info
Parameters:
  adminArea - admin area the item belongs to
Parameters:
  name - the item's name
Parameters:
  action - the type of action the item is exposed to
Parameters:
  expectedAction - the action type that was expected
Parameters:
  kind - the item's node kind
Parameters:
  revision - a revision number
Parameters:
  mimetype - the item's MIME type
Parameters:
  cstatus - the item's contents status
Parameters:
  pstatus - the item's properties status
Parameters:
  lstatus - the item's lock status
Parameters:
  lock - the item's lock
Parameters:
  error - an error message




SVNEvent
public SVNEvent(SVNAdminAreaInfo info, SVNAdminArea adminArea, String name, SVNEventAction action, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)(Code)
Constructs an SVNEvent object.

Used by SVNKit internals to construct and initialize an SVNEvent object. It's not intended for users (from an API point of view).
Parameters:
  info - admin info
Parameters:
  adminArea - admin area the item belongs to
Parameters:
  name - the item's name
Parameters:
  action - the type of action the item is exposed to
Parameters:
  kind - the item's node kind
Parameters:
  revision - a revision number
Parameters:
  mimetype - the item's MIME type
Parameters:
  cstatus - the item's contents status
Parameters:
  pstatus - the item's properties status
Parameters:
  lstatus - the item's lock status
Parameters:
  lock - the item's lock
Parameters:
  error - an error message




SVNEvent
public SVNEvent(File rootFile, File file, SVNEventAction action, SVNEventAction expected, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)(Code)
Constructs an SVNEvent object filling it with informational details most of that would be retrieved and analized by an ISVNEventHandler implementation.

Used by SVNKit internals to construct and initialize an SVNEvent object. It's not intended for users (from an API point of view).

If action is SVNEventAction.SKIP (i.e. operation is skipped) then the expected action (that would have occurred if the operation hadn't been skipped) is provided in expected.
Parameters:
  rootFile - the item's root directory
Parameters:
  file - the item's path itself
Parameters:
  action - the type of action the item is exposed to
Parameters:
  expected - the action that is expected to happen, but maybe skipped in real for some reason
Parameters:
  kind - the item's node kind
Parameters:
  revision - a revision number
Parameters:
  mimetype - the item's MIME type
Parameters:
  cstatus - the item's contents status
Parameters:
  pstatus - the item's properties status
Parameters:
  lstatus - the item's lock status
Parameters:
  lock - the item's lock
Parameters:
  error - an error message




SVNEvent
public SVNEvent(File rootFile, File file, SVNEventAction action, SVNNodeKind kind, long revision, String mimetype, SVNStatusType cstatus, SVNStatusType pstatus, SVNStatusType lstatus, SVNLock lock, SVNErrorMessage error)(Code)
Constructs an SVNEvent object filling it with informational details most of that would be retrieved and analized by an ISVNEventHandler implementation.

Used by SVNKit internals to construct and initialize an SVNEvent object. It's not intended for users (from an API point of view).
Parameters:
  rootFile - the item's root directory
Parameters:
  file - the item's path itself
Parameters:
  action - the type of action the item is exposed to
Parameters:
  kind - the item's node kind
Parameters:
  revision - a revision number
Parameters:
  mimetype - the item's MIME type
Parameters:
  cstatus - the item's contents status
Parameters:
  pstatus - the item's properties status
Parameters:
  lstatus - the item's lock status
Parameters:
  lock - the item's lock
Parameters:
  error - an error message





Method Detail
getAction
public SVNEventAction getAction()(Code)
Gets the type of an action performed upon the item. An action is one of predefined SVNEventAction constants that are specific for each kind of operation, such as update actions, commit actions, etc. the current action



getContentsStatus
public SVNStatusType getContentsStatus()(Code)
Gets the status type of either file or directory contents. Use predefined SVNStatusType constants to examine the item's status. For a directory contents are its entries. the item's status type



getErrorMessage
public SVNErrorMessage getErrorMessage()(Code)
Gets the error message that (if it's an error situation and therefore the string is not null) points to some fault. an error message (in case of an error occured) or null if everythingis OK



getExpectedAction
public SVNEventAction getExpectedAction()(Code)
Returns the expected action. It is always the same as the action returned by SVNEvent.getAction() except those cases when SVNEvent.getAction() returns SVNEventAction.SKIP (i.e. when the expected operation is skipped). the expected action



getFile
public File getFile()(Code)
Gets a java.io.File representation of the item's path. the item's path



getLock
public SVNLock getLock()(Code)
Gets the file item's lock information (if any) represented by an SVNLock object. the file item's lock info if the file is locked; otherwise null



getLockStatus
public SVNStatusType getLockStatus()(Code)
Gets the file item's lock status. The value of SVNStatusType.LOCK_INAPPLICABLE means the lock status is irrelevant during the current event action. the lock status of the file item



getMimeType
public String getMimeType()(Code)
Gets the MIME type of the item relying upon the special SVN's 'svn:mime-type' property.

You can use org.tmatesoft.svn.core.SVNProperty 's metods to find out whether it's a text MIME type or a binary:

 import org.tmatesoft.svn.core.SVNProperty;
 ...
 String mimeType = event.getMimeType();
 if(SVNProperty.isBinaryMimeType(mimeType)){
 //your processing
 }
the item's MIME type as a string or null if the item has no'svn:mime-type' property set



getNodeKind
public SVNNodeKind getNodeKind()(Code)
Gets the node kind of the item characterizing it as an entry - whether it's a directory, file, etc. The value of SVNNodeKind.NONE may mean the node kind is inapplicable diring the current event action. The value of SVNNodeKind.UNKNOWN may mean deleted entries. the item's node kind



getPath
public String getPath()(Code)
Gets the item's path relative to the Working Copy root directory. a string representation of the item's path



getPropertiesStatus
public SVNStatusType getPropertiesStatus()(Code)
Gets the status type of the item's properties. The value of SVNStatusType.INAPPLICABLE may mean the item has no versioned properties or that properties status is irrelevant during the current event action. the status type of the item's properties



getRevision
public long getRevision()(Code)
Gets the revision number specific for the action context. It may be whether an update revision or a committed one or an inapplicable value when a revision number is irrelevant during the event action. a revision number



setErrorMessage
public void setErrorMessage(SVNErrorMessage errorMessage)(Code)



setPath
public void setPath(String path)(Code)
Sets the item's path relative to the Working Copy root.
Parameters:
  path - the item's relative path



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.