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