From 0a77fd9c0956cb61a4b6daba377343949b575add Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 25 May 2008 12:38:41 +0200 Subject: [PATCH] add virtual entries --- src/net/pterodactylus/jsite/project/Project.java | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/net/pterodactylus/jsite/project/Project.java b/src/net/pterodactylus/jsite/project/Project.java index 1d1de85..ab0b363 100644 --- a/src/net/pterodactylus/jsite/project/Project.java +++ b/src/net/pterodactylus/jsite/project/Project.java @@ -74,6 +74,9 @@ public class Project extends AbstractBean { /** The list of files from the base path. */ private List basePathEntries = new ArrayList(); + /** The list of virtual files. */ + private List virtualEntries = new ArrayList(); + /** * Returns the internal ID. * @@ -218,6 +221,34 @@ public class Project extends AbstractBean { return basePathEntries; } + /** + * Returns the list of visual entries. + * + * @return The visual entries + */ + public List getVirtualEntries() { + return virtualEntries; + } + + /** + * Adds a virtual entry that redirects to the given target. + * + * @param name + * The name of the entry + * @param contentType + * The content type of the entry, or null for + * auto-detection + * @param target + * The target URI of the redirect + */ + public void addVirtualEntry(String name, String contentType, String target) { + RedirectEntry redirectEntry = new RedirectEntry(); + redirectEntry.setName(name); + redirectEntry.setContentType(contentType); + redirectEntry.setTarget(target); + redirectEntry.setInsert(true); + } + // // PRIVATE METHODS // -- 2.7.4