Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) SOAP: bookmarks list now indicates if a bookmark is private (requested by KoH)
(no author)92351c4dcbde
diff --git a/htroot/xml/bookmarks/posts/all.java b/htroot/xml/bookmarks/posts/all.javaindex d6c6a7cc4..0a913880b 100644--- a/htroot/xml/bookmarks/posts/all.java+++ b/htroot/xml/bookmarks/posts/all.java@@ -62,12 +62,17 @@ public class all {plasmaSwitchboard switchboard = (plasmaSwitchboard) env;boolean isAdmin=switchboard.verifyAuthentication(header, true);serverObjects prop = new serverObjects();+Iterator it;if(post != null && post.containsKey("tag")){it=switchboard.bookmarksDB.getBookmarksIterator((String) post.get("tag"), isAdmin);}else{it=switchboard.bookmarksDB.getBookmarksIterator(isAdmin);}++ // if an extended xml should be used+ boolean extendedXML = (post != null && post.containsKey("extendedXML"));+int count=0;bookmarksDB.Bookmark bookmark;Date date;@@ -80,6 +85,12 @@ public class all {date=new Date(bookmark.getTimeStamp());prop.putSafeXML("posts_"+count+"_time", serverDate.dateToiso8601(date));prop.putSafeXML("posts_"+count+"_tags", bookmark.getTagsString().replaceAll(","," "));++ // additional XML tags+ prop.put("posts_"+count+"_isExtended",extendedXML ? 1:0);+ if (extendedXML) {+ prop.putSafeXML("posts_"+count+"_isExtended_private", Boolean.toString(!bookmark.getPublic()));+ }count++;}prop.put("posts", count);diff --git a/htroot/xml/bookmarks/posts/all.xml b/htroot/xml/bookmarks/posts/all.xmlindex d8ee63347..2ba48d82c 100644--- a/htroot/xml/bookmarks/posts/all.xml+++ b/htroot/xml/bookmarks/posts/all.xml@@ -1,5 +1,5 @@<?xml version='1.0' standalone='yes'?><posts>-#{posts}#<post href="#[url]#" description="#[title]#" extended="#[description]#" hash="#[md5]#" tag="#[tags]#" time="#[time]#"/>+#{posts}#<post href="#[url]#" description="#[title]#" extended="#[description]#" hash="#[md5]#" tag="#[tags]#" time="#[time]#" #(isExtended)#::private="#[private]#"#(/isExtended)#/>#{/posts}#</posts>diff --git a/htroot/xml/bookmarks/posts/get.java b/htroot/xml/bookmarks/posts/get.javaindex bb3a0b8ae..3d9d4eb80 100644--- a/htroot/xml/bookmarks/posts/get.java+++ b/htroot/xml/bookmarks/posts/get.java@@ -50,6 +50,10 @@ public class get {}else{date=serverDate.dateToiso8601(new Date(System.currentTimeMillis()));}++ // if an extended xml should be used+ boolean extendedXML = (post != null && post.containsKey("extendedXML"));+int count=0;Date parsedDate = null;@@ -73,6 +77,12 @@ public class get {prop.putSafeXML("posts_"+count+"_md5", serverCodings.encodeMD5Hex(bookmark.getUrl()));prop.putSafeXML("posts_"+count+"_time", date);prop.putSafeXML("posts_"+count+"_tags", bookmark.getTagsString().replaceAll(","," "));++ // additional XML tags+ prop.put("posts_"+count+"_isExtended",extendedXML ? 1:0);+ if (extendedXML) {+ prop.putSafeXML("posts_"+count+"_isExtended_private", Boolean.toString(!bookmark.getPublic()));+ }count++;}}diff --git a/htroot/xml/bookmarks/posts/get.xml b/htroot/xml/bookmarks/posts/get.xmlindex 35c36b32a..2760c4ca5 100644--- a/htroot/xml/bookmarks/posts/get.xml+++ b/htroot/xml/bookmarks/posts/get.xml@@ -1,5 +1,5 @@<?xml version='1.0' standalone='yes'?><posts>-#{posts}#<post href="#[url]#" description="#[title]#" extended="#[description]#" hash="#[md5]#" tag="#[tags]#" time="#[time]#"/>+#{posts}#<post href="#[url]#" description="#[title]#" extended="#[description]#" hash="#[md5]#" tag="#[tags]#" time="#[time]#" #(isExtended)#::private="#[private]#"#(/isExtended)#/>#{/posts}#</posts>\ No newline at end of filediff --git a/source/de/anomic/soap/services/BookmarkService.java b/source/de/anomic/soap/services/BookmarkService.javaindex dfed25a43..afbe92421 100644--- a/source/de/anomic/soap/services/BookmarkService.java+++ b/source/de/anomic/soap/services/BookmarkService.java@@ -415,6 +415,7 @@ public class BookmarkService extends AbstractService {// generating the template containing the network status informationserverObjects args = new serverObjects();+ args.put("extendedXML", "");if (tag != null) args.put("tag",tag);if (date != null) args.put("date",date);