01: /*
02: The contents of this file are subject to the Mozilla Public License Version 1.1
03: (the "License"); you may not use this file except in compliance with the
04: License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
05:
06: Software distributed under the License is distributed on an "AS IS" basis,
07: WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
08: for the specific language governing rights and
09: limitations under the License.
10:
11: The Original Code is "The Columba Project"
12:
13: The Initial Developers of the Original Code are Frederik Dietz and Timo Stich.
14: Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
15:
16: All Rights Reserved.
17: */
18: package org.columba.core.scripting.extensions;
19:
20: /**
21:
22: Abstract class for extension points. <br>
23: Developers should ensure that their Extension Points provide a unique identifier
24: and, if possible, make those identifiers easy to find.<br>
25: <br>
26: TODO maybe create a unique place to define extension point id's?
27:
28: @author Celso Pinto (cpinto@yimports.com)
29:
30: */
31: public abstract class AbstractExtensionPoint {
32: /* TODO add javadocs */
33:
34: /**
35: Use to indicate that the action must be inserted at the beginning of the
36: action stack
37: */
38: public static final int POSITION_BEGINNING = 1 << 0;
39:
40: /**
41: Use to indicate that the action must be added at the end of the action
42: stack.
43: */
44: public static final int POSITION_END = 1 << 1;
45:
46: private String id = null;
47:
48: /**
49: Default constructor. Every extension point must garantee that it's identifier
50: is unique.
51: @param id the extension point identifier
52: */
53: public AbstractExtensionPoint(String id) {
54: this .id = id;
55: }
56:
57: /**
58: Getter for the extension point id
59: @return the extension point id
60: */
61: public String getId() {
62: return id;
63: }
64:
65: }
|