remove entries altogether
[jSite2.git] / src / net / pterodactylus / jsite / project / Project.java
index 4dd3819..04760e2 100644 (file)
@@ -26,9 +26,8 @@ import net.pterodactylus.util.beans.AbstractBean;
 /**
  * Container for project information. A Project is capable of notifying
  * {@link PropertyChangeListener}s if any of the contained properties change.
- * 
+ *
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
  */
 public class Project extends AbstractBean {
 
@@ -44,9 +43,12 @@ public class Project extends AbstractBean {
        /** Name of the “private key” property. */
        public static final String PROPERTY_PRIVATE_KEY = "privateKey";
 
-       /** Name of the “local path” property. */
+       /** Name of the “base path” property. */
        public static final String PROPERTY_BASE_PATH = "basePath";
 
+       /** Internal ID. */
+       private String id;
+
        /** The name of the project. */
        private String name;
 
@@ -62,13 +64,48 @@ public class Project extends AbstractBean {
        /** The base path of the project. */
        private String basePath;
 
-       //
-       // EVENT MANAGEMENT
-       //
+       /**
+        * Creates a new project.
+        */
+       public Project() {
+               /* do nothing. */
+       }
+
+       /**
+        * Clones the given project.
+        *
+        * @param project
+        */
+       Project(Project project) {
+               this.name = project.name;
+               this.description = project.description;
+               this.publicKey = project.publicKey;
+               this.privateKey = project.privateKey;
+               this.basePath = project.basePath;
+       }
+
+       /**
+        * Returns the internal ID.
+        *
+        * @return The internal ID
+        */
+       String getId() {
+               return id;
+       }
+
+       /**
+        * Sets the internal ID.
+        *
+        * @param id
+        *            The internal ID
+        */
+       void setId(String id) {
+               this.id = id;
+       }
 
        /**
         * Returns the name of the project.
-        * 
+        *
         * @return The name of the project
         */
        public String getName() {
@@ -77,7 +114,7 @@ public class Project extends AbstractBean {
 
        /**
         * Sets the name of the project.
-        * 
+        *
         * @param name
         *            The name of the project
         */
@@ -89,7 +126,7 @@ public class Project extends AbstractBean {
 
        /**
         * Returns the description of the project.
-        * 
+        *
         * @return The description of the project
         */
        public String getDescription() {
@@ -98,7 +135,7 @@ public class Project extends AbstractBean {
 
        /**
         * Sets the description of the project
-        * 
+        *
         * @param description
         *            The description of the project
         */
@@ -110,7 +147,7 @@ public class Project extends AbstractBean {
 
        /**
         * Returns the public key of the project.
-        * 
+        *
         * @return The public key of the project
         */
        public String getPublicKey() {
@@ -119,11 +156,11 @@ public class Project extends AbstractBean {
 
        /**
         * Sets the public key of the project.
-        * 
+        *
         * @param publicKey
         *            The public key of the project
         */
-       public void setPublicKey(String publicKey) {
+       void setPublicKey(String publicKey) {
                String oldPublicKey = this.publicKey;
                this.publicKey = publicKey;
                fireIfPropertyChanged(PROPERTY_PUBLIC_KEY, oldPublicKey, publicKey);
@@ -131,7 +168,7 @@ public class Project extends AbstractBean {
 
        /**
         * Returns the private key of the project.
-        * 
+        *
         * @return The private key of the project
         */
        public String getPrivateKey() {
@@ -140,11 +177,11 @@ public class Project extends AbstractBean {
 
        /**
         * Sets the private key of the project.
-        * 
+        *
         * @param privateKey
         *            The private key of the project
         */
-       public void setPrivateKey(String privateKey) {
+       void setPrivateKey(String privateKey) {
                String oldPrivateKey = this.privateKey;
                this.privateKey = privateKey;
                fireIfPropertyChanged(PROPERTY_PRIVATE_KEY, oldPrivateKey, privateKey);
@@ -152,7 +189,7 @@ public class Project extends AbstractBean {
 
        /**
         * Returns the base path of the project.
-        * 
+        *
         * @return The base path of the project
         */
        public String getBasePath() {
@@ -161,7 +198,7 @@ public class Project extends AbstractBean {
 
        /**
         * Sets the base path of the project.
-        * 
+        *
         * @param basePath
         *            The base path of the project
         */