View Javadoc
1   /**
2    * Copyright 2005-2016 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  
21  /**
22   * Renders a link tag in the head of the html document.
23   *
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  @BeanTag(name = "headLink", parent = "Uif-HeadLink")
27  public class HeadLink extends ContentElementBase  {
28      private static final long serialVersionUID = -2295905449114970348L;
29  
30      private String media;
31      private String href;
32      private String relation;
33      private String type;
34      private String includeCondition;
35  
36      public HeadLink() {
37          super();
38      }
39  
40      /**
41       * Media attribute for link tag.
42       *
43       * <p>Media attribute to be rendered on this link tag</p>
44       *
45       * @return  media attribute of link tag
46       */
47      @BeanTagAttribute
48      public String getMedia() {
49          return media;
50      }
51  
52      /**
53       * @see HeadLink#getMedia()
54       */
55      public void setMedia(String media) {
56          this.media = media;
57      }
58  
59      /**
60       * Href attribute for link tag.
61       *
62       * <p>Href attribute to be rendered on this link tag</p>
63       *
64       * @return  href attribute of link tag
65       */
66      @BeanTagAttribute
67      public String getHref() {
68          return href;
69      }
70  
71      /**
72       * @see HeadLink#getHref()
73       */
74      public void setHref(String href) {
75          this.href = href;
76      }
77  
78      /**
79       * Rel attribute for link tag.
80       *
81       * <p>Rel attribute to be rendered on this link tag</p>
82       *
83       * @return  rel attribute of link tag
84       */
85      @BeanTagAttribute
86      public String getRelation() {
87          return relation;
88      }
89  
90      /**
91       *
92       * @see HeadLink#getRelation()
93       */
94      public void setRelation(String relation) {
95          this.relation = relation;
96      }
97  
98      /**
99       * Type attribute for link tag.
100      *
101      * <p>Type attribute to be rendered on this link tag</p>
102      *
103      * @return  type attribute of link tag
104      */
105     @BeanTagAttribute
106     public String getType() {
107         return type;
108     }
109 
110     /**
111      *
112      * @see HeadLink#getType()
113      */
114     public void setType(String type) {
115         this.type = type;
116     }
117 
118     /**
119      * IncludeCondition wraps custom html comments around link tags.
120      *
121      * <p>IncludeCondition wraps conditional html comments for
122      * choosing css files based on browser info.
123      * e.g.
124      * for the following code
125      *  {@code
126      *      <!--[if  ie 9]>
127      *         <link href="ie9.css" type="text/stylesheet"></link>
128      *      <![endif]-->
129      *  }
130      *
131      *  the includeCondition would be  "if  ie 9"</p>
132      *
133      * @return  includeCondition
134      */
135     @BeanTagAttribute
136     public String getIncludeCondition() {
137         return includeCondition;
138     }
139 
140     /**
141      *
142      * @see HeadLink#getIncludeCondition()
143      */
144     public void setIncludeCondition(String includeCondition) {
145         this.includeCondition = includeCondition;
146     }
147 
148 }