-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew Toseland a écrit :
> On Wednesday 13 August 2008 16:45, [EMAIL PROTECTED] wrote:
>> Author: batosai
>> Date: 2008-08-13 15:45:23 +0000 (Wed, 13 Aug 2008)
>> New Revision: 21816
>>
>> Modified:
>>    trunk/apps/WoT/src/plugins/WoT/WoTplugin.java
>> Log:
>> Handle GetTrusters and GetTrustees FCP messages.
>>
>> Modified: trunk/apps/WoT/src/plugins/WoT/WoTplugin.java
>> ===================================================================
>> --- trunk/apps/WoT/src/plugins/WoT/WoTplugin.java    2008-08-13 15:19:23 UTC 
> (rev 21815)
>> +++ trunk/apps/WoT/src/plugins/WoT/WoTplugin.java    2008-08-13 15:45:23 UTC 
> (rev 21816)
>> @@ -569,6 +575,44 @@
>>              return sfs;
>>      }
>>      
>> +    private SimpleFieldSet handleGetTrusters(SimpleFieldSet params) throws 
> InvalidParameterException, MalformedURLException, UnknownIdentityException {
>> +            
>> +            SimpleFieldSet sfs = new SimpleFieldSet(false);
>> +
>> +            if(params.get("Identity") == null) throw new 
> InvalidParameterException("Missing mandatory parameter");
>> +
>> +            sfs.putAppend("Message", "Identities");
>> +
>> +            ObjectSet<Trust> result = db.queryByExample(new Trust(null, 
> wot.getIdentityByURI(params.get("Identity")),0));
>> +                    
>> +            for(int i = 1 ; result.hasNext() ; i++) {
>> +                    Trust trust = result.next();
>> +                    sfs.putAppend("Identity"+i, 
> trust.getTruster().getRequestURI().toString());
>> +                    sfs.putAppend("Value"+i, 
>> String.valueOf(trust.getValue()));
>> +                    sfs.putAppend("Comment"+i, trust.getComment());
>> +            }
>> +            return sfs;
>> +    }
> 
> Wouldn't it be better to have the Identity, Value and Comment all within a 
> single level of the tree?
> 
> FCPPluginMessage
> Originator=WoT // I have no idea how we really do this without looking it up!
> Message=Identity
> Results.1.Identity=xyz
> Results.1.Value=64
> Results.1.Comment=He's okay
> Results.2.identity=abc
> ...
> 
> ??

I'm not sure I understand what you are meaning. Identity, trust value
and comment are already stored together, in a Trust object...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIrtcvmY5qNqKdYw0RAiyXAJ98P3HDIhCEiqbuqDSfmH5h635ixwCgrRZh
/1D4ovu9JFe5i5Rv7+AlDkA=
=6uyL
-----END PGP SIGNATURE-----
_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to