org.apache.struts2.convention
Class DefaultActionNameBuilder

java.lang.Object
  extended by org.apache.struts2.convention.DefaultActionNameBuilder
All Implemented Interfaces:
ActionNameBuilder

public class DefaultActionNameBuilder
extends java.lang.Object
implements ActionNameBuilder

This class strips the word Action from the end of the class name and possibly lowercases the name as well depending on the value of the constant struts.convention.action.name.lowercase. If the constant is set to true, this class will lowercase all action names.


Constructor Summary
DefaultActionNameBuilder(java.lang.String lowerCase)
           
 
Method Summary
 java.lang.String build(java.lang.String className)
          Given the name of the class, this method should build an action name.
 void setActionSuffix(java.lang.String actionSuffix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultActionNameBuilder

public DefaultActionNameBuilder(java.lang.String lowerCase)
Method Detail

setActionSuffix

public void setActionSuffix(java.lang.String actionSuffix)
Parameters:
actionSuffix - (Optional) Classes that end with these value will be mapped as actions (defaults to "Action")

build

public java.lang.String build(java.lang.String className)
Description copied from interface: ActionNameBuilder
Given the name of the class, this method should build an action name.

Specified by:
build in interface ActionNameBuilder
Parameters:
className - The class name.
Returns:
The action name and never null.


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.