add getProjects
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 17 May 2008 18:26:18 +0000 (18:26 +0000)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 17 May 2008 18:26:18 +0000 (18:26 +0000)
git-svn-id: http://trooper/svn/projects/jSite/trunk@915 c3eda9e8-030b-0410-8277-bc7414b0a119

src/net/pterodactylus/jsite/core/Core.java
src/net/pterodactylus/jsite/core/CoreImpl.java

index 3e8357d..0599a76 100644 (file)
@@ -122,4 +122,11 @@ public interface Core {
         */
        public Project createProject() throws IOException, NoNodeException;
 
+       /**
+        * Returns a list of all projects.
+        * 
+        * @return A list of all projects
+        */
+       public List<Project> getProjects();
+
 }
index 93150f5..a59dade 100644 (file)
@@ -30,7 +30,7 @@ import java.util.List;
  * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
  * @version $Id$
  */
-public class CoreImpl implements Core, NodeListener, RequestListener {
+class CoreImpl implements Core, NodeListener, RequestListener {
 
        /** The core listeners. */
        private final List<CoreListener> coreListeners = new ArrayList<CoreListener>();
@@ -367,6 +367,13 @@ public class CoreImpl implements Core, NodeListener, RequestListener {
                return nodeManager.hasNode(node);
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       public List<Project> getProjects() {
+               return projectManager.getProjects();
+       }
+
        //
        // ACTIONS
        //