CVS update: sierra/src/java/org/openprivacy/sierra/client

From: cvs@openprivacy.org
Date: Sun Jan 14 2001 - 22:40:52 PST


Date: Sunday January 14, 19101 @ 22:40
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/client

-----------------------------------

Update of /usr/local/cvsroot/sierra/src/java/org/openprivacy/sierra/client
In directory openprivacy.org:/tmp/cvs-serv13478/src/java/org/openprivacy/sierra/client

Modified Files:
        GetReputation.java PutReputation.java
Log Message:
added principal support

*****************************************************************
File: sierra/src/java/org/openprivacy/sierra/client/GetReputation.java

CVSWEB Options: -------------------

CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/client/GetReputation.java?annotate=1.3

CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/client/GetReputation.java?rev=1.3&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/client/GetReputation.java.diff?r1=1.3&r2=1.2

-----------------------------------

Index: sierra/src/java/org/openprivacy/sierra/client/GetReputation.java
diff -u sierra/src/java/org/openprivacy/sierra/client/GetReputation.java:1.2 sierra/src/java/org/openprivacy/sierra/client/GetReputation.java:1.3
--- sierra/src/java/org/openprivacy/sierra/client/GetReputation.java:1.2 Wed Jan 10 19:33:57 2001
+++ sierra/src/java/org/openprivacy/sierra/client/GetReputation.java Sun Jan 14 22:40:51 2001
@@ -57,7 +57,7 @@
      *
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: GetReputation.java,v 1.2 2001/01/11 03:33:57 burton Exp $
+ * @version $Id: GetReputation.java,v 1.3 2001/01/15 06:40:51 burton Exp $
      */
     public GetReputation( String rpcRouter,
                           String reference ) throws Exception {
@@ -110,7 +110,7 @@
      * Get the reputation returned from the GetReputation object.
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: GetReputation.java,v 1.2 2001/01/11 03:33:57 burton Exp $
+ * @version $Id: GetReputation.java,v 1.3 2001/01/15 06:40:51 burton Exp $
      */
     public Reputation getReputation() {
         return this.reputation;
@@ -120,7 +120,7 @@
      * main()
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: GetReputation.java,v 1.2 2001/01/11 03:33:57 burton Exp $
+ * @version $Id: GetReputation.java,v 1.3 2001/01/15 06:40:51 burton Exp $
      */
     public static void main( String[] args ) {
 
@@ -135,7 +135,6 @@
         //determine what rpcRouter to use
         String rpcRouter = args[0];
 
-
         //determine what reference to use
         String reference = null;
         if ( args[1].equals( "--reference" ) ) {
@@ -187,11 +186,11 @@
      * Show the user how to work the system.
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: GetReputation.java,v 1.2 2001/01/11 03:33:57 burton Exp $
+ * @version $Id: GetReputation.java,v 1.3 2001/01/15 06:40:51 burton Exp $
      */
     public static void showSyntax() {
 
- System.out.println( "RPC_ROUTER_URL --reference reputationURI" );
+ System.out.println( "org.openprivacy.sierra.client.GetReputation RPC_ROUTER --reference REPUTATION_URI" );
         
     }
     

*****************************************************************
File: sierra/src/java/org/openprivacy/sierra/client/PutReputation.java

CVSWEB Options: -------------------

CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/client/PutReputation.java?annotate=1.6

CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/sierra/src/java/org/openprivacy/sierra/client/PutReputation.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/client/PutReputation.java.diff?r1=1.6&r2=1.5

-----------------------------------

Index: sierra/src/java/org/openprivacy/sierra/client/PutReputation.java
diff -u sierra/src/java/org/openprivacy/sierra/client/PutReputation.java:1.5 sierra/src/java/org/openprivacy/sierra/client/PutReputation.java:1.6
--- sierra/src/java/org/openprivacy/sierra/client/PutReputation.java:1.5 Sun Jan 14 04:43:50 2001
+++ sierra/src/java/org/openprivacy/sierra/client/PutReputation.java Sun Jan 14 22:40:52 2001
@@ -21,6 +21,7 @@
 import java.io.*;
 import java.net.*;
 import java.util.*;
+import java.security.*;
 
 //sierra stuf
 import org.openprivacy.sierra.*;
@@ -55,7 +56,7 @@
      *
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: PutReputation.java,v 1.5 2001/01/14 12:43:50 burton Exp $
+ * @version $Id: PutReputation.java,v 1.6 2001/01/15 06:40:52 burton Exp $
      */
     public PutReputation( String rpcRouter,
                           Reputation reputation ) throws Exception {
@@ -71,6 +72,11 @@
                      new QName("http://schemas.openprivacy.org/core/reputation/12/2000/value/", "value"),
                      Value.class, beanSer, beanSer);
 
+ smr.mapTypes(Constants.NS_URI_SOAP_ENC,
+ new QName("http://schemas.openprivacy.org/core/reputation/12/2000/principal/", "principal"),
+ URIReference.class, beanSer, beanSer);
+
+
         // Build the call.
         Call call = new Call();
 
@@ -101,7 +107,7 @@
      * main()
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: PutReputation.java,v 1.5 2001/01/14 12:43:50 burton Exp $
+ * @version $Id: PutReputation.java,v 1.6 2001/01/15 06:40:52 burton Exp $
      */
     public static void main( String[] args ) {
 
@@ -116,11 +122,19 @@
         //determine what rpcRouter to use
         String rpcRouter = args[0];
 
+ String principal = null;
+ if ( args[1].equals( "--principal" ) ) {
+ principal = args[2];
+ } else {
+ showSyntax();
+ return;
+ }
+
 
         //determine what reference to use
         String reference = null;
- if ( args[1].equals( "--reference" ) ) {
- reference = args[2];
+ if ( args[3].equals( "--reference" ) ) {
+ reference = args[4];
         } else {
             showSyntax();
             return;
@@ -132,8 +146,8 @@
 
         //FIXME: this won't work for reputations with multiple values.
         
- if ( args[3].equals( "--value" ) ) {
- String value = args[4];
+ if ( args[5].equals( "--value" ) ) {
+ String value = args[6];
 
             int split = value.indexOf( "=" );
 
@@ -151,7 +165,7 @@
             return;
         }
 
- Reputation rep = new Reputation( reference );
+ Reputation rep = new Reputation( new URIReference( principal ), reference );
         rep.addValue( new Value( name, data ) );
 
         //output what is about to be uploaded.
@@ -172,11 +186,11 @@
      * Show the user how to work the system.
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: PutReputation.java,v 1.5 2001/01/14 12:43:50 burton Exp $
+ * @version $Id: PutReputation.java,v 1.6 2001/01/15 06:40:52 burton Exp $
      */
     public static void showSyntax() {
 
- System.out.println( "RPC_ROUTER_URL --reference reputationURI --value NAME=DATA" );
+ System.out.println( "org.openprivacy.sierra.client.PutReputation RPC_ROUTER --principal PRINCIPAL --reference REPUTATION_URI --value NAME=DATA" );
         
     }
     



This archive was generated by hypermail 2b30 : Mon Jan 22 2001 - 15:52:14 PST