Class GrouperLoaderConfig

java.lang.Object
edu.internet2.middleware.grouperClient.config.ConfigPropertiesCascadeBase
edu.internet2.middleware.grouper.app.loader.GrouperLoaderConfig

public class GrouperLoaderConfig extends ConfigPropertiesCascadeBase
  • Field Details

    • LOADER_RETAIN_DB_LOGS_DAYS

      public static final String LOADER_RETAIN_DB_LOGS_DAYS
      name of param: loader.retain.db.logs.days number of days to retain db logs in table grouperloader_log. -1 is forever. default is 7
      See Also:
    • DEFAULT_SUBJECT_SOURCE_ID

      public static final String DEFAULT_SUBJECT_SOURCE_ID
      name of param: default.subject.source.id if you want queries which do not specify subject source to come from a certain source, specify here (improves performance so it doesnt search through all sources) default is 10
      See Also:
  • Method Details

    • failsafeSendEmailDefault

      public boolean failsafeSendEmailDefault()
      Returns:
    • getPropertyBoolean

      @Deprecated public static boolean getPropertyBoolean(String property, boolean defaultValue) throws NumberFormatException
      Deprecated.
      use GrouperLoaderConfig.retrieveConfig().propertyValueBoolean(property, defaultValue)
      Get a Grouper configuration parameter as boolean (must be true|t|false|f case-insensitive)
      Parameters:
      property - to lookup
      defaultValue - if the property is not there
      Returns:
      Value of configuration parameter or null if parameter isnt specified. Exception is thrown if not formatted correcly
      Throws:
      NumberFormatException - if cannot convert the value to an Integer
    • getPropertyInt

      @Deprecated public static int getPropertyInt(String property, int defaultValue) throws NumberFormatException
      Deprecated.
      GrouperLoaderConfig.retrieveConfig().propertyValueInt(property, defaultValue);
      Get a Grouper configuration parameter an integer
      Parameters:
      property - to lookup
      defaultValue - of the int if not there
      Returns:
      Value of configuration parameter or null if parameter isnt specified. Exception is thrown if not formatted correcly
      Throws:
      NumberFormatException - if cannot convert the value to an Integer
    • getPropertyString

      @Deprecated public static String getPropertyString(String property)
      Deprecated.
      use GrouperLoaderConfig.retrieveConfig().propertyValueString(property, ""); instead
      Get a Grouper configuration parameter.
       String wheel = GrouperLoaderConfig.getProperty("groups.wheel.group");
       
      Parameters:
      property - to lookup
      Returns:
      Value of configuration parameter or an empty string if parameter is invalid.
    • getPropertyString

      @Deprecated public static String getPropertyString(String property, boolean required)
      Deprecated.
      use GrouperLoaderConfig.retrieveConfig().propertyValueStringRequired(property)
      Get a Grouper configuration parameter.
       String wheel = GrouperLoaderConfig.getProperty("groups.wheel.group");
       
      Parameters:
      property - to lookup
      required - if property is required. if so, exception if not found. if not, null if not found. note if value is not filled in, but name is there, then still exception if required
      Returns:
      Value of configuration parameter or null if parameter is not there
    • getPropertyString

      @Deprecated public static String getPropertyString(String property, String defaultValue)
      Deprecated.
      use retrieveConfig().propertyValueString(property, defaultValue) instead
      Get a Grouper configuration parameter.
       String wheel = GrouperLoaderConfig.getProperty("groups.wheel.group");
       
      Parameters:
      property - to lookup
      defaultValue - is the value if the property isnt found
      Returns:
      Value of configuration parameter or the default value (will trim the value)
    • retrieveDbProfile

      public static GrouperLoaderDb retrieveDbProfile(String name)
      get a profile by name. if "grouper" then get the hibernate db connection specify the db connection with user, pass, url, and driver class the string after "db." is the name of the connection, and it should not have spaces or other special chars in it db.warehouse.user = mylogin db.warehouse.pass = secret db.warehouse.url = jdbc:mysql://localhost:3306/grouper
      Parameters:
      name -
      Returns:
      the db
    • parseLdapBaseDnFromUrlConfig

      public static String parseLdapBaseDnFromUrlConfig(String ldapServerId)
      get the base dn from the URL, e.g. ldaps://server/baseDn would return baseDn
      Parameters:
      ldapServerId -
      Returns:
      base dn or null if none
    • retrieveConfig

      public static GrouperLoaderConfig retrieveConfig()
      retrieve a config from the config file or from cache
      Returns:
      the config object
    • clearCachedCalculatedValues

      public void clearCachedCalculatedValues()
      Specified by:
      clearCachedCalculatedValues in class ConfigPropertiesCascadeBase
      See Also:
    • getHierarchyConfigKey

      protected String getHierarchyConfigKey()
      Specified by:
      getHierarchyConfigKey in class ConfigPropertiesCascadeBase
      See Also:
    • getMainConfigClasspath

      protected String getMainConfigClasspath()
      Specified by:
      getMainConfigClasspath in class ConfigPropertiesCascadeBase
      See Also:
    • getMainExampleConfigClasspath

      protected String getMainExampleConfigClasspath()
      Specified by:
      getMainExampleConfigClasspath in class ConfigPropertiesCascadeBase
      See Also:
    • getSecondsToCheckConfigKey

      protected String getSecondsToCheckConfigKey()
      Specified by:
      getSecondsToCheckConfigKey in class ConfigPropertiesCascadeBase
      See Also: