1 26 27 package org.objectweb.openccm.explorer.CosTrading; 28 29 import org.objectweb.util.explorer.api.Context; 30 import org.objectweb.util.explorer.api.Entry; 31 import org.objectweb.util.explorer.core.naming.lib.DefaultEntry; 32 import org.omg.CosTrading.Offer; 33 34 35 42 public class QueryContext 43 implements Context 44 { 45 46 52 58 64 70 73 public Entry[] getEntries(Object object) { 74 Query query = (Query)object; 75 Offer[] offers = query.getOffers(); 76 Entry[] values = new Entry[offers.length]; 77 for (int i=0 ; i<offers.length ; i++) { 78 values[i] = new DefaultEntry("Offer " + i, offers[i]); 79 } 80 return values; 81 } 82 83 } 84 | Popular Tags |