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.basic.config;
19  
20  import org.apache.shale.dialog.basic.model.SubdialogState;
21  
22  /***
23   * <p>{@link SubdialogStateImpl} is a basic implementation of
24   * {@link SubdialogState}.</p>
25   *
26   * @since 1.0.4
27   */
28  
29  public final class SubdialogStateImpl extends AbstractState implements SubdialogState {
30  
31  
32      // ------------------------------------------------------ Instance Variables
33  
34  
35      /***
36       * <p>The name of the subordinate dialog to be executed by this state.</p>
37       */
38      private String dialogName = null;
39  
40  
41      // -------------------------------------------------------------- Properties
42  
43  
44      /***
45       * {@inheritDoc}
46       */
47      public String getDialogName() {
48  
49          return this.dialogName;
50  
51      }
52  
53  
54      // ---------------------------------------------------------- Public Methods
55  
56  
57      /***
58       * <p>Render a printable version of this instance.</p>
59       *
60       * @return The printable version of this instance
61       */
62      public String toString() {
63  
64          return "SubdialogState[dialog=" +
65                 ((getDialog() != null) ? getDialog().getName() : "<null>") +
66                 ",name=" + getName() +
67                 ",dialogName=" + this.dialogName + "]";
68  
69      }
70  
71  
72      // --------------------------------------------------- Configuration Methods
73  
74  
75      /***
76       * <p>Set the name of the subordinate dialog to be executed
77       * by this state.</p>
78       *
79       * @param dialogName The subordinate dialog name
80       */
81      public void setDialogName(String dialogName) {
82  
83          this.dialogName = dialogName;
84  
85      }
86  
87  
88  }