svn commit: r580948 - in /lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl: JexlEvaluator.java JexlEvaluatorFactory.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Mon Oct  1 06:32:14 2007
New Revision: 580948

URL: http://svn.apache.org/viewvc?rev=580948&view=rev
Log:
Added factory for JEXL attribute rule evaluator

Added:
    lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluatorFactory.java
Modified:
    lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluator.java

Modified: lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluator.java
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluator.java?rev=580948&r1=580947&r2=580948&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluator.java (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluator.java Mon Oct  1 06:32:14 2007
@@ -17,6 +17,9 @@
  */
 package org.apache.lenya.ac.impl.jexl;
 
+import org.apache.avalon.framework.container.ContainerUtil;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.commons.jexl.Expression;
 import org.apache.commons.jexl.ExpressionFactory;
 import org.apache.commons.jexl.JexlContext;
@@ -30,7 +33,14 @@
 /**
  * JEXL-based attribute rule evaluator.
  */
-public class JexlEvaluator implements AttributeRuleEvaluator {
+public class JexlEvaluator extends AbstractLogEnabled implements AttributeRuleEvaluator {
+    
+    /**
+     * @param logger The logger.
+     */
+    public JexlEvaluator(Logger logger) {
+        ContainerUtil.enableLogging(this, logger);
+    }
 
     /**
      * @param user The user.

Added: lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluatorFactory.java
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluatorFactory.java?rev=580948&view=auto
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluatorFactory.java (added)
+++ lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/jexl/JexlEvaluatorFactory.java Mon Oct  1 06:32:14 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.lenya.ac.impl.jexl;
+
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.lenya.ac.AttributeRuleEvaluator;
+import org.apache.lenya.ac.AttributeRuleEvaluatorFactory;
+
+/**
+ * Factory for JEXL-based attribute rule evaluators.
+ */
+public class JexlEvaluatorFactory extends AbstractLogEnabled implements AttributeRuleEvaluatorFactory {
+
+    public AttributeRuleEvaluator getEvaluator() {
+        return new JexlEvaluator(getLogger());
+    }
+
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.