Hi everybody,
digging into to the socialsite code I have found following code for reading the
moduleprefs of an gadget to store the data in the own database.
Is this the recommended way to read the metadata installing an application on
the users profile?
..
Document doc = builder.parse(in);
in.close();
App app = new App();
app.setURL(urlToStore);
Element modulePrefsElement =
(Element)(doc.getElementsByTagName("ModulePrefs").item(0));
app.setAuthor(modulePrefsElement.getAttribute("author"));
app.setAuthorEmail(modulePrefsElement.getAttribute("author_email"));
if (! "".equals(modulePrefsElement.getAttribute("author_link"))) {
app.setAuthorLink(new URL(urlToStore,
modulePrefsElement.getAttribute("author_link")));
}
app.setDescription(modulePrefsElement.getAttribute("description"));
app.setDirectoryTitle(modulePrefsElement.getAttribute("directory_title"));
if (! "".equals(modulePrefsElement.getAttribute("height"))) {
app.setHeight(Integer.parseInt(modulePrefsElement.getAttribute("height")));
}
if (! "".equals(modulePrefsElement.getAttribute("scrolling"))) {
app.setScrolling(Boolean.valueOf(modulePrefsElement.getAttribute("scrolling")));
}
..
Snippet of class App.java
Thanks
Harry
Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr
Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional
60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star
Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in
der Arcor-Videothek. Infos unter www.arcor.de/tv