Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.opensymphony.xwork2.config.entities
Class PackageConfig

    java.lang.Object
      com.opensymphony.xwork2.util.location.Located
          com.opensymphony.xwork2.config.entities.PackageConfig

All Implemented Interfaces:
  Locatable, Serializable, Comparable

    public class PackageConfig

extends Located
implements Comparable, Serializable

Configuration for Package.

In the xml configuration file this is defined as the `package` tag.

Version:
  $Revision: 1267 $
Author:
  Rainer Hermanns
See Also:
  Serialized Form

Field Summary
`private Map<String,ActionConfig>` | `actionConfigs`
`private String` | `defaultActionRef`
`private String` | `defaultClassRef`
`private String` | `defaultInterceptorRef`
`private String` | `defaultResultType`
`private List` | `globalExceptionMappingConfigs`
`private Map<String,ResultConfig>` | `globalResultConfigs`
`private Map` | `interceptorConfigs`
`private boolean` | `isAbstract`
`private static Log` | `LOG`
`private String` | `name`
`private String` | `namespace`
`private List<PackageConfig>` | `parents`
`private Map<String,ResultTypeConfig>` | `resultTypeConfigs`

Fields inherited from class com.opensymphony.xwork2.util.location.Located
`location`

Constructor Summary
`PackageConfig()`
`PackageConfig(String name)`
`PackageConfig(String name, String namespace, boolean isAbstract)`
`PackageConfig(String name, String namespace, boolean isAbstract, List parents)`

Method Summary
`void` | `addActionConfig(String name, ActionConfig action)`
`void` | `addAllParents(List<PackageConfig> parents)`
`void` | `addExceptionMappingConfig(ExceptionMappingConfig exceptionMappingConfig)`
`void` | `addGlobalExceptionMappingConfigs(List exceptionMappingConfigs)`
`void` | `addGlobalResultConfig(ResultConfig resultConfig)`
`void` | `addGlobalResultConfigs(Map resultConfigs)`
`void` | `addInterceptorConfig(InterceptorConfig config)`
`void` | `addInterceptorStackConfig(InterceptorStackConfig config)`
`void` | `addParent(PackageConfig parent)`
`void` | `addResultTypeConfig(ResultTypeConfig config)`
`int` | `compareTo(Object o)`
`boolean` | `equals(Object o)`
`Map<String,ActionConfig>` | `getActionConfigs()`
`Map<String,ActionConfig>` | `getAllActionConfigs()` returns the Map of all the ActionConfigs available in the current package.
`List<ExceptionMappingConfig>` | `getAllExceptionMappingConfigs()` returns the List of all the ExceptionMappingConfigs available in the current package.
`Map<String,ResultConfig>` | `getAllGlobalResults()` returns the Map of all the global ResultConfigs available in the current package.
`Map` | `getAllInterceptorConfigs()` returns the Map of all InterceptorConfigs and InterceptorStackConfigs available in the current package.
`Map<String,ResultTypeConfig>` | `getAllResultTypeConfigs()` returns the Map of all the ResultTypeConfigs available in the current package.
`String` | `getDefaultActionRef()`
`String` | `getDefaultClassRef()`
`String` | `getDefaultInterceptorRef()`
`String` | `getDefaultResultType()` Returns the default result type for this package.
`String` | `getFullDefaultActionRef()` gets the default action-ref name.
`String` | `getFullDefaultInterceptorRef()` gets the default interceptor-ref name.
`String` | `getFullDefaultResultType()` Returns the default result type for this package.
`List<ExceptionMappingConfig>` | `getGlobalExceptionMappingConfigs()` gets the ExceptionMappingConfigs local to this package
`Map<String,ResultConfig>` | `getGlobalResultConfigs()` gets the global ResultConfigs local to this package
`Map` | `getInterceptorConfigs()` gets the InterceptorConfigs and InterceptorStackConfigs local to this package
`String` | `getName()`
`String` | `getNamespace()`
`List<PackageConfig>` | `getParents()`
`Map<String,ResultTypeConfig>` | `getResultTypeConfigs()` gets the ResultTypeConfigs local to this package
`int` | `hashCode()`
`boolean` | `isAbstract()`
`void` | `removeParent(PackageConfig parent)`
`void` | `setAbstract(boolean isAbstract)`
`void` | `setDefaultActionRef(String name)`
`void` | `setDefaultClassRef(String defaultClassRef)`
`void` | `setDefaultInterceptorRef(String name)`
`void` | `setDefaultResultType(String defaultResultType)` sets the default Result type for this package
`void` | `setName(String name)`
`void` | `setNamespace(String namespace)`
`String` | `toString()`

Methods inherited from class com.opensymphony.xwork2.util.location.Located
`getLocation, setLocation`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### LOG

    private static final Log LOG

### actionConfigs

    private Map<String,ActionConfig> actionConfigs

### globalResultConfigs

    private Map<String,ResultConfig> globalResultConfigs

### interceptorConfigs

    private Map interceptorConfigs

### resultTypeConfigs

    private Map<String,ResultTypeConfig> resultTypeConfigs

### globalExceptionMappingConfigs

    private List globalExceptionMappingConfigs

### parents

    private List<PackageConfig> parents

### defaultInterceptorRef

    private String defaultInterceptorRef

### defaultActionRef

    private String defaultActionRef

### defaultResultType

    private String defaultResultType

### defaultClassRef

    private String defaultClassRef

### name

    private String name

### namespace

    private String namespace

### isAbstract

    private boolean isAbstract

Constructor Detail

### PackageConfig

    public PackageConfig()

### PackageConfig

    public PackageConfig(String name)

### PackageConfig

    public PackageConfig(String name,
                         String namespace,
                         boolean isAbstract)

### PackageConfig

    public PackageConfig(String name,
                         String namespace,
                         boolean isAbstract,
                         List parents)

Method Detail

### setAbstract

    public void setAbstract(boolean isAbstract)

### isAbstract

    public boolean isAbstract()

### getActionConfigs

    public Map<String,ActionConfig> getActionConfigs()

### getAllActionConfigs

    public Map<String,ActionConfig> getAllActionConfigs()

  returns 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:
    `ActionConfig`

### getAllGlobalResults

    public Map<String,ResultConfig> getAllGlobalResults()

  returns 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:
    `ResultConfig`

### getAllInterceptorConfigs

    public Map getAllInterceptorConfigs()

  returns 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:
    `InterceptorConfig`, `InterceptorStackConfig`

### getAllResultTypeConfigs

    public Map<String,ResultTypeConfig> getAllResultTypeConfigs()

  returns 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:
    `ResultTypeConfig`

### getAllExceptionMappingConfigs

    public List<ExceptionMappingConfig> getAllExceptionMappingConfigs()

  returns 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:
    `ExceptionMappingConfig`

### setDefaultInterceptorRef

    public void setDefaultInterceptorRef(String name)

### getDefaultInterceptorRef

    public String getDefaultInterceptorRef()

### setDefaultActionRef

    public void setDefaultActionRef(String name)

### getDefaultActionRef

    public String getDefaultActionRef()

### setDefaultClassRef

    public void setDefaultClassRef(String defaultClassRef)

### getDefaultClassRef

    public String getDefaultClassRef()

### setDefaultResultType

    public void setDefaultResultType(String defaultResultType)

  sets the default Result type for this package

  Parameters:
    `defaultResultType` -

### getDefaultResultType

    public String getDefaultResultType()

  Returns the default result type for this package.

### getFullDefaultInterceptorRef

    public String getFullDefaultInterceptorRef()

  gets 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

    public String getFullDefaultActionRef()

  gets the default action-ref name. If this is not set on this PackageConfig, it searches the parent PackageConfigs in order until it finds one.

### getFullDefaultResultType

    public String getFullDefaultResultType()

  Returns 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.

### getGlobalResultConfigs

    public Map<String,ResultConfig> getGlobalResultConfigs()

  gets the global ResultConfigs local to this package

  Returns:
    a Map of ResultConfig objects keyed by result name
  See Also:
    `ResultConfig`

### getInterceptorConfigs

    public Map getInterceptorConfigs()

  gets the InterceptorConfigs and InterceptorStackConfigs local to this package

  Returns:
    a Map of InterceptorConfig and InterceptorStackConfig objects keyed by ref-name
  See Also:
    `InterceptorConfig`, `InterceptorStackConfig`

### setName

    public void setName(String name)

### getName

    public String getName()

### setNamespace

    public void setNamespace(String namespace)

### getNamespace

    public String getNamespace()

### getParents

    public List<PackageConfig> getParents()

### getResultTypeConfigs

    public Map<String,ResultTypeConfig> getResultTypeConfigs()

  gets the ResultTypeConfigs local to this package

  Returns:
    a Map of ResultTypeConfig objects keyed by result name
  See Also:
    `ResultTypeConfig`

### getGlobalExceptionMappingConfigs

    public List<ExceptionMappingConfig> getGlobalExceptionMappingConfigs()

  gets the ExceptionMappingConfigs local to this package

  Returns:
    a Map of ExceptionMappingConfig objects keyed by result name
  See Also:
    `ExceptionMappingConfig`

### addActionConfig

    public void addActionConfig(String name,
                                ActionConfig action)

### addAllParents

    public void addAllParents(List<PackageConfig> parents)

### addGlobalResultConfig

    public void addGlobalResultConfig(ResultConfig resultConfig)

### addGlobalResultConfigs

    public void addGlobalResultConfigs(Map resultConfigs)

### addExceptionMappingConfig

    public void addExceptionMappingConfig(ExceptionMappingConfig exceptionMappingConfig)

### addGlobalExceptionMappingConfigs

    public void addGlobalExceptionMappingConfigs(List exceptionMappingConfigs)

### addInterceptorConfig

    public void addInterceptorConfig(InterceptorConfig config)

### addInterceptorStackConfig

    public void addInterceptorStackConfig(InterceptorStackConfig config)

### addParent

    public void addParent(PackageConfig parent)

### addResultTypeConfig

    public void addResultTypeConfig(ResultTypeConfig config)

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### removeParent

    public void removeParent(PackageConfig parent)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### compareTo

    public int compareTo(Object o)

  Specified by:
    `compareTo` in interface `Comparable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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