You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/02/11 16:17:14 UTC
cvs commit: jakarta-avalon/src/proposal/resolver Query.java Resolver.java
bloritsch 02/02/11 07:17:14
Modified: src/proposal/resolver Query.java Resolver.java
Log:
update Query and Resolver to handle quick tests
Revision Changes Path
1.2 +16 -1 jakarta-avalon/src/proposal/resolver/Query.java
Index: Query.java
===================================================================
RCS file: /home/cvs/jakarta-avalon/src/proposal/resolver/Query.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Query.java 11 Feb 2002 15:08:58 -0000 1.1
+++ Query.java 11 Feb 2002 15:17:14 -0000 1.2
@@ -31,13 +31,28 @@
void addKey( int type, String value );
/**
+ * Remove a lookup key. This facilitates a quick test/resolve approach. The
+ * <code>Query</code> object can be initialized in the constructor complete with
+ * references to optional components. Your code can then call
+ * <code>hasReferences</code> and remove any optional keys from the Query that the
+ * <code>Resolver</code> cannot handle.
+ */
+ void removeKey( String value );
+
+ /**
* You can add further hints, or attributes to the query that can help the
* <code>Resolver</code> get the specific instance you want. It is important
* to note that the attributes do apply to all the key values. The
* <code>Resolver</code> does have the right to ignore any or all of the
* attributes if it wants.
*/
- void addAttribute( Object name, Object value );
+ void addAttribute( String name, Object value );
+
+ /**
+ * You can remove hints, or attributes to the query that can help the
+ * <code>Resolver</code> get the specific instance you want.
+ */
+ void removeAttribute( String name );
/**
* This obtains a reference to the attribute context used by the
1.2 +7 -0 jakarta-avalon/src/proposal/resolver/Resolver.java
Index: Resolver.java
===================================================================
RCS file: /home/cvs/jakarta-avalon/src/proposal/resolver/Resolver.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Resolver.java 11 Feb 2002 15:08:58 -0000 1.1
+++ Resolver.java 11 Feb 2002 15:17:14 -0000 1.2
@@ -28,4 +28,11 @@
*/
Token lookup( Query query )
throws ResolverException;
+
+ /**
+ * Test to see if the <code>Resolver</code> can resolve all the keys in the
+ * <code>Query</code> object. The order of boolean responses matches the order
+ * of <code>Query</code> keys.
+ */
+ boolean[] hasReferences( Query query );
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>