/** * Use this form to fully populate a ModuleImplAdvertisement. A ModuleImplAdvertisement has an * optional field, "param" which is neglected here. If needed it should be set with advert's * setParam method. (See {@link ModuleImplAdvertisement}.) * * @param msid -- the module spec id * @param code -- the module's fully qualified classname, "net.jxta.impl.wire.MyNewThing" * @param compat -- a compatibility statement * @param description -- something like "MyNewThing Module, J2SE Implementation" * @param provider -- something like "jxta.org" * @param uri -- currently ornamental, eventually where to find binaries. * @return -- a custom advert, fully populated except for "param" field. */ public static ModuleImplAdvertisement buildModuleImplAdvertisement( ModuleSpecID msid, String code, Element compat, String description, String provider, String uri) { ModuleImplAdvertisement miadv = buildModuleImplAdvertisement(msid, code, compat); miadv.setDescription(description); miadv.setProvider(provider); miadv.setUri(uri); return miadv; }
/** * A ModuleImplAdvertisement represents one of any number of published implementations of a given * specification. Use this form with for a development boilerplate. Use buildCompat() for a compat * boilerplate. (See {@link ModuleImplAdvertisement}.) * * @param msid -- the module spec id * @param code -- the module's fully qualified classname, "net.jxta.impl.wire.MyNewThing" * @param compat -- a compatibility statement. Use buildCompat() for a boilerplate. * @return -- a development boilerplate with custom compatibility. */ public static ModuleImplAdvertisement buildModuleImplAdvertisement( ModuleSpecID msid, String code, Element compat) { ModuleImplAdvertisement miadv = (ModuleImplAdvertisement) AdvertisementFactory.newAdvertisement(ModuleImplAdvertisement.getAdvertisementType()); miadv.setCompat(compat); miadv.setModuleSpecID(msid); miadv.setCode(code); miadv.setDescription(code + " Module, J2SE Implementation"); miadv.setProvider("jxta.org"); miadv.setUri("http://download.jxta.org"); return miadv; }