~ubuntu-branches/ubuntu/trusty/subversion/trusty-proposed

« back to all changes in this revision

Viewing changes to subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft
  • Date: 2012-06-21 15:36:36 UTC
  • mfrom: (0.4.13 sid)
  • Revision ID: package-import@ubuntu.com-20120621153636-amqqmuidgwgxz1ly
Tags: 1.7.5-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Create pot file on build.
  - Build a python-subversion-dbg package.
  - Build-depend on python-dbg.
  - Build-depend on default-jre-headless/-jdk.
  - Do not apply java-build patch.
  - debian/rules: Manually create the doxygen output directory, otherwise
    we get weird build failures when running parallel builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @copyright
 
3
 * ====================================================================
 
4
 *    Licensed to the Apache Software Foundation (ASF) under one
 
5
 *    or more contributor license agreements.  See the NOTICE file
 
6
 *    distributed with this work for additional information
 
7
 *    regarding copyright ownership.  The ASF licenses this file
 
8
 *    to you under the Apache License, Version 2.0 (the
 
9
 *    "License"); you may not use this file except in compliance
 
10
 *    with the License.  You may obtain a copy of the License at
 
11
 *
 
12
 *      http://www.apache.org/licenses/LICENSE-2.0
 
13
 *
 
14
 *    Unless required by applicable law or agreed to in writing,
 
15
 *    software distributed under the License is distributed on an
 
16
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
17
 *    KIND, either express or implied.  See the License for the
 
18
 *    specific language governing permissions and limitations
 
19
 *    under the License.
 
20
 * ====================================================================
 
21
 * @endcopyright
 
22
 */
 
23
 
 
24
package org.apache.subversion.javahl;
 
25
 
 
26
import java.util.EventObject;
 
27
import org.apache.subversion.javahl.callback.ReposNotifyCallback;
 
28
 
 
29
/**
 
30
 * The event passed to the {@link ReposNotifyCallback#onNotify}
 
31
 * API to notify {@link ISVNClient} of relevant events.
 
32
 */
 
33
public class ReposNotifyInformation extends EventObject
 
34
{
 
35
    // Update the serialVersionUID when there is a incompatible change
 
36
    // made to this class.  See any of the following, depending upon
 
37
    // the Java release.
 
38
    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
 
39
    // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
 
40
    // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
 
41
    // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
 
42
    private static final long serialVersionUID = 1L;
 
43
 
 
44
    /**
 
45
     * The {@link Action} which triggered this event.
 
46
     */
 
47
    private Action action;
 
48
 
 
49
    /**
 
50
     * The revision of the item.
 
51
     */
 
52
    private long revision;
 
53
 
 
54
    /**
 
55
     * The warning text.
 
56
     */
 
57
    private String warning;
 
58
 
 
59
    private long shard;
 
60
 
 
61
    private long newRevision;
 
62
 
 
63
    private long oldRevision;
 
64
 
 
65
    private NodeAction nodeAction;
 
66
 
 
67
    private String path;
 
68
 
 
69
    /**
 
70
     * This constructor is to be used by the native code.
 
71
     *
 
72
     * @param action The {@link Action} which triggered this event.
 
73
     * @param revision potentially the revision.
 
74
     */
 
75
    public ReposNotifyInformation(Action action, long revision, String warning,
 
76
                                  long shard, long newRevision,
 
77
                                  long oldRevision, NodeAction nodeAction,
 
78
                                  String path)
 
79
    {
 
80
        super(action);
 
81
        this.action = action;
 
82
        this.revision = revision;
 
83
        this.warning = warning;
 
84
        this.shard = shard;
 
85
        this.newRevision = newRevision;
 
86
        this.oldRevision = oldRevision;
 
87
        this.nodeAction = nodeAction;
 
88
        this.path = path;
 
89
    }
 
90
 
 
91
    /**
 
92
     * @return The {@link Action} which triggered this event.
 
93
     */
 
94
    public Action getAction()
 
95
    {
 
96
        return action;
 
97
    }
 
98
 
 
99
    /**
 
100
     * @return The revision for the item.
 
101
     */
 
102
    public long getRevision()
 
103
    {
 
104
        return revision;
 
105
    }
 
106
 
 
107
    /**
 
108
     * @return The warning text.
 
109
     */
 
110
    public String getWarning()
 
111
    {
 
112
        return warning;
 
113
    }
 
114
 
 
115
    public long getShard()
 
116
    {
 
117
       return shard;
 
118
    }
 
119
 
 
120
    public long getNewRevision()
 
121
    {
 
122
       return newRevision;
 
123
    }
 
124
 
 
125
    public long getOldRevision()
 
126
    {
 
127
       return oldRevision;
 
128
    }
 
129
 
 
130
    public NodeAction getNodeAction()
 
131
    {
 
132
       return nodeAction;
 
133
    }
 
134
 
 
135
    public String getPath()
 
136
    {
 
137
       return path;
 
138
    }
 
139
 
 
140
    /**
 
141
     * The type of action triggering the notification
 
142
     */
 
143
    public enum Action
 
144
    {
 
145
        /** A warning message is waiting. */
 
146
        warning,
 
147
 
 
148
        /** A revision has finished being dumped. */
 
149
        dump_rev_end,
 
150
 
 
151
        /** A revision has finished being verified. */
 
152
        verify_rev_end,
 
153
 
 
154
        /** packing of an FSFS shard has commenced */
 
155
        pack_shard_start,
 
156
 
 
157
        /** packing of an FSFS shard is completed */
 
158
        pack_shard_end,
 
159
 
 
160
        /** packing of the shard revprops has commenced */
 
161
        pack_shard_start_revprop,
 
162
 
 
163
        /** packing of the shard revprops has completed */
 
164
        pack_shard_end_revprop,
 
165
 
 
166
        /** A revision has begun loading */
 
167
        load_txn_start,
 
168
 
 
169
        /** A revision has finished loading */
 
170
        load_txn_committed,
 
171
 
 
172
        /** A node has begun loading */
 
173
        load_node_start,
 
174
 
 
175
        /** A node has finished loading */
 
176
        load_node_done,
 
177
 
 
178
        /** A copied node has been encountered */
 
179
        load_copied_node,
 
180
 
 
181
        /** Mergeinfo has been normalized */
 
182
        load_normalized_mergeinfo,
 
183
 
 
184
        /** The operation has acquired a mutex for the repo. */
 
185
        mutex_acquired,
 
186
 
 
187
        /** Recover has started. */
 
188
        recover_start,
 
189
 
 
190
        /** Upgrade has started. */
 
191
        upgrade_start;
 
192
    }
 
193
 
 
194
    public enum NodeAction
 
195
    {
 
196
         change,
 
197
         add,
 
198
         deleted,
 
199
         replace;
 
200
    }
 
201
}