IniFactorySupport

Base support class for {@link Factory} implementations that generate their instance(s) based on {@link Ini} configuration.

@since 1.0 deprecated("") use Shiro's {@code Environment} mechanisms instead.

Constructors

this
this()
Undocumented in source.
this
this(Ini ini)
Undocumented in source.

Members

Functions

createDefaultInstance
T createDefaultInstance()
Undocumented in source.
createInstance
T createInstance()

Creates a new object instance by using a configured INI source. This implementation functions as follows: <ol> <li>{@link #resolveIni() Resolve} the {@code Ini} source to use for configuration.</li> <li>If there was no resolved Ini source, create and return a simple default instance via the {@link #createDefaultInstance()} method.</li> </ol>

createInstance
T createInstance(Ini ini)
Undocumented in source.
getDefaults
Map!(string, T) getDefaults()

Returns a mapping of string to bean representing the default set of object used by the factory. These beans can be used by this factory in conjunction with objects parsed from the INI configuration. @return A Map of default objects, or <code>null</code>. @since 1.4

getIni
Ini getIni()
Undocumented in source. Be warned that the author may not have intended to support it.
resolveIni
Ini resolveIni()

Tries to resolve the Ini instance to use for configuration. This implementation functions as follows: <ol> <li>The {@code Ini} instance returned from {@link #getIni()} will be returned if it is not null or empty.</li> <li>If {@link #getIni()} is {@code null} or empty, this implementation will attempt to find and load the {@link #loadDefaultClassPathIni() default class path Ini}.</li> <li>If neither of the two attempts above returns an instance, {@code null} is returned</li> </ol>

setDefaults
void setDefaults(Map!(string, T) defaultBeans)

Sets the default objects used by this factory. These defaults may be used in conjunction with the INI configuration. @param defaultBeans string to object mapping used for default configuration in this factory. @since 1.4

setIni
void setIni(Ini ini)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

loadDefaultClassPathIni
Ini loadDefaultClassPathIni()

Returns a new Ini instance created from the default {@code classpath:shiro.ini} file, or {@code null} if the file does not exist.

Variables

DEFAULT_INI_RESOURCE_PATH
enum string DEFAULT_INI_RESOURCE_PATH;
Undocumented in source.

Meta