You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2004/09/22 03:28:07 UTC
svn commit: rev 47014 - cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/variables
Author: vgritsenko
Date: Tue Sep 21 18:28:07 2004
New Revision: 47014
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolver.java
Log:
ComponentSelector -> ServiceSelector
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolver.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolver.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolver.java Tue Sep 21 18:28:07 2004
@@ -16,12 +16,11 @@
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.service.WrapperServiceManager;
import org.apache.avalon.framework.thread.ThreadSafe;
@@ -44,7 +43,7 @@
final public class PreparedVariableResolver extends VariableResolver implements Disposable {
private ServiceManager manager;
- private ComponentSelector selector;
+ private ServiceSelector selector;
private List tokens;
private boolean needsMapStack;
@@ -205,7 +204,7 @@
if (this.selector == null) {
try {
// First access to a module : lookup selector
- this.selector = (ComponentSelector) this.manager.lookup(InputModule.ROLE + "Selector");
+ this.selector = (ServiceSelector) this.manager.lookup(InputModule.ROLE + "Selector");
} catch(ServiceException ce) {
throw new PatternException("Cannot access input modules selector", ce);
}
@@ -214,13 +213,13 @@
// Get the module
InputModule module;
try {
- module = (InputModule)this.selector.select(moduleName);
- } catch(ComponentException ce) {
- throw new PatternException("Cannot get InputModule named '" + moduleName +
- "' in expression '" + this.originalExpr + "'", ce);
+ module = (InputModule) this.selector.select(moduleName);
+ } catch (ServiceException e) {
+ throw new PatternException("Cannot get module named '" + moduleName +
+ "' in expression '" + this.originalExpr + "'", e);
}
- Token token;
+ Token token;
// Is this module threadsafe ?
if (module instanceof ThreadSafe) {
token = new Token(THREADSAFE_MODULE, module);
@@ -333,14 +332,14 @@
InputModule im = null;
String moduleName = module.getStringValue();
try {
- im = (InputModule)this.selector.select(moduleName);
+ im = (InputModule) this.selector.select(moduleName);
Object result = im.getAttribute(expr.getStringValue(), null, objectModel);
return new Token(EXPR, result==null ? "" : result.toString());
- } catch(ComponentException compEx) {
+ } catch(ServiceException e) {
throw new PatternException("Cannot get module '" + moduleName +
- "' in expression '" + this.originalExpr + "'", compEx);
+ "' in expression '" + this.originalExpr + "'", e);
} catch(ConfigurationException confEx) {
throw new PatternException("Cannot get variable '" + expr.getStringValue() +