Coverage Report - org.seasar.teeda.core.taglib.html.MessageTag
 
Classes in this File Line Coverage Branch Coverage Complexity
MessageTag
100%
67/67
N/A
1
 
 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 org.seasar.teeda.core.taglib.html;
 17  
 
 18  
 import javax.faces.component.UIComponent;
 19  
 import javax.faces.component.html.HtmlMessage;
 20  
 
 21  
 import org.seasar.teeda.core.JsfConstants;
 22  
 import org.seasar.teeda.core.taglib.UIComponentTagBase;
 23  
 
 24  
 /**
 25  
  * @author yone
 26  
  */
 27  4
 public class MessageTag extends UIComponentTagBase {
 28  
 
 29  
     private String forStr;
 30  
 
 31  
     private String showDetail;
 32  
 
 33  
     private String showSummary;
 34  
 
 35  
     private String errorClass;
 36  
 
 37  
     private String errorStyle;
 38  
 
 39  
     private String fatalClass;
 40  
 
 41  
     private String fatalStyle;
 42  
 
 43  
     private String infoClass;
 44  
 
 45  
     private String infoStyle;
 46  
 
 47  
     private String tooltip;
 48  
 
 49  
     private String warnClass;
 50  
 
 51  
     private String warnStyle;
 52  
 
 53  
     public String getErrorClass() {
 54  1
         return errorClass;
 55  
     }
 56  
 
 57  
     public void setErrorClass(String errorClass) {
 58  2
         this.errorClass = errorClass;
 59  2
     }
 60  
 
 61  
     public String getErrorStyle() {
 62  1
         return errorStyle;
 63  
     }
 64  
 
 65  
     public void setErrorStyle(String errorStyle) {
 66  2
         this.errorStyle = errorStyle;
 67  2
     }
 68  
 
 69  
     public String getFatalClass() {
 70  1
         return fatalClass;
 71  
     }
 72  
 
 73  
     public void setFatalClass(String fatalClass) {
 74  2
         this.fatalClass = fatalClass;
 75  2
     }
 76  
 
 77  
     public String getFatalStyle() {
 78  1
         return fatalStyle;
 79  
     }
 80  
 
 81  
     public void setFatalStyle(String fatalStyle) {
 82  2
         this.fatalStyle = fatalStyle;
 83  2
     }
 84  
 
 85  
     public String getFor() {
 86  1
         return forStr;
 87  
     }
 88  
 
 89  
     public void setFor(String forStr) {
 90  2
         this.forStr = forStr;
 91  2
     }
 92  
 
 93  
     public String getInfoClass() {
 94  1
         return infoClass;
 95  
     }
 96  
 
 97  
     public void setInfoClass(String infoClass) {
 98  2
         this.infoClass = infoClass;
 99  2
     }
 100  
 
 101  
     public String getInfoStyle() {
 102  1
         return infoStyle;
 103  
     }
 104  
 
 105  
     public void setInfoStyle(String infoStyle) {
 106  2
         this.infoStyle = infoStyle;
 107  2
     }
 108  
 
 109  
     public String getShowDetail() {
 110  1
         return showDetail;
 111  
     }
 112  
 
 113  
     public void setShowDetail(String showDetail) {
 114  2
         this.showDetail = showDetail;
 115  2
     }
 116  
 
 117  
     public String getShowSummary() {
 118  1
         return showSummary;
 119  
     }
 120  
 
 121  
     public void setShowSummary(String showSummary) {
 122  2
         this.showSummary = showSummary;
 123  2
     }
 124  
 
 125  
     public String getTooltip() {
 126  1
         return tooltip;
 127  
     }
 128  
 
 129  
     public void setTooltip(String tooltip) {
 130  2
         this.tooltip = tooltip;
 131  2
     }
 132  
 
 133  
     public String getWarnClass() {
 134  1
         return warnClass;
 135  
     }
 136  
 
 137  
     public void setWarnClass(String warnClass) {
 138  2
         this.warnClass = warnClass;
 139  2
     }
 140  
 
 141  
     public String getWarnStyle() {
 142  1
         return warnStyle;
 143  
     }
 144  
 
 145  
     public void setWarnStyle(String warnStyle) {
 146  2
         this.warnStyle = warnStyle;
 147  2
     }
 148  
 
 149  
     public String getComponentType() {
 150  1
         return HtmlMessage.COMPONENT_TYPE;
 151  
     }
 152  
 
 153  
     public String getRendererType() {
 154  3
         return "javax.faces.Message";
 155  
     }
 156  
 
 157  
     protected void setProperties(UIComponent component) {
 158  1
         super.setProperties(component);
 159  
 
 160  1
         setComponentProperty(component, JsfConstants.FOR_ATTR, forStr);
 161  1
         setComponentProperty(component, JsfConstants.SHOW_DETAIL_ATTR,
 162  
                 showDetail);
 163  1
         setComponentProperty(component, JsfConstants.SHOW_SUMMARY_ATTR,
 164  
                 showSummary);
 165  1
         setComponentProperty(component, JsfConstants.ERROR_CLASS_ATTR,
 166  
                 errorClass);
 167  1
         setComponentProperty(component, JsfConstants.ERROR_STYLE_ATTR,
 168  
                 errorStyle);
 169  1
         setComponentProperty(component, JsfConstants.FATAL_CLASS_ATTR,
 170  
                 fatalClass);
 171  1
         setComponentProperty(component, JsfConstants.FATAL_STYLE_ATTR,
 172  
                 fatalStyle);
 173  1
         setComponentProperty(component, JsfConstants.INFO_CLASS_ATTR, infoClass);
 174  1
         setComponentProperty(component, JsfConstants.INFO_STYLE_ATTR, infoStyle);
 175  1
         setComponentProperty(component, JsfConstants.TOOLTIP_ATTR, tooltip);
 176  1
         setComponentProperty(component, JsfConstants.WARN_CLASS_ATTR, warnClass);
 177  1
         setComponentProperty(component, JsfConstants.WARN_STYLE_ATTR, warnStyle);
 178  1
     }
 179  
 
 180  
     public void release() {
 181  1
         super.release();
 182  1
         forStr = null;
 183  1
         showDetail = null;
 184  1
         showSummary = null;
 185  1
         errorClass = null;
 186  1
         errorStyle = null;
 187  1
         fatalClass = null;
 188  1
         fatalStyle = null;
 189  1
         infoClass = null;
 190  1
         infoStyle = null;
 191  1
         tooltip = null;
 192  1
         warnClass = null;
 193  1
         warnStyle = null;
 194  1
     }
 195  
 
 196  
 }