KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jcr > observation > EventType


1 /*
2  * $Id: EventType.java,v 1.2 2004/07/24 00:16:23 benjmestrallet Exp $
3  *
4  * Copyright 2002-2004 Day Management AG, Switzerland.
5  *
6  * Licensed under the Day RI License, Version 2.0 (the "License"),
7  * as a reference implementation of the following specification:
8  *
9  * Content Repository API for Java Technology, revision 0.12
10  * <http://www.jcp.org/en/jsr/detail?id=170>
11  *
12  * You may not use this file except in compliance with the License.
13  * You may obtain a copy of the License files at
14  *
15  * http://www.day.com/content/en/licenses/day-ri-license-2.0
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */

24 package javax.jcr.observation;
25
26 /**
27  * The event types used by the <code>ObservationManager</code>.
28  * <p/>
29  * <p>This interface defines the following event types:
30  * <UL>
31  * <LI>ITEM_ADDED
32  * <LI>ITEM_CHANGED
33  * <LI>ITEM_REMOVED
34  * <LI>ITEM_VERSIONED
35  * <LI>ITEM_RESTORED
36  * <LI>LABEL_ADDED
37  * <LI>LABEL_REMOVED
38  * <LI>ITEM_LOCKED
39  * <LI>ITEM_UNLOCKED
40  * <LI>LOCK_EXPIRED
41  * </UL>
42  * <b>Level 2 only</b></code>
43  * <p/>
44  *
45  * @author Peeter Piegaze
46  * @author Stefan Guggisberg
47  */

48 public interface EventType {
49
50   /**
51    * The event types defined by the JCR standard. Each constant is a
52    * power of 2 (i.e. sets of event types can be encoded as a bitmask
53    * in a <code>long</code> value).
54    */

55   public static final long ITEM_ADDED = 1;
56   public static final long ITEM_CHANGED = 2;
57   public static final long ITEM_REMOVED = 4;
58   public static final long ITEM_VERSIONED = 8;
59   public static final long ITEM_RESTORED = 16;
60   public static final long LABEL_ADDED = 32;
61   public static final long LABEL_REMOVED = 64;
62   public static final long ITEM_LOCKED = 128;
63   public static final long ITEM_UNLOCKED = 256;
64   public static final long LOCK_EXPIRED = 512;
65
66   /**
67    * Returns the numerical constant identifying this event type. This value
68    * is always a power of 2 ((i.e. sets of event types can be encoded as
69    * a bitmask in a <code>long</code> value).
70    *
71    * @return the numerical value
72    * @see ObservationManager
73    */

74   public long getValue();
75
76   /**
77    * Returns the descriptive name of this event type.
78    *
79    * @return the name
80    * @see ObservationManager
81    */

82   public String JavaDoc getName();
83 }
Popular Tags