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 org.apache.myfaces.tobago.config.Configurable;
23  import org.apache.myfaces.tobago.layout.Measure;
24  
25  import javax.faces.component.UIViewRoot;
26  import javax.faces.context.FacesContext;
27  import javax.faces.render.Renderer;
28  
29  public interface ResourceManager {
30  
31    @Deprecated
32    String getJsp(UIViewRoot viewRoot, String name);
33  
34    @Deprecated
35    String getProperty(UIViewRoot viewRoot, String bundle, String propertyKey);
36  
37    String getProperty(FacesContext facesContext, String bundle, String propertyKey);
38  
39    @Deprecated
40    Renderer getRenderer(UIViewRoot viewRoot, String rendererType);
41  
42    Renderer getRenderer(FacesContext facesContext, String rendererType);
43  
44    @Deprecated
45    String[] getScripts(UIViewRoot viewRoot, String name);
46  
47    String[] getScripts(FacesContext facesContext, String name);
48  
49    @Deprecated
50    String[] getStyles(UIViewRoot viewRoot, String name);
51  
52    String[] getStyles(FacesContext facesContext, String name);
53  
54    @Deprecated
55    String getThemeProperty(UIViewRoot viewRoot, String bundle, String propertyKey);
56  
57    Measure getThemeMeasure(FacesContext facesContext, Configurable configurable, String name);
58  
59    Measure getThemeMeasure(FacesContext facesContext, String rendererType, Markup markup, String name);
60  
61    @Deprecated
62    String getImage(UIViewRoot viewRoot, String name);
63  
64    /**
65     * @deprecated Please use {@link org.apache.myfaces.tobago.context.ResourceManagerUtils}
66     */
67    @Deprecated
68    String getImage(FacesContext facesContext, String name);
69  
70    @Deprecated
71    String getImage(UIViewRoot viewRoot, String name, boolean ignoreMissing);
72  
73    /**
74     * @param facesContext the current FacesContext
75     * @param nameWithExtension The name with extension
76     * @param ignoreMissing if set to false, an error message will be logged, when image is missing
77     * @return the full file path
78     *
79     * @deprecated
80     */
81    @Deprecated
82    String getImage(FacesContext facesContext, String nameWithExtension, boolean ignoreMissing);
83  
84    /**
85     * @param facesContext the current FacesContext
86     * @param name The name without extension
87     * @param extension The file extension inclusive dot, like ".png"
88     * @param ignoreMissing if set to false, an error message will be logged, when image is missing
89     * @return the full file path
90     */
91    String getImage(
92        FacesContext facesContext, String name, String extension, boolean ignoreMissing);
93  
94    }