com.opensymphony.xwork2.config.entities
Class ActionConfig.Builder

java.lang.Object
  extended by com.opensymphony.xwork2.config.entities.ActionConfig.Builder
All Implemented Interfaces:
InterceptorListHolder
Enclosing class:
ActionConfig

public static class ActionConfig.Builder
extends java.lang.Object
implements InterceptorListHolder

The builder for this object. An instance of this object is the only way to construct a new instance. The purpose is to enforce the immutability of the object. The methods are structured in a way to support chaining. After setting any values you need, call the build() method to create the object.


Field Summary
protected  ActionConfig target
           
 
Constructor Summary
ActionConfig.Builder(ActionConfig toClone)
           
ActionConfig.Builder(java.lang.String packageName, java.lang.String name, java.lang.String className)
           
 
Method Summary
 ActionConfig.Builder addAllowedMethod(java.util.Collection<java.lang.String> methods)
           
 ActionConfig.Builder addAllowedMethod(java.lang.String methodName)
           
 ActionConfig.Builder addExceptionMapping(ExceptionMappingConfig exceptionMapping)
           
 ActionConfig.Builder addExceptionMappings(java.util.Collection<? extends ExceptionMappingConfig> mappings)
           
 ActionConfig.Builder addInterceptor(InterceptorMapping interceptor)
           
 ActionConfig.Builder addInterceptors(java.util.List<InterceptorMapping> interceptors)
           
 ActionConfig.Builder addParam(java.lang.String name, java.lang.String value)
           
 ActionConfig.Builder addParams(java.util.Map<java.lang.String,java.lang.String> params)
           
 ActionConfig.Builder addResultConfig(ResultConfig resultConfig)
           
 ActionConfig.Builder addResultConfigs(java.util.Collection<ResultConfig> configs)
           
 ActionConfig.Builder addResultConfigs(java.util.Map<java.lang.String,ResultConfig> configs)
           
 ActionConfig build()
           
 ActionConfig.Builder className(java.lang.String name)
           
 ActionConfig.Builder defaultClassName(java.lang.String name)
           
protected  void embalmTarget()
           
 ActionConfig.Builder exceptionMappings(java.util.Collection<? extends ExceptionMappingConfig> mappings)
           
 ActionConfig.Builder interceptors(java.util.List<InterceptorMapping> interceptors)
           
 ActionConfig.Builder location(Location loc)
           
 ActionConfig.Builder methodName(java.lang.String method)
           
 ActionConfig.Builder name(java.lang.String name)
           
 ActionConfig.Builder packageName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected ActionConfig target
Constructor Detail

ActionConfig.Builder

public ActionConfig.Builder(ActionConfig toClone)

ActionConfig.Builder

public ActionConfig.Builder(java.lang.String packageName,
                            java.lang.String name,
                            java.lang.String className)
Method Detail

packageName

public ActionConfig.Builder packageName(java.lang.String name)

name

public ActionConfig.Builder name(java.lang.String name)

className

public ActionConfig.Builder className(java.lang.String name)

defaultClassName

public ActionConfig.Builder defaultClassName(java.lang.String name)

methodName

public ActionConfig.Builder methodName(java.lang.String method)

addExceptionMapping

public ActionConfig.Builder addExceptionMapping(ExceptionMappingConfig exceptionMapping)

addExceptionMappings

public ActionConfig.Builder addExceptionMappings(java.util.Collection<? extends ExceptionMappingConfig> mappings)

exceptionMappings

public ActionConfig.Builder exceptionMappings(java.util.Collection<? extends ExceptionMappingConfig> mappings)

addInterceptor

public ActionConfig.Builder addInterceptor(InterceptorMapping interceptor)
Specified by:
addInterceptor in interface InterceptorListHolder

addInterceptors

public ActionConfig.Builder addInterceptors(java.util.List<InterceptorMapping> interceptors)
Specified by:
addInterceptors in interface InterceptorListHolder

interceptors

public ActionConfig.Builder interceptors(java.util.List<InterceptorMapping> interceptors)

addParam

public ActionConfig.Builder addParam(java.lang.String name,
                                     java.lang.String value)

addParams

public ActionConfig.Builder addParams(java.util.Map<java.lang.String,java.lang.String> params)

addResultConfig

public ActionConfig.Builder addResultConfig(ResultConfig resultConfig)

addResultConfigs

public ActionConfig.Builder addResultConfigs(java.util.Collection<ResultConfig> configs)

addResultConfigs

public ActionConfig.Builder addResultConfigs(java.util.Map<java.lang.String,ResultConfig> configs)

addAllowedMethod

public ActionConfig.Builder addAllowedMethod(java.lang.String methodName)

addAllowedMethod

public ActionConfig.Builder addAllowedMethod(java.util.Collection<java.lang.String> methods)

location

public ActionConfig.Builder location(Location loc)

build

public ActionConfig build()

embalmTarget

protected void embalmTarget()


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