01: /**
02: * Copyright 2006 Webmedia Group Ltd.
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: **/package org.araneaframework;
16:
17: import java.io.Serializable;
18:
19: /**
20: * Relocatable is a component that can be relocated from one parent to another. As the {@link Environment}
21: * of a component can be inhereted from the parent and the new parent's Environment can differ, this
22: * class provides {@link Interface#overrideEnvironment(Environment)} for resetting the {@link Environment}.
23: * <p>
24: * This interface should not be used directly, subinterfaces {@link RelocatableComponent},
25: * {@link RelocatableService}, and {@link RelocatableWidget} should be used.
26: * </p>
27: *
28: * @author "Toomas Römer" <toomas@webmedia.ee>
29: * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
30: */
31: public interface Relocatable extends Serializable {
32: public Relocatable.Interface _getRelocatable();
33:
34: /**
35: * The Relocatable's main interface.
36: */
37: public interface Interface extends Serializable {
38: /**
39: * Overrides the current environment with env.
40: */
41: public void overrideEnvironment(Environment newEnv);
42:
43: /**
44: * Returns the current environment of the relocatable component.
45: */
46: public Environment getCurrentEnvironment();
47: }
48:
49: /**
50: * A relocatable Component.
51: */
52: public interface RelocatableComponent extends Relocatable,
53: Component, Serializable {
54: }
55:
56: /**
57: * A relocatable Service.
58: */
59: public interface RelocatableService extends RelocatableComponent,
60: Service, Serializable {
61: }
62:
63: /**
64: * A relocatable Widget.
65: */
66: public interface RelocatableWidget extends RelocatableService,
67: Widget, Serializable {
68: }
69: }
|