X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=4a73470982eccfb9deabf61f553e5d1e48584cd0;hb=00adeb7e4a42365d0b5feb4e38338285e91a2301;hp=b969bd4f9234b8acd2373ae245f052ae051bd60e;hpb=2284032867d6f03bf4eb7c70204ec33bd39ed006;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index b969bd4..4a73470 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -33,7 +33,10 @@ import freenet.keys.FreenetURI; public class Sone { /** A GUID for this Sone. */ - private final UUID id = UUID.randomUUID(); + private final UUID id; + + /** The name of this Sone. */ + private final String name; /** The URI under which the Sone is stored in Freenet. */ private final FreenetURI requestUri; @@ -48,22 +51,32 @@ public class Sone { /** * Creates a new Sone. * + * @param id + * The ID of this Sone + * @param name + * The name of the Sone * @param requestUri * The request URI of the Sone */ - public Sone(FreenetURI requestUri) { - this(requestUri, null); + public Sone(UUID id, String name, FreenetURI requestUri) { + this(id, name, requestUri, null); } /** * Creates a new Sone. * + * @param id + * The ID of this Sone + * @param name + * The name of the Sone * @param requestUri * The request URI of the Sone * @param insertUri * The insert URI of the Sone */ - public Sone(FreenetURI requestUri, FreenetURI insertUri) { + public Sone(UUID id, String name, FreenetURI requestUri, FreenetURI insertUri) { + this.id = id; + this.name = name; this.requestUri = requestUri; this.insertUri = insertUri; } @@ -82,6 +95,15 @@ public class Sone { } /** + * Returns the name of this Sone. + * + * @return The name of this Sone + */ + public String getName() { + return name; + } + + /** * Returns the request URI of this Sone. * * @return The request URI of this Sone