You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2003/10/30 13:59:00 UTC
cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/variables PreparedVariableResolver.java VariableResolverFactory.java
cziegeler 2003/10/30 04:59:00
Modified: src/java/org/apache/cocoon/components/treeprocessor/variables
PreparedVariableResolver.java
VariableResolverFactory.java
Log:
Moving to Serviceable
Revision Changes Path
1.3 +11 -11 cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolver.java
Index: PreparedVariableResolver.java
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PreparedVariableResolver.java 16 Mar 2003 17:49:13 -0000 1.2
+++ PreparedVariableResolver.java 30 Oct 2003 12:59:00 -0000 1.3
@@ -51,10 +51,10 @@
package org.apache.cocoon.components.treeprocessor.variables;
import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.ComponentSelector;
import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.ServiceSelector;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.cocoon.components.modules.input.InputModule;
import org.apache.cocoon.components.treeprocessor.InvokeContext;
@@ -73,8 +73,8 @@
*/
final public class PreparedVariableResolver extends VariableResolver implements Disposable {
- private ComponentManager manager;
- private ComponentSelector selector;
+ private ServiceManager manager;
+ private ServiceSelector selector;
final private List items = new ArrayList();
@@ -92,7 +92,7 @@
private static final Integer STATEFUL_MODULE_OBJ = new Integer(STATEFUL_MODULE);
private static final Integer ANCHOR_OBJ = new Integer(ANCHOR);
- public PreparedVariableResolver(String expr, ComponentManager manager) throws PatternException {
+ public PreparedVariableResolver(String expr, ServiceManager manager) throws PatternException {
super(expr);
this.manager = manager;
@@ -193,8 +193,8 @@
if (this.selector == null) {
try {
// First access to a module : lookup selector
- this.selector = (ComponentSelector)this.manager.lookup(InputModule.ROLE + "Selector");
- } catch(ComponentException ce) {
+ this.selector = (ServiceSelector)this.manager.lookup(InputModule.ROLE + "Selector");
+ } catch(ServiceException ce) {
throw new PatternException("Cannot access input modules selector", ce);
}
}
@@ -203,7 +203,7 @@
InputModule module;
try {
module = (InputModule)this.selector.select(moduleName);
- } catch(ComponentException ce) {
+ } catch(ServiceException ce) {
throw new PatternException("Cannot get InputModule named '" + moduleName +
"' in expression '" + this.originalExpr + "'", ce);
}
@@ -320,7 +320,7 @@
result.append(value);
}
- } catch(ComponentException compEx) {
+ } catch(ServiceException compEx) {
throw new PatternException("Cannot get module '" + moduleName +
"' in expression '" + this.originalExpr + "'", compEx);
1.3 +3 -3 cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/variables/VariableResolverFactory.java
Index: VariableResolverFactory.java
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/variables/VariableResolverFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- VariableResolverFactory.java 16 Mar 2003 17:49:13 -0000 1.2
+++ VariableResolverFactory.java 30 Oct 2003 12:59:00 -0000 1.3
@@ -50,7 +50,7 @@
*/
package org.apache.cocoon.components.treeprocessor.variables;
-import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.avalon.framework.service.ServiceManager;
import org.apache.cocoon.sitemap.PatternException;
import java.util.List;
@@ -133,7 +133,7 @@
* Get a resolver for a given expression. Chooses the most efficient implementation
* depending on <code>expression</code>.
*/
- public static VariableResolver getResolver(String expression, ComponentManager manager) throws PatternException {
+ public static VariableResolver getResolver(String expression, ServiceManager manager) throws PatternException {
if (needsResolve(expression)) {
VariableResolver resolver = new PreparedVariableResolver(expression, manager);
List collector = (List)disposableCollector.get();