From: cvs@openprivacy.orgCVS update: sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple
Date: Tuesday March 13, 19101 @ 22:22
Author: burton
CVSWEB Options: -------------------
Main CVSWeb: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi
View this module: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple
-----------------------------------
Update of /usr/local/cvs/public/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple
In directory giga:/tmp/cvs-serv950/src/java/org/openprivacy/sierra/query/talon/implementations/simple
Modified Files:
SimpleQueryEngine.java
Log Message:
moved supported payloads into properties files
*****************************************************************
File: sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java
CVSWEB Options: -------------------
CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java?annotate=1.6
CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java?rev=1.6&content-type=text/x-cvsweb-markup
CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java.diff?r1=1.6&r2=1.5
-----------------------------------
Index: sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java
diff -u sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java:1.5 sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java:1.6
--- sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java:1.5 Tue Mar 13 19:56:47 2001
+++ sierra/src/java/org/openprivacy/sierra/query/talon/implementations/simple/SimpleQueryEngine.java Tue Mar 13 22:22:11 2001
@@ -37,11 +37,12 @@
/**
* @see QueryManager
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
public class SimpleQueryEngine extends BaseComponent implements Component, QueryEngine {
-
+ public static final String SUPPORTED_PAYLOADS_KEY = "supported_payloads";
+
private Vector supportedPayloads = new Vector();
//
@@ -50,17 +51,29 @@
//add init code here
System.out.println( "adding supported payloads..." );
+
+ getComponentHandle().getInitProperties().dump();
+
+ Vector v = getComponentHandle().getInitProperties().getVector( SUPPORTED_PAYLOADS_KEY );
+
+ for ( int i = 0; i < v.size(); ++i ) {
- //FIXME: this shouldn't be hard coded into the .java file. It should be
- // part of the deployment descriptor for this object.
- supportedPayloads.addElement( "talon:///component/org.openprivacy.sierra.reputation.talon.implementations.PropertyManagerPayload/interface/org.openprivacy.sierra.reputation.talon.interfaces.Payload/interface/talon.interfaces.PropertyManager" );
+ String entry = (String)v.elementAt( i );
+
+ this.supportedPayloads.addElement( entry );
+
+ }
+
+ if ( supportedPayloads.size() == 0 ) {
+ throw new TalonException( "No supported payloads" );
+ }
}
/**
* @see QueryEngine
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
public Result execute( Query query ) throws SierraException {
return null;
@@ -71,7 +84,7 @@
* Add a reputation for indexing...
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
public void addReputation( Reputation reputation ) throws SierraException {
@@ -131,7 +144,7 @@
*
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
private void insertIntoPropertiesTable( DatabaseConnectionPool dcp, Payload payload )
throws Exception {
@@ -212,7 +225,7 @@
*
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
private void insertIntoIdentifiersTable( DatabaseConnectionPool dcp, Payload payload )
throws Exception {
@@ -246,7 +259,7 @@
*
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
private void insertIntoReputationsTable( DatabaseConnectionPool dcp, Reputation reputation )
throws Exception {
@@ -280,7 +293,7 @@
/**
* @see QueryEngine
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
public boolean supports( Reputation reputation ) {
@@ -304,7 +317,7 @@
/**
* @see QueryEngine
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
public boolean supports( Payload payload ) {
@@ -315,7 +328,7 @@
/**
* @see QueryEngine
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleQueryEngine.java,v 1.5 2001/03/14 03:56:47 burton Exp $
+ * @version $Id: SimpleQueryEngine.java,v 1.6 2001/03/14 06:22:11 burton Exp $
*/
public boolean supports( Query query ) {
This archive was generated by hypermail 2b30 : Tue Mar 13 2001 - 22:22:43 PST