/** * Get a boolean valued property. * * @param props the properties * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued property. * * @param props the properties * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued property. * * @param session the Session * @param name the property name * @param def default value if property not found * @return the property value */ @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }
/** * Get a boolean valued System property. * * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanSystemProperty(String name, boolean def) { try { return getBoolean(getProp(System.getProperties(), name), def); } catch (SecurityException sex) { // fall through... } /* * If we can't get the entire System Properties object because * of a SecurityException, just ask for the specific property. */ try { String value = System.getProperty(name); if (value == null) return def; if (def) return !value.equalsIgnoreCase("false"); else return value.equalsIgnoreCase("true"); } catch (SecurityException sex) { return def; } }
/** * Get a boolean valued System property. * * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanSystemProperty(String name, boolean def) { try { return getBoolean(getProp(System.getProperties(), name), def); } catch (SecurityException sex) { // fall through... } /* * If we can't get the entire System Properties object because * of a SecurityException, just ask for the specific property. */ try { String value = System.getProperty(name); if (value == null) return def; if (def) return !value.equalsIgnoreCase("false"); else return value.equalsIgnoreCase("true"); } catch (SecurityException sex) { return def; } }
/** * Get a boolean valued property. * * @param session the Session * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }
/** * Get a boolean valued property. */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued property. * * @param props the properties * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued property. * * @param props the properties * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued property. * * @param props the properties * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued property. * * @param props the properties * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued property. * * @param props the properties * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanProperty(Properties props, String name, boolean def) { return getBoolean(getProp(props, name), def); }
/** * Get a boolean valued System property. */ public static boolean getBooleanSystemProperty(String name, boolean def) { try { return getBoolean(getProp(System.getProperties(), name), def); } catch (SecurityException sex) { // fall through... } /* * If we can't get the entire System Properties object because * of a SecurityException, just ask for the specific property. */ try { String value = System.getProperty(name); if (value == null) return def; if (def) return !value.equalsIgnoreCase("false"); else return value.equalsIgnoreCase("true"); } catch (SecurityException sex) { return def; } }
/** * Get a boolean valued property. * * @param session the Session * @param name the property name * @param def default value if property not found * @return the property value */ @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }
/** * Get a boolean valued property. * * @param session the Session * @param name the property name * @param def default value if property not found * @return the property value */ @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }
/** * Get a boolean valued property. * * @param session the Session * @param name the property name * @param def default value if property not found * @return the property value */ @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }
/** * Get a boolean valued property. * * @param session the Session * @param name the property name * @param def default value if property not found * @return the property value */ @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }
/** * Get a boolean valued System property. * * @param name the property name * @param def default value if property not found * @return the property value */ public static boolean getBooleanSystemProperty(String name, boolean def) { try { return getBoolean(getProp(System.getProperties(), name), def); } catch (SecurityException sex) { // fall through... } /* * If we can't get the entire System Properties object because * of a SecurityException, just ask for the specific property. */ try { String value = System.getProperty(name); if (value == null) return def; if (def) return !value.equalsIgnoreCase("false"); else return value.equalsIgnoreCase("true"); } catch (SecurityException sex) { return def; } }
/** * Get a boolean valued property. */ public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }
/** * Get a boolean valued property. * * @param session the Session * @param name the property name * @param def default value if property not found * @return the property value */ @Deprecated public static boolean getBooleanSessionProperty(Session session, String name, boolean def) { return getBoolean(getProp(session.getProperties(), name), def); }