    001// Copyright 2010 The Apache Software Foundation
    002//
    003// Licensed under the Apache License, Version 2.0 (the "License");
    004// you may not use this file except in compliance with the License.
    005// You may obtain a copy of the License at
    006//
    007// http://www.apache.org/licenses/LICENSE-2.0
    008//
    009// Unless required by applicable law or agreed to in writing, software
    010// distributed under the License is distributed on an "AS IS" BASIS,
    011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    012// See the License for the specific language governing permissions and
    013// limitations under the License.
    014
    015package org.apache.tapestry5.internal;
    016
    017import java.net.MalformedURLException;
    018import java.net.URL;
    019
    020/**
    021 * Defines constants for the two basic asset prefixes.
    022 *
    023 * @since 5.2.0
    024 */
    025public class AssetConstants
    026{
    027    /** For assets that are stored in the web application context. */
    028    public static final String CONTEXT = "context";
    029
    030    /** For assets that are stored in the classpath (i.e., inside 3rd party component library JARs). */
    031    public static final String CLASSPATH = "classpath";
    032
    033    /** For assets that are external (stored in another service) and have a non-secure URL (http://...) */
    034    public static final String HTTP = "http";
    035
    036    /** For assets that are external (stored in another service) and have a secure URL (https://...) */
    037    public static final String HTTPS = "https";
    038
    039    /** For assets that are external (stored in another service) and have a protocol-relative URL (//...) */
    040    public static final String PROTOCOL_RELATIVE = "//";
    041
    042    /** For assets that are external (stored in another service) and stored in a publicly available FTP server (ftp://...) */
    043    public static final String FTP = "ftp";
    044
    045}