unico 2003/11/16 10:52:36
Modified: src/java/org/apache/cocoon/components/treeprocessor
SimpleSelectorProcessingNode.java
Log:
Serviceable -> Composeable
Move to Fortress
Revision Changes Path
1.3 +20 -17
cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/SimpleSelectorProcessingNode.java
Index: SimpleSelectorProcessingNode.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/treeprocessor/SimpleSelectorProcessingNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SimpleSelectorProcessingNode.java 30 Sep 2003 12:42:18 -0000 1.2
+++ SimpleSelectorProcessingNode.java 16 Nov 2003 18:52:36 -0000 1.3
@@ -50,30 +50,33 @@
*/
package org.apache.cocoon.components.treeprocessor;
-import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentSelector;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceSelector;
import org.apache.avalon.framework.thread.ThreadSafe;
/**
- *
+ * TODO: remove this. Both ServiceSelector and ThreadSafe are deprecated in
Fortress.
+ *
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
* @version CVS $Id$
*/
-
public abstract class SimpleSelectorProcessingNode extends
SimpleParentProcessingNode {
/** The node component name (e.g. action name, selector name, etc) */
- protected String componentName;
+ protected String componentHint;
/** Selector where to get components from */
- protected ComponentSelector selector;
-
- public SimpleSelectorProcessingNode(String componentName) {
- this.componentName = componentName;
+ protected ServiceSelector selector;
+
+ public SimpleSelectorProcessingNode() {
}
-
- public void setSelector(ComponentSelector selector) throws
ComponentException {
+
+ public void setComponentHint(String componentHint) {
+ this.componentHint = componentHint;
+ }
+
+ public void setSelector(ServiceSelector selector) throws
ServiceException {
this.selector = selector;
}
@@ -83,18 +86,18 @@
* <p>
* Note : this method must be called <i>after</i>
<code>setSelector()</code>.
*/
- protected Component getThreadSafeComponent() throws ComponentException {
- return getThreadSafeComponent(this.componentName);
+ protected Object getThreadSafeComponent() throws ServiceException {
+ return getThreadSafeComponent(this.componentHint);
}
-
+
/**
* Tests if the component designated by this node using the selector and
component name
* is <code>ThreadSafe</code>, and return it if true.
* <p>
* Note : this method must be called <i>after</i>
<code>setSelector()</code>.
*/
- protected Component getThreadSafeComponent(String name) throws
ComponentException {
- Component component = this.selector.select(name);
+ protected Object getThreadSafeComponent(String name) throws
ServiceException {
+ Object component = this.selector.select(name);
if (component instanceof ThreadSafe) {
return component;
} else {