1 /**
2 * Copyright 2005-2014 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.element;
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
22 /**
23 * builds <link> tags with various attributes
24 * in the <head> of the html document
25 *
26 */
27 @BeanTags({@BeanTag(name = "view-headLink", parent = "Uif-HeadLink")})
28 public class HeadLink extends ContentElementBase {
29
30 private String media;
31 private String href;
32 private String relation;
33 private String type;
34 private String includeCondition;
35
36
37 public HeadLink() {
38 super();
39 }
40
41
42 /**
43 *
44 * @return media
45 */
46 @BeanTagAttribute(name = "media")
47 public String getMedia() {
48 return media;
49 }
50
51 /**
52 *
53 * @param media
54 */
55 public void setMedia(String media) {
56 this.media = media;
57 }
58
59 /**
60 *
61 * @return href
62 */
63 @BeanTagAttribute(name = "href")
64 public String getHref() {
65 return href;
66 }
67
68 /**
69 *
70 * @param href
71 */
72 public void setHref(String href) {
73 this.href = href;
74 }
75
76 /**
77 * rel attribute for <link>
78 *
79 * @return relation
80 */
81 @BeanTagAttribute(name = "relation")
82 public String getRelation() {
83 return relation;
84 }
85
86 /**
87 *
88 * @param rel
89 */
90 public void setRelation(String relation) {
91 this.relation = relation;
92 }
93
94 /**
95 *
96 * @return type
97 */
98 @BeanTagAttribute(name = "type")
99 public String getType() {
100 return type;
101 }
102
103 /**
104 *
105 * @param type
106 */
107 public void setType(String type) {
108 this.type = type;
109 }
110
111 /**
112 * includeCondition wraps conditional html comments for
113 * choosing css files based on browser info
114 * exampe:
115 * for the folling code
116 * {@code
117 * <!--[if ie 9]>
118 * <link href="ie9.css" type="text/stylesheet"></link>
119 * <![endif]-->
120 * }
121 *
122 * the includeCondition would be "if ie 9"
123 *
124 * @return includeCondition
125 */
126 @BeanTagAttribute(name = "includeCondition")
127 public String getIncludeCondition() {
128 return includeCondition;
129 }
130
131 /**
132 *
133 * @param includeCondition
134 */
135 public void setIncludeCondition(String includeCondition) {
136 this.includeCondition = includeCondition;
137 }
138
139 }