Class PackageConfig
java.lang.Object
org.apache.struts2.util.location.Located
org.apache.struts2.config.entities.PackageConfig
- All Implemented Interfaces:
- Serializable,- Comparable<PackageConfig>,- InterceptorLocator,- Locatable
public class PackageConfig
extends Located
implements Comparable<PackageConfig>, Serializable, InterceptorLocator
Configuration for Package.
 
 In the xml configuration file this is defined as the package tag.
 
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Map<String,ActionConfig> protected Stringprotected Stringprotected Stringprotected Stringprotected List<ExceptionMappingConfig>protected Map<String,ResultConfig> protected booleanprotected booleanprotected Stringprotected Stringprotected booleanprotected List<PackageConfig>protected Map<String,ResultTypeConfig> protected boolean
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedPackageConfig(String name) protectedPackageConfig(PackageConfig orig) 
- 
Method SummaryModifier and TypeMethodDescriptionintcompareTo(PackageConfig other) booleanreturns the Map of all the ActionConfigs available in the current package.returns the List of all the ExceptionMappingConfigs available in the current package.returns the Map of all the global ResultConfigs available in the current package.returns the Map of all InterceptorConfigs and InterceptorStackConfigs available in the current package.returns the Map of all the ResultTypeConfigs available in the current package.Returns the default result type for this package.gets the GlobalAllowedMethods local to this packagegets the ExceptionMappingConfigs local to this packagegets the global ResultConfigs local to this packagegetInterceptorConfig(String name) Gets an interceptor configuration object.gets the InterceptorConfigs and InterceptorStackConfigs local to this packagegetName()gets the ResultTypeConfigs local to this packageinthashCode()booleanbooleanisFinal()booleanbooleantoString()Methods inherited from class org.apache.struts2.util.location.LocatedgetLocation, setLocation
- 
Field Details- 
actionConfigs
- 
globalResultConfigs
- 
globalAllowedMethods
- 
interceptorConfigs
- 
resultTypeConfigs
- 
globalExceptionMappingConfigs
- 
parents
- 
defaultInterceptorRef
- 
defaultActionRef
- 
defaultResultType
- 
defaultClassRef
- 
name
- 
namespace
- 
isAbstractprotected boolean isAbstract
- 
isFinalprotected boolean isFinal
- 
needsRefreshprotected boolean needsRefresh
- 
strictMethodInvocationprotected boolean strictMethodInvocation
 
- 
- 
Constructor Details- 
PackageConfig
- 
PackageConfig
 
- 
- 
Method Details- 
isAbstractpublic boolean isAbstract()
- 
isFinalpublic boolean isFinal()
- 
getActionConfigs
- 
getAllActionConfigsreturns the Map of all the ActionConfigs available in the current package. ActionConfigs defined in ancestor packages will be included in this Map.- Returns:
- a Map of ActionConfig Objects with the action name as the key
- See Also:
 
- 
getAllGlobalResultsreturns the Map of all the global ResultConfigs available in the current package. Global ResultConfigs defined in ancestor packages will be included in this Map.- Returns:
- a Map of Result Objects with the result name as the key
- See Also:
 
- 
getAllInterceptorConfigsreturns the Map of all InterceptorConfigs and InterceptorStackConfigs available in the current package. InterceptorConfigs defined in ancestor packages will be included in this Map.- Returns:
- a Map of InterceptorConfig and InterceptorStackConfig Objects with the ref-name as the key
- See Also:
 
- 
getAllResultTypeConfigsreturns the Map of all the ResultTypeConfigs available in the current package. ResultTypeConfigs defined in ancestor packages will be included in this Map.- Returns:
- a Map of ResultTypeConfig Objects with the result type name as the key
- See Also:
 
- 
getAllExceptionMappingConfigsreturns the List of all the ExceptionMappingConfigs available in the current package. ExceptionMappingConfigs defined in ancestor packages will be included in this list.- Returns:
- a List of ExceptionMappingConfigs Objects with the result type name as the key
- See Also:
 
- 
getDefaultInterceptorRef
- 
getDefaultActionRef
- 
getDefaultClassRef
- 
getDefaultResultType- Returns:
- the default result type for this package.
 
- 
getFullDefaultInterceptorRef- Returns:
- the default interceptor-ref name. If this is not set on this PackageConfig, it searches the parent PackageConfigs in order until it finds one.
 
- 
getFullDefaultActionRef- Returns:
- the default action-ref name. If this is not set on this PackageConfig, it searches the parent PackageConfigs in order until it finds one.
 
- 
getFullDefaultResultTypeReturns the default result type for this package. If there is no default result type, but this package has parents - we will try to look up the default result type of a parent. - Returns:
- the default result type for this package.
 
- 
getGlobalResultConfigsgets the global ResultConfigs local to this package- Returns:
- a Map of ResultConfig objects keyed by result name
- See Also:
 
- 
getInterceptorConfigsgets the InterceptorConfigs and InterceptorStackConfigs local to this package- Returns:
- a Map of InterceptorConfig and InterceptorStackConfig objects keyed by ref-name
- See Also:
 
- 
getName
- 
getNamespace
- 
getParents
- 
getResultTypeConfigsgets the ResultTypeConfigs local to this package- Returns:
- a Map of ResultTypeConfig objects keyed by result name
- See Also:
 
- 
isNeedsRefreshpublic boolean isNeedsRefresh()
- 
getGlobalExceptionMappingConfigsgets the ExceptionMappingConfigs local to this package- Returns:
- a Map of ExceptionMappingConfig objects keyed by result name
- See Also:
 
- 
getGlobalAllowedMethodsgets the GlobalAllowedMethods local to this package- Returns:
- a Set of method names allowed to be executed if strict method invocation is enabled
 
- 
isStrictMethodInvocationpublic boolean isStrictMethodInvocation()
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
- 
compareTo- Specified by:
- compareToin interface- Comparable<PackageConfig>
 
- 
getInterceptorConfigDescription copied from interface:InterceptorLocatorGets an interceptor configuration object.- Specified by:
- getInterceptorConfigin interface- InterceptorLocator
- Parameters:
- name- The interceptor or interceptor stack name
- Returns:
- Either an InterceptorConfigorInterceptorStackConfigobject
 
 
-