View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.config.impl.digester.elements;
20  
21  import java.util.ArrayList;
22  import java.util.List;
23  import org.apache.myfaces.config.element.FacesFlowCall;
24  import org.apache.myfaces.config.element.FacesFlowMethodCall;
25  import org.apache.myfaces.config.element.FacesFlowParameter;
26  import org.apache.myfaces.config.element.FacesFlowReturn;
27  import org.apache.myfaces.config.element.FacesFlowSwitch;
28  import org.apache.myfaces.config.element.FacesFlowView;
29  import org.apache.myfaces.config.element.NavigationRule;
30  
31  /**
32   *
33   * @author Leonardo Uribe
34   */
35  public class FacesFlowDefinitionImpl extends org.apache.myfaces.config.element.FacesFlowDefinition
36  {
37      private String _definingDocumentId;
38      private String _id;
39      private String _startNode;
40      private String _initializer;
41      private String _finalizer;
42      
43      private List<FacesFlowView> _viewList;
44      private List<FacesFlowSwitch> _switchList;
45      private List<FacesFlowReturn> _returnList;
46      private List<NavigationRule> _navigationRuleList;
47      private List<FacesFlowCall> _flowCallList;
48      private List<FacesFlowMethodCall> _methodCallList;
49      private List<FacesFlowParameter> _inboundParameterList;
50  
51      public FacesFlowDefinitionImpl()
52      {
53          _viewList = new ArrayList<FacesFlowView>();
54          _switchList = new ArrayList<FacesFlowSwitch>();
55          _returnList = new ArrayList<FacesFlowReturn>();
56          _navigationRuleList = new ArrayList<NavigationRule>();
57          _flowCallList = new ArrayList<FacesFlowCall>();
58          _methodCallList = new ArrayList<FacesFlowMethodCall>();
59          _inboundParameterList = new ArrayList<FacesFlowParameter>();
60      }
61      
62      @Override
63      public String getStartNode()
64      {
65          return _startNode;
66      }
67  
68      @Override
69      public List<FacesFlowView> getViewList()
70      {
71          return _viewList;
72      }
73      
74      public void addView(FacesFlowView view)
75      {
76          _viewList.add(view);
77      }
78  
79      @Override
80      public List<FacesFlowSwitch> getSwitchList()
81      {
82          return _switchList;
83      }
84      
85      public void addSwitch(FacesFlowSwitch switchItem)
86      {
87          _switchList.add(switchItem);
88      }
89  
90      @Override
91      public List<FacesFlowReturn> getReturnList()
92      {
93          return _returnList;
94      }
95  
96      public void addReturn(FacesFlowReturn value)
97      {
98          _returnList.add(value);
99      }
100     
101     @Override
102     public List<NavigationRule> getNavigationRuleList()
103     {
104         return _navigationRuleList;
105     }
106 
107     public void addNavigationRule(NavigationRule value)
108     {
109         _navigationRuleList.add(value);
110     }
111     
112     @Override
113     public List<FacesFlowCall> getFlowCallList()
114     {
115         return _flowCallList;
116     }
117 
118     public void addFlowCall(FacesFlowCall value)
119     {
120         _flowCallList.add(value);
121     }
122 
123     @Override
124     public List<FacesFlowMethodCall> getMethodCallList()
125     {
126         return _methodCallList;
127     }
128 
129     public void addMethodCall(FacesFlowMethodCall value)
130     {
131         _methodCallList.add(value);
132     }
133     
134     @Override
135     public String getInitializer()
136     {
137         return _initializer;
138     }
139 
140     @Override
141     public String getFinalizer()
142     {
143         return _finalizer;
144     }
145 
146     @Override
147     public List<FacesFlowParameter> getInboundParameterList()
148     {
149         return _inboundParameterList;
150     }
151 
152     public void addInboundParameter(FacesFlowParameter value)
153     {
154         _inboundParameterList.add(value);
155     }
156     
157     /**
158      * @param startNode the startNode to set
159      */
160     public void setStartNode(String startNode)
161     {
162         this._startNode = startNode;
163     }
164 
165     /**
166      * @param initializer the initializer to set
167      */
168     public void setInitializer(String initializer)
169     {
170         this._initializer = initializer;
171     }
172 
173     /**
174      * @param finalizer the finalizer to set
175      */
176     public void setFinalizer(String finalizer)
177     {
178         this._finalizer = finalizer;
179     }
180     
181     @Override
182     public String getId()
183     {
184         return _id;
185     }
186 
187     public void setId(String id)
188     {
189         this._id = id;
190     }
191 
192     /**
193      * @return the _definingDocumentId
194      */
195     public String getDefiningDocumentId()
196     {
197         return _definingDocumentId;
198     }
199 
200     /**
201      * @param definingDocumentId the _definingDocumentId to set
202      */
203     public void setDefiningDocumentId(String definingDocumentId)
204     {
205         this._definingDocumentId = definingDocumentId;
206     }
207 }