001/**
002 * Copyright 2005-2018 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.uif.element;
017
018import org.kuali.rice.krad.datadictionary.parse.BeanTag;
019import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
020
021/**
022 * Renders a link tag in the head of the html document.
023 *
024 * @author Kuali Rice Team (rice.collab@kuali.org)
025 */
026@BeanTag(name = "headLink", parent = "Uif-HeadLink")
027public class HeadLink extends ContentElementBase  {
028    private static final long serialVersionUID = -2295905449114970348L;
029
030    private String media;
031    private String href;
032    private String relation;
033    private String type;
034    private String includeCondition;
035
036    public HeadLink() {
037        super();
038    }
039
040    /**
041     * Media attribute for link tag.
042     *
043     * <p>Media attribute to be rendered on this link tag</p>
044     *
045     * @return  media attribute of link tag
046     */
047    @BeanTagAttribute
048    public String getMedia() {
049        return media;
050    }
051
052    /**
053     * @see HeadLink#getMedia()
054     */
055    public void setMedia(String media) {
056        this.media = media;
057    }
058
059    /**
060     * Href attribute for link tag.
061     *
062     * <p>Href attribute to be rendered on this link tag</p>
063     *
064     * @return  href attribute of link tag
065     */
066    @BeanTagAttribute
067    public String getHref() {
068        return href;
069    }
070
071    /**
072     * @see HeadLink#getHref()
073     */
074    public void setHref(String href) {
075        this.href = href;
076    }
077
078    /**
079     * Rel attribute for link tag.
080     *
081     * <p>Rel attribute to be rendered on this link tag</p>
082     *
083     * @return  rel attribute of link tag
084     */
085    @BeanTagAttribute
086    public String getRelation() {
087        return relation;
088    }
089
090    /**
091     *
092     * @see HeadLink#getRelation()
093     */
094    public void setRelation(String relation) {
095        this.relation = relation;
096    }
097
098    /**
099     * 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}