Coverage Report - javax.faces.component.html.HtmlCommandLink
 
Classes in this File Line Coverage Branch Coverage Complexity
HtmlCommandLink
100%
225/225
100%
54/54
1.947
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
 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,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package javax.faces.component.html;
 17  
 
 18  
 import javax.faces.component.ComponentUtil_;
 19  
 import javax.faces.component.UICommand;
 20  
 import javax.faces.context.FacesContext;
 21  
 
 22  
 import org.seasar.teeda.core.JsfConstants;
 23  
 
 24  
 /**
 25  
  * @author shot
 26  
  */
 27  
 public class HtmlCommandLink extends UICommand {
 28  
 
 29  
     public static final String COMPONENT_TYPE = "javax.faces.HtmlCommandLink";
 30  
 
 31  
     private static final String DEFAULT_RENDERER_TYPE = "javax.faces.Link";
 32  
 
 33  186
     private String accesskey = null;
 34  
 
 35  186
     private String charset = null;
 36  
 
 37  186
     private String coords = null;
 38  
 
 39  186
     private String dir = null;
 40  
 
 41  186
     private String hreflang = null;
 42  
 
 43  186
     private String lang = null;
 44  
 
 45  186
     private String onblur = null;
 46  
 
 47  186
     private String onclick = null;
 48  
 
 49  186
     private String ondblclick = null;
 50  
 
 51  186
     private String onfocus = null;
 52  
 
 53  186
     private String onkeydown = null;
 54  
 
 55  186
     private String onkeypress = null;
 56  
 
 57  186
     private String onkeyup = null;
 58  
 
 59  186
     private String onmousedown = null;
 60  
 
 61  186
     private String onmousemove = null;
 62  
 
 63  186
     private String onmouseout = null;
 64  
 
 65  186
     private String onmouseover = null;
 66  
 
 67  186
     private String onmouseup = null;
 68  
 
 69  186
     private String rel = null;
 70  
 
 71  186
     private String rev = null;
 72  
 
 73  186
     private String shape = null;
 74  
 
 75  186
     private String style = null;
 76  
 
 77  186
     private String styleClass = null;
 78  
 
 79  186
     private String tabindex = null;
 80  
 
 81  186
     private String target = null;
 82  
 
 83  186
     private String title = null;
 84  
 
 85  186
     private String type = null;
 86  
 
 87  186
     public HtmlCommandLink() {
 88  186
         setRendererType(DEFAULT_RENDERER_TYPE);
 89  186
     }
 90  
 
 91  
     public void setAccesskey(String accesskey) {
 92  3
         this.accesskey = accesskey;
 93  3
     }
 94  
 
 95  
     public String getAccesskey() {
 96  17
         if (accesskey != null) {
 97  3
             return accesskey;
 98  
         }
 99  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 100  
                 JsfConstants.ACCESSKEY_ATTR);
 101  
     }
 102  
 
 103  
     public void setCharset(String charset) {
 104  4
         this.charset = charset;
 105  4
     }
 106  
 
 107  
     public String getCharset() {
 108  17
         if (charset != null) {
 109  3
             return charset;
 110  
         }
 111  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 112  
                 JsfConstants.CHARSET_ATTR);
 113  
     }
 114  
 
 115  
     public void setCoords(String coords) {
 116  4
         this.coords = coords;
 117  4
     }
 118  
 
 119  
     public String getCoords() {
 120  17
         if (coords != null) {
 121  3
             return coords;
 122  
         }
 123  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 124  
                 JsfConstants.COORDS_ATTR);
 125  
     }
 126  
 
 127  
     public void setDir(String dir) {
 128  3
         this.dir = dir;
 129  3
     }
 130  
 
 131  
     public String getDir() {
 132  17
         if (dir != null) {
 133  3
             return dir;
 134  
         }
 135  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 136  
                 JsfConstants.DIR_ATTR);
 137  
     }
 138  
 
 139  
     public void setHreflang(String hreflang) {
 140  4
         this.hreflang = hreflang;
 141  4
     }
 142  
 
 143  
     public String getHreflang() {
 144  17
         if (hreflang != null) {
 145  3
             return hreflang;
 146  
         }
 147  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 148  
                 JsfConstants.HREFLANG_ATTR);
 149  
     }
 150  
 
 151  
     public void setLang(String lang) {
 152  3
         this.lang = lang;
 153  3
     }
 154  
 
 155  
     public String getLang() {
 156  17
         if (lang != null) {
 157  3
             return lang;
 158  
         }
 159  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 160  
                 JsfConstants.LANG_ATTR);
 161  
     }
 162  
 
 163  
     public void setOnblur(String onblur) {
 164  3
         this.onblur = onblur;
 165  3
     }
 166  
 
 167  
     public String getOnblur() {
 168  17
         if (onblur != null) {
 169  3
             return onblur;
 170  
         }
 171  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 172  
                 JsfConstants.ONBLUR_ATTR);
 173  
     }
 174  
 
 175  
     public void setOnclick(String onclick) {
 176  4
         this.onclick = onclick;
 177  4
     }
 178  
 
 179  
     public String getOnclick() {
 180  17
         if (onclick != null) {
 181  4
             return onclick;
 182  
         }
 183  13
         return ComponentUtil_.getValueBindingValueAsString(this,
 184  
                 JsfConstants.ONCLICK_ATTR);
 185  
     }
 186  
 
 187  
     public void setOndblclick(String ondblclick) {
 188  3
         this.ondblclick = ondblclick;
 189  3
     }
 190  
 
 191  
     public String getOndblclick() {
 192  17
         if (ondblclick != null) {
 193  3
             return ondblclick;
 194  
         }
 195  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 196  
                 JsfConstants.ONDBLCLICK_ATTR);
 197  
     }
 198  
 
 199  
     public void setOnfocus(String onfocus) {
 200  3
         this.onfocus = onfocus;
 201  3
     }
 202  
 
 203  
     public String getOnfocus() {
 204  17
         if (onfocus != null) {
 205  3
             return onfocus;
 206  
         }
 207  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 208  
                 JsfConstants.ONFOCUS_ATTR);
 209  
     }
 210  
 
 211  
     public void setOnkeydown(String onkeydown) {
 212  3
         this.onkeydown = onkeydown;
 213  3
     }
 214  
 
 215  
     public String getOnkeydown() {
 216  17
         if (onkeydown != null) {
 217  3
             return onkeydown;
 218  
         }
 219  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 220  
                 JsfConstants.ONKEYDOWN_ATTR);
 221  
     }
 222  
 
 223  
     public void setOnkeypress(String onkeypress) {
 224  3
         this.onkeypress = onkeypress;
 225  3
     }
 226  
 
 227  
     public String getOnkeypress() {
 228  17
         if (onkeypress != null) {
 229  3
             return onkeypress;
 230  
         }
 231  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 232  
                 JsfConstants.ONKEYPRESS_ATTR);
 233  
     }
 234  
 
 235  
     public void setOnkeyup(String onkeyup) {
 236  3
         this.onkeyup = onkeyup;
 237  3
     }
 238  
 
 239  
     public String getOnkeyup() {
 240  17
         if (onkeyup != null) {
 241  3
             return onkeyup;
 242  
         }
 243  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 244  
                 JsfConstants.ONKEYUP_ATTR);
 245  
     }
 246  
 
 247  
     public void setOnmousedown(String onmousedown) {
 248  3
         this.onmousedown = onmousedown;
 249  3
     }
 250  
 
 251  
     public String getOnmousedown() {
 252  17
         if (onmousedown != null) {
 253  3
             return onmousedown;
 254  
         }
 255  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 256  
                 JsfConstants.ONMOUSEDOWN_ATTR);
 257  
     }
 258  
 
 259  
     public void setOnmousemove(String onmousemove) {
 260  3
         this.onmousemove = onmousemove;
 261  3
     }
 262  
 
 263  
     public String getOnmousemove() {
 264  17
         if (onmousemove != null) {
 265  3
             return onmousemove;
 266  
         }
 267  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 268  
                 JsfConstants.ONMOUSEMOVE_ATTR);
 269  
     }
 270  
 
 271  
     public void setOnmouseout(String onmouseout) {
 272  3
         this.onmouseout = onmouseout;
 273  3
     }
 274  
 
 275  
     public String getOnmouseout() {
 276  17
         if (onmouseout != null) {
 277  3
             return onmouseout;
 278  
         }
 279  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 280  
                 JsfConstants.ONMOUSEOUT_ATTR);
 281  
     }
 282  
 
 283  
     public void setOnmouseover(String onmouseover) {
 284  3
         this.onmouseover = onmouseover;
 285  3
     }
 286  
 
 287  
     public String getOnmouseover() {
 288  17
         if (onmouseover != null) {
 289  3
             return onmouseover;
 290  
         }
 291  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 292  
                 JsfConstants.ONMOUSEOVER_ATTR);
 293  
     }
 294  
 
 295  
     public void setOnmouseup(String onmouseup) {
 296  3
         this.onmouseup = onmouseup;
 297  3
     }
 298  
 
 299  
     public String getOnmouseup() {
 300  17
         if (onmouseup != null) {
 301  3
             return onmouseup;
 302  
         }
 303  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 304  
                 JsfConstants.ONMOUSEUP_ATTR);
 305  
     }
 306  
 
 307  
     public void setRel(String rel) {
 308  4
         this.rel = rel;
 309  4
     }
 310  
 
 311  
     public String getRel() {
 312  17
         if (rel != null) {
 313  3
             return rel;
 314  
         }
 315  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 316  
                 JsfConstants.REL_ATTR);
 317  
     }
 318  
 
 319  
     public void setRev(String rev) {
 320  4
         this.rev = rev;
 321  4
     }
 322  
 
 323  
     public String getRev() {
 324  17
         if (rev != null) {
 325  3
             return rev;
 326  
         }
 327  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 328  
                 JsfConstants.REV_ATTR);
 329  
     }
 330  
 
 331  
     public void setShape(String shape) {
 332  4
         this.shape = shape;
 333  4
     }
 334  
 
 335  
     public String getShape() {
 336  17
         if (shape != null) {
 337  3
             return shape;
 338  
         }
 339  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 340  
                 JsfConstants.SHAPE_ATTR);
 341  
     }
 342  
 
 343  
     public void setStyle(String style) {
 344  3
         this.style = style;
 345  3
     }
 346  
 
 347  
     public String getStyle() {
 348  17
         if (style != null) {
 349  3
             return style;
 350  
         }
 351  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 352  
                 JsfConstants.STYLE_ATTR);
 353  
     }
 354  
 
 355  
     public void setStyleClass(String styleClass) {
 356  3
         this.styleClass = styleClass;
 357  3
     }
 358  
 
 359  
     public String getStyleClass() {
 360  17
         if (styleClass != null) {
 361  3
             return styleClass;
 362  
         }
 363  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 364  
                 JsfConstants.STYLE_CLASS_ATTR);
 365  
     }
 366  
 
 367  
     public void setTabindex(String tabindex) {
 368  3
         this.tabindex = tabindex;
 369  3
     }
 370  
 
 371  
     public String getTabindex() {
 372  17
         if (tabindex != null) {
 373  3
             return tabindex;
 374  
         }
 375  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 376  
                 JsfConstants.TABINDEX_ATTR);
 377  
     }
 378  
 
 379  
     public void setTarget(String target) {
 380  5
         this.target = target;
 381  5
     }
 382  
 
 383  
     public String getTarget() {
 384  31
         if (target != null) {
 385  6
             return target;
 386  
         }
 387  25
         return ComponentUtil_.getValueBindingValueAsString(this,
 388  
                 JsfConstants.TARGET_ATTR);
 389  
     }
 390  
 
 391  
     public void setTitle(String title) {
 392  3
         this.title = title;
 393  3
     }
 394  
 
 395  
     public String getTitle() {
 396  17
         if (title != null) {
 397  3
             return title;
 398  
         }
 399  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 400  
                 JsfConstants.TITLE_ATTR);
 401  
     }
 402  
 
 403  
     public void setType(String type) {
 404  4
         this.type = type;
 405  4
     }
 406  
 
 407  
     public String getType() {
 408  17
         if (type != null) {
 409  3
             return type;
 410  
         }
 411  14
         return ComponentUtil_.getValueBindingValueAsString(this,
 412  
                 JsfConstants.TYPE_ATTR);
 413  
     }
 414  
 
 415  
     public Object saveState(FacesContext context) {
 416  4
         Object values[] = new Object[28];
 417  4
         values[0] = super.saveState(context);
 418  4
         values[1] = accesskey;
 419  4
         values[2] = charset;
 420  4
         values[3] = coords;
 421  4
         values[4] = dir;
 422  4
         values[5] = hreflang;
 423  4
         values[6] = lang;
 424  4
         values[7] = onblur;
 425  4
         values[8] = onclick;
 426  4
         values[9] = ondblclick;
 427  4
         values[10] = onfocus;
 428  4
         values[11] = onkeydown;
 429  4
         values[12] = onkeypress;
 430  4
         values[13] = onkeyup;
 431  4
         values[14] = onmousedown;
 432  4
         values[15] = onmousemove;
 433  4
         values[16] = onmouseout;
 434  4
         values[17] = onmouseover;
 435  4
         values[18] = onmouseup;
 436  4
         values[19] = rel;
 437  4
         values[20] = rev;
 438  4
         values[21] = shape;
 439  4
         values[22] = style;
 440  4
         values[23] = styleClass;
 441  4
         values[24] = tabindex;
 442  4
         values[25] = target;
 443  4
         values[26] = title;
 444  4
         values[27] = type;
 445  4
         return ((Object) (values));
 446  
     }
 447  
 
 448  
     public void restoreState(FacesContext context, Object state) {
 449  3
         Object values[] = (Object[]) state;
 450  3
         super.restoreState(context, values[0]);
 451  3
         accesskey = (String) values[1];
 452  3
         charset = (String) values[2];
 453  3
         coords = (String) values[3];
 454  3
         dir = (String) values[4];
 455  3
         hreflang = (String) values[5];
 456  3
         lang = (String) values[6];
 457  3
         onblur = (String) values[7];
 458  3
         onclick = (String) values[8];
 459  3
         ondblclick = (String) values[9];
 460  3
         onfocus = (String) values[10];
 461  3
         onkeydown = (String) values[11];
 462  3
         onkeypress = (String) values[12];
 463  3
         onkeyup = (String) values[13];
 464  3
         onmousedown = (String) values[14];
 465  3
         onmousemove = (String) values[15];
 466  3
         onmouseout = (String) values[16];
 467  3
         onmouseover = (String) values[17];
 468  3
         onmouseup = (String) values[18];
 469  3
         rel = (String) values[19];
 470  3
         rev = (String) values[20];
 471  3
         shape = (String) values[21];
 472  3
         style = (String) values[22];
 473  3
         styleClass = (String) values[23];
 474  3
         tabindex = (String) values[24];
 475  3
         target = (String) values[25];
 476  3
         title = (String) values[26];
 477  3
         type = (String) values[27];
 478  3
     }
 479  
 }