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 public abstract class IniFactorySupport<T> extends AbstractFactory<T>
Deprecated.
use Shiro's Environment mechanisms instead.
Base support class for Factory implementations that generate their instance(s) based on Ini configuration.
Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    default ini resource path.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deprecated.
     
    protected
    IniFactorySupport(org.apache.shiro.config.Ini ini)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract T
    Deprecated.
    create default instance.
    Deprecated.
    Creates a new object instance by using a configured INI source.
    protected abstract T
    createInstance(org.apache.shiro.config.Ini ini)
    Deprecated.
    create instance.
    protected Map<String,?>
    Deprecated.
    Returns a mapping of String to bean representing the default set of object used by the factory.
    org.apache.shiro.config.Ini
    Deprecated.
     
    static org.apache.shiro.config.Ini
    Deprecated.
    Returns a new Ini instance created from the default classpath:shiro.ini file, or null if the file does not exist.
    protected org.apache.shiro.config.Ini
    Deprecated.
    Tries to resolve the Ini instance to use for configuration.
    void
    setDefaults(Map<String,?> defaultBeans)
    Deprecated.
    Sets the default objects used by this factory.
    void
    setIni(org.apache.shiro.config.Ini ini)
    Deprecated.
     

    Methods inherited from class org.apache.shiro.util.AbstractFactory

    getInstance, isSingleton, setSingleton

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getIni

      public org.apache.shiro.config.Ini getIni()
      Deprecated.
    • setIni

      public void setIni(org.apache.shiro.config.Ini ini)
      Deprecated.
    • getDefaults

      protected Map<String,?> 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

      public void setDefaults(Map<String,?> defaultBeans)
      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

      public static org.apache.shiro.config.Ini loadDefaultClassPathIni()
      Deprecated.
      Returns a new Ini instance created from the default classpath:shiro.ini file, or null if the file does not exist.
      Returns:
      a new Ini instance created from the default classpath:shiro.ini file, or null if the file does not exist.
    • resolveIni

      protected org.apache.shiro.config.Ini resolveIni()
      Deprecated.
      Tries to resolve the Ini instance to use for configuration. This implementation functions as follows:
      1. The Ini instance returned from getIni() will be returned if it is not null or empty.
      2. If getIni() is null or empty, this implementation will attempt to find and load the default class path Ini.
      3. If neither of the two attempts above returns an instance, null is returned
      Returns:
      the Ini instance to use for configuration.
    • createInstance

      public T createInstance()
      Deprecated.
      Creates a new object instance by using a configured INI source. This implementation functions as follows:
      1. Resolve the Ini source to use for configuration.
      2. If there was no resolved Ini source, create and return a simple default instance via the createDefaultInstance() method.
      Specified by:
      createInstance in class AbstractFactory<T>
      Returns:
      a new SecurityManager instance by using a configured INI source.
    • createInstance

      protected abstract T createInstance(org.apache.shiro.config.Ini ini)
      Deprecated.
      create instance.
      Parameters:
      ini - ini
      Returns:
      T
    • createDefaultInstance

      protected abstract T createDefaultInstance()
      Deprecated.
      create default instance.
      Returns:
      T