create projects in core without name
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 16 May 2008 14:09:56 +0000 (14:09 +0000)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 16 May 2008 14:09:56 +0000 (14:09 +0000)
git-svn-id: http://trooper/svn/projects/jSite/trunk@891 c3eda9e8-030b-0410-8277-bc7414b0a119

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

index d2a5e10..3e8357d 100644 (file)
@@ -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;
 
 }
index 3e96b10..b7ac2aa 100644 (file)
@@ -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]);
index 3652388..45e98ac 100644 (file)
@@ -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) {