1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.myfaces.trinidad.resource;
20
21 import java.net.URL;
22
23 import java.util.Collections;
24 import java.util.Iterator;
25
26 import javax.faces.context.ExternalContext;
27
28 /**
29 * Non-Trinidad skin resource loader implementations should extend this class and override
30 * findResources to specify where from where to load skin resources.
31 * We will find all overridden classes by calling
32 * <pre>
33 * List<SkinResourceLoader> urlProviders = ClassLoaderUtils.getServices(
34 * "org.apache.myfaces.trinidad.resource.SkinResourceLoader");
35 * </pre>
36 */
37 public class SkinResourceLoader
38 {
39
40 /**
41 * Returns an iterator of URL objects representing all the resources with the given name.
42 * @param context The ExternalContext
43 * @param filename The filename of the resource to find, e.g., "trinidad-skins.xml"
44 * @return An iterator of URL objects for the resources.
45 * Returns an empty iterator if no resources were found.
46 */
47 public Iterator<URL> findResources(ExternalContext context, String filename)
48 {
49 return Collections.<URL>emptyList().iterator();
50 }
51 }