View Javadoc
1   // ---------- Attention: Generated code, please do not modify! -----------
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.myfaces.tobago.component;
21  
22  import javax.faces.context.FacesContext;
23  import org.apache.myfaces.tobago.internal.component.AbstractUIMetaLink;
24  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
25  import org.apache.myfaces.tobago.internal.util.StringUtils;
26  import org.apache.myfaces.tobago.internal.util.Deprecation;
27  import org.apache.myfaces.tobago.component.Tags;
28  import javax.annotation.Generated;
29  import javax.el.ELException;
30  import javax.faces.FacesException;
31  import java.util.Arrays;
32  import java.util.ArrayList;
33  import java.util.Collection;
34  import java.util.List;
35  import javax.el.MethodExpression;
36  import javax.el.ValueExpression;
37  
38  /**
39   This tag renders a link tag in the header of the HTML output.
40    * UIComponent class, generated from template {@code component.stg} with class
41    * {@link org.apache.myfaces.tobago.internal.taglib.component.MetaLinkTagDeclaration}.
42   */
43  @Generated("component.stg")
44  public class UIMetaLink
45      extends AbstractUIMetaLink  {
46  
47    public static final String COMPONENT_TYPE = Tags.metaLink.componentType();
48  
49    public static final String COMPONENT_FAMILY = "javax.faces.Output";
50  
51  
52    enum PropertyKeys {
53      charset,
54      rev,
55      hreflang,
56      rel,
57      href,
58      media,
59      type,
60    }
61  
62    public String getFamily() {
63      return COMPONENT_FAMILY;
64    }
65  
66  
67    public java.lang.String getCharset() {
68      return (java.lang.String) getStateHelper().eval(PropertyKeys.charset);
69    }
70  
71    public void setCharset(java.lang.String charset) {
72      getStateHelper().put(PropertyKeys.charset, charset);
73    }
74  
75    public java.lang.String getRev() {
76      return (java.lang.String) getStateHelper().eval(PropertyKeys.rev);
77    }
78  
79    public void setRev(java.lang.String rev) {
80      getStateHelper().put(PropertyKeys.rev, rev);
81    }
82  
83    public java.lang.String getHreflang() {
84      return (java.lang.String) getStateHelper().eval(PropertyKeys.hreflang);
85    }
86  
87    public void setHreflang(java.lang.String hreflang) {
88      getStateHelper().put(PropertyKeys.hreflang, hreflang);
89    }
90  
91    public java.lang.String getRel() {
92      return (java.lang.String) getStateHelper().eval(PropertyKeys.rel);
93    }
94  
95    public void setRel(java.lang.String rel) {
96      getStateHelper().put(PropertyKeys.rel, rel);
97    }
98  
99    public java.lang.String getHref() {
100     return (java.lang.String) getStateHelper().eval(PropertyKeys.href);
101   }
102 
103   public void setHref(java.lang.String href) {
104     getStateHelper().put(PropertyKeys.href, href);
105   }
106 
107   public java.lang.String getMedia() {
108     return (java.lang.String) getStateHelper().eval(PropertyKeys.media);
109   }
110 
111   public void setMedia(java.lang.String media) {
112     getStateHelper().put(PropertyKeys.media, media);
113   }
114 
115   public java.lang.String getType() {
116     return (java.lang.String) getStateHelper().eval(PropertyKeys.type);
117   }
118 
119   public void setType(java.lang.String type) {
120     getStateHelper().put(PropertyKeys.type, type);
121   }
122 
123 
124   @Override
125   public void restoreState(FacesContext context, Object state) {
126     // FIXME HACK for mojarra SystemEventListener state restoring bug
127     pushComponentToEL(context, this);
128     super.restoreState(context, state);
129     popComponentFromEL(context);
130   }
131 
132 }