| java.lang.Object org.apache.struts.config.BaseConfig
All known Subclasses: org.apache.struts.config.impl.ModuleConfigImpl, org.apache.struts.config.ControllerConfig, org.apache.struts.config.MessageResourcesConfig, org.apache.struts.config.FormBeanConfig, org.apache.struts.config.ExceptionConfig, org.apache.struts.config.FormPropertyConfig, org.apache.struts.config.ForwardConfig, org.apache.struts.config.ActionConfig,
BaseConfig | abstract public class BaseConfig implements Serializable(Code) | | A abstract base class for all config classes. Provide basic support
for arbitrary properties
since: Struts 1.3 |
Field Summary | |
protected boolean | configured Indicates if configuration of this component been completed. |
configured | protected boolean configured(Code) | | Indicates if configuration of this component been completed. TODO
change protected to private and use methods provided by extenders?
|
copyProperties | protected Properties copyProperties()(Code) | | Return a copy of the properties held by this object.
|
freeze | public void freeze()(Code) | | Freeze the configuration of this action.
|
getProperties | protected Properties getProperties()(Code) | | Return the entire set of properties configured for this object. At
this time, this only needs to be exposed to support inheritance, so
choosing a conservative access modifier ("protected").
set of properties configured for this object |
getProperty | public String getProperty(String key)(Code) | | Return the property-value for the specified key, if any; otherwise
return null .
Parameters: key - a key specified in the struts-config file the value stored with the supplied key since: Struts 1.3 |
inheritProperties | protected void inheritProperties(BaseConfig baseConfig)(Code) | | Compare the properties of this config with that of the given and
copy those that are not present. This method is used by subclasses
that support configuration inheritance.
Parameters: baseConfig - The config object to copy properties from. |
setProperties | protected void setProperties(Properties properties)(Code) | | Set the entire set of properties configured for this object. At this
time, this only needs to be exposed to support inheritance, so choosing
a conservative access modifier ("protected").
|
setProperty | public void setProperty(String key, String value)(Code) | | Set an arbitary key/value pair which can be retrieved by this
config class. This facility should eliminate many use cases for
subclassing *Config classes by providing a mechanism to
pass any amount of arbitrary configuration information into an config
class. This method must not be called after configuration is
complete, or an IllegalStateException will be thrown.
Example
<action path="/example" type="com.example.MyAction">
<set-property key="foo" property="bar" />
</action>
Parameters: key - the key by which this value will be retrieved Parameters: value - the value to store with the supplied key throws: IllegalStateException - if this module configuration has beenfrozen since: Struts 1.3 |
throwIfConfigured | public void throwIfConfigured()(Code) | | Throw IllegalStateException if configuration is frozen.
throws: IllegalStateException - if configuration is frozen |
|
|