View Javadoc

1   package org.apache.fulcrum.osworkflow.example.modules.actions;
2   
3   
4   /*
5    * Licensed to the Apache Software Foundation (ASF) under one
6    * or more contributor license agreements.  See the NOTICE file
7    * distributed with this work for additional information
8    * regarding copyright ownership.  The ASF licenses this file
9    * to you under the Apache License, Version 2.0 (the
10   * "License"); you may not use this file except in compliance
11   * with the License.  You may obtain a copy of the License at
12   *
13   *   http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing,
16   * software distributed under the License is distributed on an
17   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18   * KIND, either express or implied.  See the License for the
19   * specific language governing permissions and limitations
20   * under the License.
21   */
22  
23  
24  import org.apache.turbine.modules.actions.VelocityAction;
25  import org.apache.turbine.util.RunData;
26  import org.apache.velocity.context.Context;
27  
28  /***
29   * This method is called by default when you load up the example webapp.  It redirects the
30   * user to the Index.vm template.
31   *
32   * @author     <a href="mailto:epugh@upstate.com">Eric Pugh</a>
33   */
34  public class Index extends VelocityAction
35  {
36  
37      /***
38       *  Default action is to load up the default screen (Index.vm) and list out the locations to go to:
39       *  <ol>
40       *    <li>Inventory Add Request</li>
41       *    <li>Inventory Delete Request</li>
42       *    <li>General Admin of Request</li>
43       * </ol>
44       *
45       * @param  data           Current RunData information
46       * @param  context        Context to populate
47       * @exception  Exception  Thrown on error
48       */
49      public void doPerform(RunData data, Context context) throws Exception
50      {
51  
52          log.debug("doPerform action event called");
53          data.setScreenTemplate("Index.vm");
54  
55      }
56  
57  }