Reply To: add Rule realy dynamic

Splash Forums Rewrite Users add Rule realy dynamic Reply To: add Rule realy dynamic


It sounds like you are trying to add one rule for each item in a database, resulting in a potentially massive rule-set, perhaps you could write a single rule that would work for all database items? something like this:

public Configuration getConfiguration( ServletContext context ) {

  ConfigurationBuilder builder = ConfigurationBuilder.begin();

     .where(new HttpCondition() {
         public boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
            String id = context.get(ParameterValueStore.class)

            // Perform database lookup of ID.
  return builder;

Does this help?