/*
 * Copyright 2015 Patrick Ahlbrecht
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package de.onyxbits.raccoon;

import java.net.URI;

/**
 * A central registry for urls used in various places.
 * 
 * @author patrick
 * 
 */
public final class Bookmarks {

	public static final URI BASE = URI.create("http://raccoon.onyxbits.de/");
	public static final URI PREMIUM = URI.create("http://billing.onyxbits.de/");

	public static final URI HANDBOOK = BASE.resolve("/handbook");
	public static final URI RELEASES = BASE.resolve("/releases");
	public static final URI LATEST = BASE.resolve("latestversion");
	public static final URI SETUP = BASE.resolve("/content/first-steps-setup-wizard");

	public static final URI SHOUTBOXFEED = BASE.resolve("/feed/shoutbox");

	public static final URI USB_DEBUGGING = BASE.resolve("/content/enable-usb-debugging");

	public static final URI FEATURELIST = PREMIUM.resolve("/benefits");
	
	public static final URI ORDER = PREMIUM.resolve("/");
	public static final URI SUPPORT = PREMIUM.resolve("/support/email");

}

@@ -641,16 +641,68 @@
 net.URI;
+%0Aimport java.util.Currency;%0Aimport java.util.Locale;
 %0A%0A/**%0A *
@@ -1195,24 +1195,28 @@
 SETUP = BASE
+%0A%09%09%09
 .resolve(%22/c
@@ -1365,24 +1365,28 @@
 GGING = BASE
+%0A%09%09%09
 .resolve(%22/c
@@ -1457,123 +1457,312 @@
 LIST
- = PREMIUM.resolve(%22/benefits%22);%0A%09%0A%09public static final URI ORDER = PREMIUM.resolve(%22/%22);%0A%09public static final URI 
+;%0A%09public static final URI ORDER;%0A%09public static final URI SUPPORT;%0A%0A%09static %7B%0A%09%09Currency currency = Currency.getInstance(Locale.getDefault());%0A%09%09String cc = currency.getCurrencyCode().toLowerCase();%0A%09%09FEATURELIST = PREMIUM.resolve(%22/benefits?offer=%22 + cc);%0A%09%09ORDER = PREMIUM.resolve(%22/?offer=%22 + cc);%0A%09%09
 SUPP
@@ -1798,15 +1798,29 @@
 rt/email
-%22
+?offer=%22 + cc
 );%0A
+%09%7D
 %0A%7D%0A

rename url parameter