Add site container.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 9 Mar 2009 13:38:33 +0000 (14:38 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 9 Mar 2009 13:38:33 +0000 (14:38 +0100)
src/net/pterodactylus/arachne/core/Site.java [new file with mode: 0644]

diff --git a/src/net/pterodactylus/arachne/core/Site.java b/src/net/pterodactylus/arachne/core/Site.java
new file mode 100644 (file)
index 0000000..bcefb45
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * © 2009 David ‘Bombe’ Roden
+ */
+package net.pterodactylus.arachne.core;
+
+/**
+ * Container for a freenet site. A freenet site consists of the routing and
+ * decryption keys and the basename, without the edition.
+ *
+ * @author David ‘Bombe’ Roden <bombe@pterodactylus.net>
+ */
+public class Site {
+
+       /** The key of the site. */
+       private final String key;
+
+       /** The basename of the site. */
+       private final String basename;
+
+       /**
+        * Creates a new site with the given key and basename.
+        *
+        * @param key
+        *            The key of the site
+        * @param basename
+        *            The basename of the site
+        */
+       public Site(String key, String basename) {
+               this.key = key;
+               this.basename = basename;
+       }
+
+       /**
+        * The routing and decryption keys of the site.
+        *
+        * @return The site’s routing and decryption keys
+        */
+       public String getKey() {
+               return key;
+       }
+
+       /**
+        * Returns the basename of the site, without the edition number.
+        *
+        * @return The site’s basename
+        */
+       public String getBasename() {
+               return basename;
+       }
+
+}