org.apache.struts2.convention
Class SEOActionNameBuilder
java.lang.Object
org.apache.struts2.convention.SEOActionNameBuilder
- All Implemented Interfaces:
- ActionNameBuilder
public class SEOActionNameBuilder
- extends java.lang.Object
- implements ActionNameBuilder
This class converts the class name into a SEO friendly name by recognizing
camel casing and inserting dashes. This also converts everything to
lower case if desired. And this will also strip off the word Action
from the class name.
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 |
SEOActionNameBuilder
public SEOActionNameBuilder(java.lang.String lowerCase,
java.lang.String separator)
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-2012 Apache Software Foundation. All Rights Reserved.