Class IniFactorySupport<T>
java.lang.Object
org.apache.shiro.util.AbstractFactory<T>
org.apache.shiro.ini.IniFactorySupport<T>
- Type Parameters:
T- T
- All Implemented Interfaces:
org.apache.shiro.lang.util.Factory<T>
- Direct Known Subclasses:
IniSecurityManagerFactory
Deprecated.
Base support class for
Factory implementations that generate their instance(s) based on
Ini configuration.- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.protectedIniFactorySupport(org.apache.shiro.config.Ini ini) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TDeprecated.create default instance.Deprecated.Creates a new object instance by using a configured INI source.protected abstract TcreateInstance(org.apache.shiro.config.Ini ini) Deprecated.create instance.Deprecated.Returns a mapping of String to bean representing the default set of object used by the factory.org.apache.shiro.config.InigetIni()Deprecated.static org.apache.shiro.config.IniDeprecated.Returns a new Ini instance created from the defaultclasspath:shiro.inifile, ornullif the file does not exist.protected org.apache.shiro.config.IniDeprecated.Tries to resolve the Ini instance to use for configuration.voidsetDefaults(Map<String, ?> defaultBeans) Deprecated.Sets the default objects used by this factory.voidsetIni(org.apache.shiro.config.Ini ini) Deprecated.Methods inherited from class org.apache.shiro.util.AbstractFactory
getInstance, isSingleton, setSingleton
-
Field Details
-
DEFAULT_INI_RESOURCE_PATH
Deprecated.default ini resource path.- See Also:
-
-
Constructor Details
-
IniFactorySupport
protected IniFactorySupport()Deprecated. -
IniFactorySupport
Deprecated.
-
-
Method Details
-
getIni
Deprecated. -
setIni
Deprecated. -
getDefaults
Deprecated.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.- Returns:
- A Map of default objects, or
null. - Since:
- 1.4
-
setDefaults
Deprecated.Sets the default objects used by this factory. These defaults may be used in conjunction with the INI configuration.- Parameters:
defaultBeans- String to object mapping used for default configuration in this factory.- Since:
- 1.4
-
loadDefaultClassPathIni
Deprecated.Returns a new Ini instance created from the defaultclasspath:shiro.inifile, ornullif the file does not exist.- Returns:
- a new Ini instance created from the default
classpath:shiro.inifile, ornullif the file does not exist.
-
resolveIni
Deprecated.Tries to resolve the Ini instance to use for configuration. This implementation functions as follows:- The
Iniinstance returned fromgetIni()will be returned if it is not null or empty. - If
getIni()isnullor empty, this implementation will attempt to find and load thedefault class path Ini. - If neither of the two attempts above returns an instance,
nullis returned
- Returns:
- the Ini instance to use for configuration.
- The
-
createInstance
Deprecated.Creates a new object instance by using a configured INI source. This implementation functions as follows:ResolvetheInisource to use for configuration.- If there was no resolved Ini source, create and return a simple default instance via the
createDefaultInstance()method.
- Specified by:
createInstancein classAbstractFactory<T>- Returns:
- a new
SecurityManagerinstance by using a configured INI source.
-
createInstance
Deprecated.create instance.- Parameters:
ini- ini- Returns:
- T
-
createDefaultInstance
-
Environmentmechanisms instead.