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.services.javascript; 016 017import java.util.List; 018 019import org.apache.tapestry5.SymbolConstants; 020import org.apache.tapestry5.services.javascript.JavaScriptStack; 021import org.apache.tapestry5.services.javascript.JavaScriptStackSource; 022import org.apache.tapestry5.services.javascript.JavaScriptSupport; 023 024/** 025 * Used to generate a list of asset URL paths for the JavaScript libraries 026 * of a JavaScript stack. This encapsulates much of the logic of {@linkplain SymbolConstants#COMBINE_SCRIPTS script 027 * aggregation}. 028 * 029 * @since 5.2.0 030 * @see JavaScriptStack 031 * @see JavaScriptStackSource 032 * @see JavaScriptSupport 033 */ 034public interface JavaScriptStackPathConstructor 035{ 036 /** 037 * Given a stack, by name, return a list of URL paths for the individual libraries in the stack. 038 * If scripts are combined, this will be a single (combined) URL. 039 * 040 * @param stackName 041 * name of {@link JavaScriptStack} 042 */ 043 List<String> constructPathsForJavaScriptStack(String stackName); 044}