X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FAlbumAccessor.java;h=f7b6f62890094943f8e141f2582ab7fbf7ad749c;hb=76c5d4ced461ae174384a60a78b49e11ee1e443e;hp=7a5d6d3a8f8115375d2cc16bac08c2e17dae74fd;hpb=50ce65f69e49ed10abeedaeb6615ffb37a0c0772;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java b/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java
index 7a5d6d3..f7b6f62 100644
--- a/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java
+++ b/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java
@@ -1,5 +1,5 @@
/*
- * Sone - AlbumAccessor.java - Copyright © 2011â2012 David Roden
+ * Sone - AlbumAccessor.java - Copyright © 2011â2016 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,11 +18,11 @@
package net.pterodactylus.sone.template;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
+import java.util.Random;
import net.pterodactylus.sone.data.Album;
+import net.pterodactylus.sone.data.Image;
import net.pterodactylus.util.template.Accessor;
import net.pterodactylus.util.template.ReflectionAccessor;
import net.pterodactylus.util.template.TemplateContext;
@@ -31,11 +31,11 @@ import net.pterodactylus.util.template.TemplateContext;
* {@link Accessor} implementation for {@link Album}s. A property named
* âbacklinksâ is added, it returns links to all parents and the owner Sone of
* an album.
- *
- * @author David âBombeâ Roden
*/
public class AlbumAccessor extends ReflectionAccessor {
+ private final Random random = new Random();
+
/**
* {@inheritDoc}
*/
@@ -43,36 +43,67 @@ public class AlbumAccessor extends ReflectionAccessor {
public Object get(TemplateContext templateContext, Object object, String member) {
Album album = (Album) object;
if ("backlinks".equals(member)) {
- List