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.internal.mock.faces;
21  
22  import org.apache.myfaces.tobago.context.Theme;
23  import org.apache.myfaces.tobago.internal.config.RenderersConfig;
24  
25  import java.util.List;
26  
27  public class MockTheme implements Theme {
28  
29    private String name;
30  
31    private String displayName;
32  
33    private List<Theme> fallbackThemeList;
34  
35    private RenderersConfig config = new MockRenderersConfig();
36  
37    private boolean versioned;
38  
39    private String version;
40  
41    public MockTheme(String name, String displayName, List<Theme> fallbackThemeList) {
42      this.name = name;
43      this.displayName = displayName;
44      this.fallbackThemeList = fallbackThemeList;
45    }
46  
47    public String getName() {
48      return name;
49    }
50  
51    public List<Theme> getFallbackList() {
52      return fallbackThemeList;
53    }
54  
55    public String getDisplayName() {
56      return displayName;
57    }
58  
59    public String getResourcePath() {
60      return null;
61    }
62  
63    public RenderersConfig getRenderersConfig() {
64      return config;
65    }
66  
67    public String[] getScriptResources(boolean production) {
68      return new String[0];
69    }
70  
71    public String[] getStyleResources(boolean production) {
72      return new String[0];
73    }
74  
75    public boolean isVersioned() {
76      return versioned;
77    }
78  
79    public void setVersioned(boolean versioned) {
80      this.versioned = versioned;
81    }
82  
83    public String getVersion() {
84      return version;
85    }
86  
87    public void setVersion(String version) {
88      this.version = version;
89    }
90  }