1 /**
2 * Copyright 2005-2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krad.uif.view;
17
18 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20 import org.kuali.rice.krad.datadictionary.parse.BeanTags;
21 import org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase;
22
23 import java.io.Serializable;
24 import java.util.List;
25
26 /**
27 * Theme for the current view, currently just a list of stylesheets and js files, but has the potential
28 * for expansion in the future
29 *
30 * @author Kuali Rice Team (rice.collab@kuali.org)
31 */
32 @BeanTags(
33 {@BeanTag(name = "viewTheme-bean", parent = "Uif-ViewTheme"), @BeanTag(name = "baseTheme-bean", parent = "Uif-BaseTheme"),
34 @BeanTag(name = "classicKnsTheme-bean", parent = "Uif-ClassicKnsTheme"),
35 @BeanTag(name = "kradTheme-bean", parent = "Uif-KradTheme")})
36 public class ViewTheme extends UifDictionaryBeanBase implements Serializable {
37 private static final long serialVersionUID = 7063256242857896580L;
38
39 private String imageDirectory;
40
41 private List<String> cssFiles;
42 private List<String> scriptFiles;
43
44 /**
45 * Path to the directory (either relative or absolute) that contains images for the theme
46 *
47 * <p>
48 * Configured directory will populate the {@link org.kuali.rice.krad.uif.UifConstants.ContextVariableNames#THEME_IMAGES}
49 * context variable which can be referenced with an expression for an image source
50 * </p>
51 *
52 * @return theme image directory
53 */
54 public String getImageDirectory() {
55 return imageDirectory;
56 }
57
58 /**
59 * Setter for the directory that contains images for the theme
60 *
61 * @param imageDirectory
62 */
63 public void setImageDirectory(String imageDirectory) {
64 this.imageDirectory = imageDirectory;
65 }
66
67 /**
68 * Get the css stylesheets to be imported for this view, this must be a list of .css files
69 * with their relative paths
70 *
71 * @return List<String>
72 */
73 @BeanTagAttribute(name = "cssFiles", type = BeanTagAttribute.AttributeType.LISTVALUE)
74 public List<String> getCssFiles() {
75 return cssFiles;
76 }
77
78 /**
79 * Set the css stylesheets
80 *
81 * @param cssFiles
82 */
83 public void setCssFiles(List<String> cssFiles) {
84 this.cssFiles = cssFiles;
85 }
86
87 /**
88 * Get the javascript files to be imported for this view, these must be a list of .js files
89 * with their relative paths
90 *
91 * @return List<String>
92 */
93 @BeanTagAttribute(name = "scriptFiles", type = BeanTagAttribute.AttributeType.LISTVALUE)
94 public List<String> getScriptFiles() {
95 return scriptFiles;
96 }
97
98 /**
99 * Set the js files
100 *
101 * @param scriptFiles
102 */
103 public void setScriptFiles(List<String> scriptFiles) {
104 this.scriptFiles = scriptFiles;
105 }
106 }