Class PackageConfig.Builder
java.lang.Object
org.apache.struts2.config.entities.PackageConfig.Builder
- All Implemented Interfaces:
InterceptorLocator
- Enclosing class:
- PackageConfig
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddActionConfig(String name, ActionConfig action) addExceptionMappingConfig(ExceptionMappingConfig exceptionMappingConfig) addGlobalAllowedMethods(Set<String> allowedMethods) addGlobalExceptionMappingConfigs(List<ExceptionMappingConfig> exceptionMappingConfigs) addGlobalResultConfig(ResultConfig resultConfig) addGlobalResultConfigs(Map<String, ResultConfig> resultConfigs) addParent(PackageConfig parent) addParents(List<PackageConfig> parents) addResultTypeConfig(ResultTypeConfig config) build()defaultActionRef(String name) defaultClassRef(String defaultClassRef) defaultInterceptorRef(String name) defaultResultType(String defaultResultType) sets the default Result type for this packagegetInterceptorConfig(String name) Gets an interceptor configuration object.getName()getParentsAllowedMethods(List<PackageConfig> parents) getResultType(String type) isAbstract(boolean isAbstract) isFinal(boolean isFinal) booleanbooleanneedsRefresh(boolean needsRefresh) strictMethodInvocation(boolean strict) toString()
-
Field Details
-
target
-
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
name
-
isAbstract
-
isFinal
-
defaultInterceptorRef
-
defaultActionRef
-
defaultClassRef
-
defaultResultType
sets the default Result type for this package- Parameters:
defaultResultType- set the default result type- Returns:
- this builder
-
namespace
-
needsRefresh
-
addActionConfig
-
addParents
-
addGlobalResultConfig
-
addGlobalResultConfigs
-
getGlobalAllowedMethods
-
getParentsAllowedMethods
-
addGlobalAllowedMethods
-
addExceptionMappingConfig
public PackageConfig.Builder addExceptionMappingConfig(ExceptionMappingConfig exceptionMappingConfig) -
addGlobalExceptionMappingConfigs
public PackageConfig.Builder addGlobalExceptionMappingConfigs(List<ExceptionMappingConfig> exceptionMappingConfigs) -
addInterceptorConfig
-
addInterceptorStackConfig
-
addParent
-
addResultTypeConfig
-
location
-
isNeedsRefresh
public boolean isNeedsRefresh() -
getDefaultClassRef
-
getName
-
getNamespace
-
getFullDefaultResultType
-
getResultType
-
getInterceptorConfig
Description copied from interface:InterceptorLocatorGets an interceptor configuration object.- Specified by:
getInterceptorConfigin interfaceInterceptorLocator- Parameters:
name- The interceptor or interceptor stack name- Returns:
- Either an
InterceptorConfigorInterceptorStackConfigobject
-
strictMethodInvocation
-
isStrictMethodInvocation
public boolean isStrictMethodInvocation() -
build
-
toString
-