protected static String getCatalogURLProperty() { return MondrianProperties.instance().CatalogURL.get(); } protected static String getJdbcDriversProperty() {
private DefaultRules(final DefaultDef.AggRules rules) { this.rules = rules; this.factToPattern = new HashMap<String, Recognizer.Matcher>(); this.foreignKeyMatcherMap = new HashMap<String, Recognizer.Matcher>(); this.tag = MondrianProperties.instance().AggregateRuleTag.getDefaultValue(); }
/** * Returns the name of a class to use to create an object. * The factory's <code>StringProperty</code> is gotten and * if it has a non-null value, then that is returned. Otherwise, * the <code>StringProperty</code>'s name (path) is used as the * name to probe the <code>Properties</code> object for a value. * This method is allowed to return null. * * @return <code>null</code> or a class name */ protected String getClassName(final Properties props) { final StringProperty stringProp = getStringProperty(); final String className = stringProp.get(); return (className != null) ? className : (props == null) ? null : props.getProperty(stringProp.getPath()); }
/** * Sets the value of this property. * * @return The previous value, or the default value if not set. */ public String set(String value) { String prevValue = setString(value); if (prevValue == null) { prevValue = getDefaultValue(); } return prevValue; } }
/** * Retrieves the value of this property, optionally failing if there is no * value. Returns the property's default value if the property set has no * value for this property. */ public String get(boolean required) { return getInternal(null, required); }
/** * Retrieves the value of this property. Returns the property's default * value if the property set has no value for this property. */ public String get() { return stringValue(); }
/** * Retrieves the value of this property, or the default value if none is * found. */ public String get(String defaultValue) { return getInternal(defaultValue, false); }
public static void reloadNullLiteral() { mdxNullLiteral = MondrianProperties.instance().NullMemberRepresentation.get(); }
private List<String> getStatisticsProviderNames() { // Dialect-specific path, e.g. "mondrian.statistics.providers.MYSQL" final String path = MondrianProperties.instance().StatisticsProviders.getPath() + "." + getDatabaseProduct().name(); String nameList = MondrianProperties.instance().getProperty(path); if (nameList != null && nameList.length() > 0) { return Arrays.asList(nameList.split(",")); } // Generic property, "mondrian.statistics.providers" nameList = MondrianProperties.instance().StatisticsProviders.get(); if (nameList != null && nameList.length() > 0) { return Arrays.asList(nameList.split(",")); } return null; }
protected static String getConnectStringProperty() { return MondrianProperties.instance().TestConnectString.get(); } protected static String getJdbcURLProperty() {
/** * Returns the instance of the {@link mondrian.spi.DataSourceResolver} * plugin. * * @return data source resolver */ private static synchronized DataSourceResolver getDataSourceResolver() { if (dataSourceResolver == null) { final StringProperty property = MondrianProperties.instance().DataSourceResolverClass; final String className = property.get( JndiDataSourceResolver.class.getName()); try { dataSourceResolver = ClassResolver.INSTANCE.instantiateSafe(className); } catch (ClassCastException e) { throw Util.newInternal( e, "Plugin class specified by property " + property.getPath() + " must implement " + DataSourceResolver.class.getName()); } } return dataSourceResolver; }
protected static String getJdbcPasswordProperty() { return MondrianProperties.instance().TestJdbcPassword.get(); } protected static String getCatalogURLProperty() {
protected static String getJdbcURLProperty() { return MondrianProperties.instance().FoodmartJdbcURL.get(); }
protected static String getJdbcUserProperty() { return MondrianProperties.instance().TestJdbcUser.get(); }
protected static String getJdbcDriversProperty() { return MondrianProperties.instance().JdbcDrivers.get(); }
private static InputStream getAggRuleInputStream() { String aggRules = MondrianProperties.instance().AggregateRules.get(); InputStream inStream = DefaultRules.class.getResourceAsStream(aggRules); if (inStream == null) { try { URL url = new URL(aggRules); inStream = url.openStream(); } catch (MalformedURLException e) { // ignore } catch (IOException e) { // ignore } } if (inStream == null) { LOGGER.warn(mres.CouldNotLoadDefaultAggregateRules.str(aggRules)); } return inStream; } private static DefaultRules instance = null;
private void loadProperties() { String propFile = MondrianProperties.instance().LocalePropFile.get(); if (propFile != null) { populate(propFile); } }
/** * Creates a DynamicContentFinder. * @param dataSourcesConfigUrl URL of repository */ public DynamicContentFinder( String dataSourcesConfigUrl) { super(dataSourcesConfigUrl); reloadDataSources(); timer = Util.newTimer( "mondrian.server.DynamicContentFinder$timer", true); final Pair<Long, TimeUnit> interval = Util.parseInterval( String.valueOf( MondrianProperties.instance() .XmlaSchemaRefreshInterval.get()), TimeUnit.MILLISECONDS); final long period = interval.right.toMillis(interval.left); timer.schedule( new TimerTask() { public void run() { reloadDataSources(); } }, period, period); }
MondrianProperties.instance().SegmentCache.get(); if (cacheName != null) { caches.add(instantiateCache(cacheName));