2 * jSite - a tool for uploading websites into Freenet
3 * Copyright (C) 2006 David Roden
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 package de.todesbaum.jsite.application;
23 * Project extension for edition-based projects. In Freenet 0.7 this is
24 * currently the only project type.
26 * @author David Roden <droden@gmail.com>
27 * @version $Id: EditionProject.java 417 2006-03-29 12:36:54Z bombe $
29 public class EditionProject extends Project {
31 /** The edition to insert to. */
35 * Creates a new edition-based project.
37 public EditionProject() {
41 * Clones the specified project as an edition-based project.
44 * The project to clone
46 public EditionProject(Project project) {
48 if (project instanceof EditionProject) {
49 edition = ((EditionProject) project).edition;
54 * Returns the edition of the project.
56 * @return The edition of the project
58 public int getEdition() {
63 * Sets the edition of the project.
68 public void setEdition(int edition) {
69 this.edition = edition;
73 * Constructs the final request URI including the edition number.
75 * @return The final request URI
78 public String getFinalURI(int editionOffset) {
79 return requestURI + path + "-" + (edition + editionOffset) + "/";