X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fcore%2FCore.java;h=4a3531a98cef33a6a7c8b8f03788adb5792eb3f1;hb=fe1254de274c0e3b74df93d00051e7025d725579;hp=38e8914dba4ea44dc8d0ae8bfe21cc9bb434730f;hpb=f58c676a286a7cd8d37c3f510e787144a9bff5ad;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/core/Core.java b/src/net/pterodactylus/jsite/core/Core.java index 38e8914..4a3531a 100644 --- a/src/net/pterodactylus/jsite/core/Core.java +++ b/src/net/pterodactylus/jsite/core/Core.java @@ -19,14 +19,16 @@ package net.pterodactylus.jsite.core; +import java.io.IOException; import java.net.UnknownHostException; import java.util.List; +import java.util.concurrent.Executor; + /** * Interface for the core. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public interface Core { @@ -47,6 +49,13 @@ public interface Core { public void removeCoreListener(CoreListener coreListener); /** + * Returns a thread pool. + * + * @return A thread pool + */ + public Executor getThreadPool(); + + /** * Adds the given node to the core. * * @param node @@ -109,4 +118,39 @@ public interface Core { */ public void disconnectFromNode(Node node); + /** + * Creates a new project. + * + * @throws IOException + * if an I/O error occured communicating with the node + * @throws JSiteException + * if there is a problem with the node + */ + public void createProject() throws IOException, JSiteException; + + /** + * Clones the given project. {@link CoreListener}s will be notified of the + * new clone via the {@link CoreListener#projectCloned(Project, Project)} + * event. + * + * @param project + * The project to clone + */ + public void cloneProject(Project project); + + /** + * Removes the given project. + * + * @param project + * The project to remove + */ + public void removeProject(Project project); + + /** + * Returns a list of all projects. + * + * @return A list of all projects + */ + public List getProjects(); + }