01: /**
02: * @copyright
03: * ====================================================================
04: * Copyright (c) 2003-2005 CollabNet. All rights reserved.
05: *
06: * This software is licensed as described in the file COPYING, which
07: * you should have received as part of this distribution. The terms
08: * are also available at http://subversion.tigris.org/license-1.html.
09: * If newer versions of this license are posted there, you may use a
10: * newer version instead, at your option.
11: *
12: * This software consists of voluntary contributions made by many
13: * individuals. For exact contribution history, see the revision
14: * history and logs, available at http://subversion.tigris.org/.
15: * ====================================================================
16: * @endcopyright
17: */package org.tigris.subversion.javahl;
18:
19: /**
20: * Subversion notification interface.
21: *
22: * Implement this interface and implement the onNotify method
23: * to provide a custom notification handler to the Modify
24: * class.
25: * If you need to pass extra information to the notification
26: * handler then just add these to you implementing class
27: * @deprecated Use Notify2 instead
28: */
29: public interface Notify {
30: /**
31: * Handler for Subversion notifications.
32: *
33: * Override this function to allow Subversion to
34: * send notifications
35: * @param path on which action happen
36: * @param action subversion action, see svn_wc_notify_action_t
37: * @param kind node kind of path after action occurred
38: * @param mimeType mime type of path after action occurred
39: * @param contentState state of content after action occurred
40: * @param propState state of properties after action occurred
41: * @param revision revision number after action occurred
42: */
43: public void onNotify(String path, int action, int kind,
44: String mimeType, int contentState, int propState,
45: long revision);
46:
47: /**
48: * The type of action occuring.
49: * The values are defined in the interface NotifyAction for building reasons.
50: */
51: public static final class Action implements NotifyAction {
52: /**
53: * Returns the textual representation for the action kind
54: * @param action kind of action
55: * @return english text
56: */
57: public static final String getActionName(int action) {
58: return NotifyAction.actionNames[action];
59: }
60:
61: }
62:
63: /**
64: * The type of notification that is occuring.
65: * The values are defined in the interface NotifyStatus for building reasons.
66: */
67: public static final class Status implements NotifyStatus {
68: /**
69: * Returns the textual representation for the notification type
70: * @param status type of the notification
71: * @return english text
72: */
73: public static final String getStatusName(int status) {
74: return NotifyStatus.statusNames[status];
75: }
76: }
77: }
|