View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
4   */
5   
6   package com.hack23.cia.web.action.common;
7   
8   
9   /***
10   * The Class AbstractAction.
11   */
12  public abstract class AbstractAction implements ControllerAction {
13  
14      /*** The Constant serialVersionUID. */
15      private static final long serialVersionUID = -7222132948668349251L;
16  
17      /*** The action category. */
18      private final ActionCategory actionCategory;
19  
20      /***
21       * Instantiates a new abstract action.
22       *
23       * @param actionCategory the action category
24       */
25      public AbstractAction(final ActionCategory actionCategory) {
26          super();
27          this.actionCategory = actionCategory;
28      }
29  
30      /*
31       * (non-Javadoc)
32       * 
33       * @see com.hack23.cia.web.action.ControllerAction#getActionType()
34       */
35      @Override
36  	public final ActionCategory getActionCategory() {
37          return actionCategory;
38      }
39  
40      /*
41       * (non-Javadoc)
42       * 
43       * @see java.lang.Object#toString()
44       */
45      @Override
46      public final String toString() {
47          return getClass().getSimpleName()
48                  + ": Action -- " + getActionCategory(); //$NON-NLS-1$
49      }
50  }