+ /**
+ * Creates a new project. The returned {@link Project} will contain a newly
+ * generated key pair.
+ *
+ * @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() throws IOException, NoNodeException {
+ Project project = new Project();
+ String[] keyPair = nodeManager.generateKeyPair();
+ project.setPrivateKey(keyPair[0]);
+ project.setPublicKey(keyPair[1]);
+ projects.add(project);
+ try {
+ save();
+ } catch (IOException ioe1) {
+ /* ignore, save() will be called again on quit. */
+ }
+ return project;
+ }