public static void listPropertyNames(StringBuilder buf) { PropertyInfo propertyInfo = new PropertyInfo(MondrianProperties.instance()); for (int i = 0; i < propertyInfo.size(); i++) { buf.append(propertyInfo.getProperty(i).getPath()); buf.append(nl); } }
public Parameter getParameter(String name) { // Scan through schema parameters. for (RolapSchemaParameter parameter : schema.parameterList) { if (Util.equalName(parameter.getName(), name)) { return parameter; } } // Scan through mondrian properties. List<Property> propertyList = MondrianProperties.instance().getPropertyList(); for (Property property : propertyList) { if (property.getPath().equals(name)) { return new SystemPropertyParameter(name, false); } } return null; }
public void execute(Property property, String value) { synchronized (DefaultRules.class) { DefaultRules oldInstance = DefaultRules.instance; DefaultRules.instance = null; DefaultRules newInstance = null; Exception ex = null; try { newInstance = DefaultRules.getInstance(); } catch (Exception e) { ex = e; } if (ex != null) { DefaultRules.instance = oldInstance; throw new Trigger.VetoRT(ex); } else if (newInstance == null) { DefaultRules.instance = oldInstance; String msg = mres.FailedCreateNewDefaultAggregateRules.str( property.getPath(), value); throw new Trigger.VetoRT(msg); } else { instance = newInstance; } } } };
/** * Registers a property with this properties object to make it available for * callbacks. */ public void register(Property property) { properties.put( property.getPath(), property); }
private void writePropertyValue(Writer writer, Property property) throws IOException { writer.write(property.getPath()); writer.write('='); String value = property.getInternal(null, false); if (value != null) { writer.write(value); } } }
/** * Returns the definition of a named property, or null if there is no such * property. * * @param path Name of the property * * @return Definition of property, or null if there is no property with this * name */ public Property getPropertyDefinition(String path) { final List /*<Property>*/ propertyList = getPropertyList(); for (int i = 0; i < propertyList.size(); i++) { Property property = (Property) propertyList.get(i); if (property.getPath().equals(path)) { return property; } } return null; }
Pattern.compile("^#?\\Q" + property.getPath() + "\\E=.*"); Matcher matcher = pattern.matcher("");