From: David ‘Bombe’ Roden Date: Fri, 16 May 2008 14:09:56 +0000 (+0000) Subject: create projects in core without name X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6b6f9763a64c5245ed53b4a6d4103aa2fe6cd481;p=jSite2.git create projects in core without name git-svn-id: http://trooper/svn/projects/jSite/trunk@891 c3eda9e8-030b-0410-8277-bc7414b0a119 --- diff --git a/src/net/pterodactylus/jsite/core/Core.java b/src/net/pterodactylus/jsite/core/Core.java index d2a5e10..3e8357d 100644 --- a/src/net/pterodactylus/jsite/core/Core.java +++ b/src/net/pterodactylus/jsite/core/Core.java @@ -111,17 +111,15 @@ public interface Core { public void disconnectFromNode(Node node); /** - * Creates a new project with the given name. The returned {@link Project} - * will contain a newly generated key pair. + * Creates a new project. The returned {@link Project} will contain a newly + * generated key pair. * - * @param projectName - * The name of the project * @return A newly created project * @throws IOException * if an I/O error occured communicating with the node * @throws NoNodeException * if no node is configured */ - public Project createProject(String projectName) throws IOException, NoNodeException; + public Project createProject() throws IOException, NoNodeException; } diff --git a/src/net/pterodactylus/jsite/core/CoreImpl.java b/src/net/pterodactylus/jsite/core/CoreImpl.java index 3e96b10..b7ac2aa 100644 --- a/src/net/pterodactylus/jsite/core/CoreImpl.java +++ b/src/net/pterodactylus/jsite/core/CoreImpl.java @@ -441,9 +441,8 @@ public class CoreImpl implements Core, NodeListener, RequestListener { /** * {@inheritDoc} */ - public Project createProject(String projectName) throws IOException, NoNodeException { + public Project createProject() throws IOException, NoNodeException { Project project = new Project(); - project.setName(projectName); String[] keyPair = nodeManager.generateKeyPair(); project.setPrivateKey(keyPair[0]); project.setPublicKey(keyPair[1]); diff --git a/src/net/pterodactylus/jsite/gui/SwingInterface.java b/src/net/pterodactylus/jsite/gui/SwingInterface.java index 3652388..45e98ac 100644 --- a/src/net/pterodactylus/jsite/gui/SwingInterface.java +++ b/src/net/pterodactylus/jsite/gui/SwingInterface.java @@ -818,7 +818,9 @@ public class SwingInterface implements CoreListener, LoggingListener { */ private void addProject() { try { - Project project = core.createProject("New Project"); + Project project = core.createProject(); + project.setName(I18n.get("")); /* TODO - i18n */ + project.setDescription(I18n.get("")); /* TODO - i18n */ System.out.println("private: " + project.getPrivateKey() + ", public: " + project.getPublicKey()); mainWindow.addProject(project); } catch (NoNodeException nne1) {