added another RSS channel "PROXY". the rss feed for peer news filters this channel if there is not an authorized access on that channel


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7792 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent a65ecffef6
commit 4b425ffdd2

@ -45,7 +45,7 @@
<div class="welcome">
<div style="margin:auto;text-align:center;">
<h2><img src="/env/grafics/kaskelix.png" width="128" height="64" alt="YaCy Websearch" style="margin-right:5px; vertical-align:middle;" />Welcome to YaCy!</h2>
<iframe src="rssTerminal.html?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING,DHTRECEIVE,DHTSEND&amp;width=600px&amp;height=180px&amp;maxlines=20&amp;maxwidth=120"
<iframe src="rssTerminal.html?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING,DHTRECEIVE,DHTSEND,PROXY&amp;width=600px&amp;height=180px&amp;maxlines=20&amp;maxwidth=120"
style="width:600px;height:180px;margin:0px;border:1px solid black;" scrolling="no" name="newsframe"></iframe><br />
<img src="PerformanceGraph.png" id="graph" alt="PerformanceGraph" width="660" height="240"/><br />
<img src="Banner.png?textcolor=000000&amp;bgcolor=e7effc&amp;bordercolor=5090d0" alt="banner" width="468" height="60"/>

@ -2092,7 +2092,8 @@ public final class Switchboard extends serverSwitch {
condenser,
searchEvent,
sourceName);
yacyChannel.channels(Base64Order.enhancedCoder.equal(queueEntry.initiator(), ASCII.getBytes(this.peers.mySeed().hash)) ? yacyChannel.LOCALINDEXING : yacyChannel.REMOTEINDEXING).addMessage(new RSSMessage("Indexed web page", dc_title, queueEntry.url().toNormalform(true, false)));
final RSSFeed feed = yacyChannel.channels(queueEntry.initiator() == null ? yacyChannel.PROXY : Base64Order.enhancedCoder.equal(queueEntry.initiator(), ASCII.getBytes(this.peers.mySeed().hash)) ? yacyChannel.LOCALINDEXING : yacyChannel.REMOTEINDEXING);
feed.addMessage(new RSSMessage("Indexed web page", dc_title, queueEntry.url().toNormalform(true, false)));
} catch (final IOException e) {
//if (this.log.isFine()) log.logFine("Not Indexed Resource '" + queueEntry.url().toNormalform(false, true) + "': process case=" + processCase);
addURLtoErrorDB(queueEntry.url(), (referrerURL == null) ? null : referrerURL.hash(), queueEntry.initiator(), dc_title, FailCategory.FINAL_LOAD_CONTEXT, "error storing url: " + queueEntry.url().toNormalform(false, true) + "': process case=" + processCase + ", error = " + e.getMessage());

@ -11,12 +11,12 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program in the file lgpl21.txt
* If not, see <http://www.gnu.org/licenses/>.
@ -40,17 +40,18 @@ public enum yacyChannel {
REMOTEINDEXING,
LOCALINDEXING,
DHTRECEIVE,
DHTSEND;
DHTSEND,
PROXY;
// test:
// http://localhost:8090/xml/feed.rss?set=PEERNEWS,REMOTESEARCH,LOCALSEARCH,REMOTEINDEXING,LOCALINDEXING
/**
* the following private channels are declared to prevent that an access to the feed servlet
* gets results from news channels that are not for the public
*/
public static final Set<yacyChannel> privateChannels = EnumSet.of(yacyChannel.LOCALSEARCH, yacyChannel.LOCALINDEXING);
public static final Set<yacyChannel> privateChannels = EnumSet.of(yacyChannel.LOCALSEARCH, yacyChannel.LOCALINDEXING, yacyChannel.PROXY);
/**
* the following static channels object is used to organize a storage array for RSS feeds
@ -62,7 +63,7 @@ public enum yacyChannel {
}
return null;
}
public static RSSFeed channels(final yacyChannel channel) {
RSSFeed feed = channels.get(channel);
if (feed != null) return feed;

Loading…
Cancel
Save