commit - 61cfea61cad7c7482666cfc450aed53f69a64345
commit + 87b28b2fbdbd56be8dba0017c40743e216c8d5ee
blob - /dev/null
blob + 77925f4728d3d4432aca3765e36c929aa18b346a (mode 644)
--- /dev/null
+++ src/snipsnap/api/container/Components.java
+package snipsnap.api.container;
+
+/*
+ * This file is part of "SnipSnap Wiki/Weblog".
+ *
+ * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel
+ * All Rights Reserved.
+ *
+ * Please visit http://snipsnap.org/ for updates and contact.
+ *
+ * --LICENSE NOTICE--
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * --LICENSE NOTICE--
+ */
+
+import org.snipsnap.container.Container;
+import org.snipsnap.container.PicoContainer;
+
+import java.util.Collection;
+
+public class Components {
+ public final static String DEFAULT_ENGINE = "defaultRenderEngine";
+
+ private static Container container;
+
+ public static synchronized Container getContainer() {
+ if (null == container) {
+ container = new PicoContainer();
+ container.init();
+ }
+
+ return container;
+ }
+
+ public static Object getComponent(Class c) {
+ return getContainer().getComponent(c);
+ }
+
+ public static Object getComponent(String id) {
+ return getContainer().getComponent(id);
+ }
+
+ public static Collection findComponents(Class c) {
+ return getContainer().findComponents(c);
+ }
+}
blob - /dev/null
blob + 9447ff19efd94bf7691680cd1036619c14f60563 (mode 644)
--- /dev/null
+++ src/snipsnap/api/plugin/ServletPlugin.java
+/*
+ * This file is part of "SnipSnap Wiki/Weblog".
+ *
+ * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel
+ * All Rights Reserved.
+ *
+ * Please visit http://snipsnap.org/ for updates and contact.
+ *
+ * --LICENSE NOTICE--
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * --LICENSE NOTICE--
+ */
+
+package snipsnap.api.plugin;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.ServletException;
+import java.io.IOException;
+
+/**
+ * Interface for servlet plugins
+ */
+
+public interface ServletPlugin {
+ public void service(HttpServletRequest request, HttpServletResponse response)
+ throws IOException, ServletException;
+ public String getPath();
+}
blob - /dev/null
blob + 15ec5229756e8ea443665152191f512bf06c3095 (mode 644)
--- /dev/null
+++ src/snipsnap/api/xmlrpc/SnipSnapPing.java
+/*
+ * This file is part of "SnipSnap Wiki/Weblog".
+ *
+ * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel
+ * All Rights Reserved.
+ *
+ * Please visit http://snipsnap.org/ for updates and contact.
+ *
+ * --LICENSE NOTICE--
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * --LICENSE NOTICE--
+ */
+
+package snipsnap.api.xmlrpc;
+
+import org.snipsnap.util.Weblog;
+import org.snipsnap.util.WeblogQueue;
+
+import java.util.List;
+
+/**
+ * Stores the last changed SnipSnap weblogs, received
+ * bye XML-RPC weblog ping
+ *
+ * @author Stephan Schmidt
+ * @version $Id: SnipSnapPing.java 645 2003-01-09 09:49:12Z stephan $
+ */
+
+public class SnipSnapPing {
+ private static SnipSnapPing instance;
+ private WeblogQueue changed;
+
+ public static synchronized SnipSnapPing getInstance() {
+ if (null == instance) {
+ instance = new SnipSnapPing();
+ }
+ return instance;
+ }
+
+ public SnipSnapPing() {
+ changed = new WeblogQueue(10);
+ }
+
+ public synchronized void addChangedWeblog(String name, String url) {
+ changed.add(new Weblog(name, url));
+ }
+
+ public List getChanged(int count) {
+ return changed.get(count);
+ }
+}