01: /*
02: * Copyright 2006 Maik Schreiber <blizzy AT blizzy DOT de>
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.directwebremoting.annotations;
17:
18: import org.directwebremoting.extend.Creator;
19:
20: /**
21: * A scripting scope.
22: * See {@link org.directwebremoting.extend.Creator} for details.
23: * @author Maik Schreiber <blizzy AT blizzy DOT de>
24: * @author Joe Walker [joe at getahead dot ltd dot uk]
25: */
26: public enum ScriptScope {
27: /**
28: * @see Creator#APPLICATION
29: */
30: APPLICATION(Creator.APPLICATION),
31:
32: /**
33: * @see Creator#SESSION
34: */
35: SESSION(Creator.SESSION),
36:
37: /**
38: * @see Creator#SCRIPT
39: */
40: SCRIPT(Creator.SCRIPT),
41:
42: /**
43: * @see Creator#REQUEST
44: */
45: REQUEST(Creator.REQUEST),
46:
47: /**
48: * @see Creator#PAGE
49: */
50: PAGE(Creator.PAGE);
51:
52: /**
53: * Link a ScriptScope to constant from Creator
54: * @param value The scope string constant
55: */
56: private ScriptScope(String value) {
57: this .value = value;
58: }
59:
60: /**
61: * Accessor for the scope string constant from Creator
62: * @return One of "application", "session", etc.
63: */
64: String getValue() {
65: return value;
66: }
67:
68: /**
69: * The scope constant value
70: */
71: private String value;
72: }
|