// // Copyright (c) 2011 Linkeos. // // This file is part of Elveos.org. // Elveos.org is free software: you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation, either version 3 of the License, or (at your // option) any later version. // // Elveos.org is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for // more details. // You should have received a copy of the GNU General Public License along // with Elveos.org. If not, see http://www.gnu.org/licenses/. // package com.bloatit.framework.webprocessor.url; import com.bloatit.framework.utils.parameters.Parameters; import com.bloatit.framework.webprocessor.annotations.ParamContainer.Protocol; public final class PageNotFoundUrl extends Url implements Cloneable { public static String getName() { return "pagenotfound"; } public PageNotFoundUrl() { super(); } @Override public PageNotFoundUrl clone() { // this is imutable so ... return this; } @Override protected void doConstructUrl(final StringBuilder sb) { // nothing to do here. All the work is done in Url. } @Override public void addParameter(final String key, final String value) { // nothing to do here. There is no parameters in PageNotFound } @Override public Messages getMessages() { return new Messages(); } @Override public boolean isAction() { return false; } @Override public String getCode() { return getName(); } @Override protected void doGetParametersAsStrings(final Parameters parameters) { // Do nothing. There is no parameter. } @Override public Protocol getProtocol() { return Protocol.AUTO; } @Override public UrlParameter<?, ?> getParameter(String name) { return null; } public static boolean matches(String pageCode) { return getName().equals(pageCode); } }