2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to you under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.shale.dialog.base;
19  
20  import org.apache.shale.dialog.DialogContext;
21  import org.apache.shale.dialog.DialogContextListener;
22  
23  /***
24   * <p>Convenience abstract {@link DialogContextListener} implementation. Subclasses
25   * are expected to be serializable.</p>
26   *
27   * @since 1.0.4
28   */
29  public abstract class AbstractDialogContextListener implements DialogContextListener {
30  
31      //------------------------------------------------------------- Properties
32  
33      /***
34       * The {@link DialogContext} we are interested in.
35       */
36      private DialogContext dialogContext;
37  
38  
39      //------------------------------------------------- DialogContextListener methods
40  
41      /***
42       * {@inheritDoc}
43       *
44       * @see org.apache.shale.dialog.DialogContextListener#onStart()
45       */
46      public void onStart() {
47  
48          // Do nothing
49  
50      }
51  
52      /***
53       * {@inheritDoc}
54       *
55       * @see org.apache.shale.dialog.DialogContextListener#onStop()
56       */
57      public void onStop() {
58  
59          // Do nothing
60  
61      }
62  
63      /***
64       * {@inheritDoc}
65       *
66       * @see org.apache.shale.dialog.DialogContextListener#onException(java.lang.Exception)
67       */
68      public void onException(Exception e) {
69  
70          // Do nothing
71  
72      }
73  
74      /***
75       * {@inheritDoc}
76       *
77       * @see org.apache.shale.dialog.DialogContextListener#onActivate()
78       *
79       * @since 1.1.0
80       */
81      public void onActivate() {
82  
83          // Do nothing
84  
85      }
86  
87      /***
88       * {@inheritDoc}
89       *
90       * @see org.apache.shale.dialog.DialogContextListener#onPassivate()
91       *
92       * @since 1.1.0
93       */
94      public void onPassivate() {
95  
96          // Do nothing
97  
98      }
99  
100     /***
101      * {@inheritDoc}
102      *
103      * @see org.apache.shale.dialog.DialogContextListener#onEntry(java.lang.String)
104      */
105     public void onEntry(String stateId) {
106 
107         // Do nothing
108 
109     }
110 
111     /***
112      * {@inheritDoc}
113      *
114      * @see org.apache.shale.dialog.DialogContextListener#onExit(java.lang.String)
115      */
116     public void onExit(String stateId) {
117 
118         // Do nothing
119 
120     }
121 
122     /***
123      * {@inheritDoc}
124      *
125      * @see org.apache.shale.dialog.DialogContextListener#onTransition(java.lang.String,java.lang.String)
126      */
127     public void onTransition(String fromStateId, String toStateId) {
128 
129         // Do nothing
130 
131     }
132 
133     /***
134      * {@inheritDoc}
135      *
136      * @see org.apache.shale.dialog.DialogContextListener#getDialogContext()
137      */
138     public DialogContext getDialogContext() {
139 
140         return dialogContext;
141 
142     }
143 
144     /***
145      * {@inheritDoc}
146      *
147      * @see org.apache.shale.dialog.DialogContextListener#setDialogContext(org.apache.shale.dialog.DialogContext)
148      */
149     public void setDialogContext(DialogContext dialogContext) {
150 
151         this.dialogContext = dialogContext;
152 
153     }
154 
155 }