View Javadoc
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  
20  package org.apache.myfaces.tobago.context;
21  
22  import javax.faces.context.FacesContext;
23  import javax.faces.render.Renderer;
24  
25  public interface ResourceManager {
26  
27    String getProperty(FacesContext facesContext, String bundle, String propertyKey);
28  
29    Renderer getRenderer(FacesContext facesContext, String rendererType);
30  
31    String[] getScripts(FacesContext facesContext, String name);
32  
33    String[] getStyles(FacesContext facesContext, String name);
34  
35    /**
36     * @param facesContext the current FacesContext
37     * @param nameWithExtension The name with extension
38     * @param ignoreMissing if set to false, an error message will be logged, when image is missing
39     * @return the full file path
40     *
41     * @deprecated
42     */
43    @Deprecated
44    String getImage(FacesContext facesContext, String nameWithExtension, boolean ignoreMissing);
45  
46    /**
47     * @param facesContext the current FacesContext
48     * @param name The name without extension
49     * @param extension The file extension inclusive dot, like ".png"
50     * @param ignoreMissing if set to false, an error message will be logged, when image is missing
51     * @return the full file path
52     */
53    String getImage(FacesContext facesContext, String name, String extension, boolean ignoreMissing);
54  
55  }