Coverage Report - org.kuali.rice.kns.web.ui.ExtraButton
 
Classes in this File Line Coverage Branch Coverage Complexity
ExtraButton
0%
0/22
0%
0/2
1.1
 
 1  
 /*
 2  
  * Copyright 2007 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
 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, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kns.web.ui;
 17  
 
 18  
 import java.io.Serializable;
 19  
 
 20  
 import org.apache.commons.lang.StringUtils;
 21  
 import org.kuali.rice.kns.service.KNSServiceLocator;
 22  
 import org.kuali.rice.kns.util.KNSConstants;
 23  
 
 24  
 /**
 25  
  * Represents an extra button that may appear on the lookups or bottom of a
 26  
  * document page.
 27  
  */
 28  0
 public class ExtraButton implements Serializable {
 29  0
         private String extraButtonSource = "";
 30  
 
 31  0
         private String extraButtonAltText = "";
 32  
 
 33  0
         private String extraButtonParams = "";
 34  
 
 35  0
         private String extraButtonProperty = "";
 36  
 
 37  0
         private String extraButtonOnclick = "";
 38  
          
 39  
         public String getExtraButtonAltText() {
 40  0
                 return extraButtonAltText;
 41  
         }
 42  
 
 43  
         public void setExtraButtonAltText(String extraButtonAltText) {
 44  0
                 this.extraButtonAltText = extraButtonAltText;
 45  0
         }
 46  
 
 47  
         public String getExtraButtonParams() {
 48  0
                 return extraButtonParams;
 49  
         }
 50  
 
 51  
         public void setExtraButtonParams(String extraButtonParams) {
 52  0
                 this.extraButtonParams = extraButtonParams;
 53  0
         }
 54  
 
 55  
         public String getExtraButtonProperty() {
 56  0
                 return extraButtonProperty;
 57  
         }
 58  
 
 59  
         public void setExtraButtonProperty(String extraButtonProperty) {
 60  0
                 this.extraButtonProperty = extraButtonProperty;
 61  0
         }
 62  
 
 63  
         public String getExtraButtonSource() {
 64  0
                 return extraButtonSource;
 65  
         }
 66  
             
 67  
         public String getExtraButtonOnclick() {
 68  0
             return this.extraButtonOnclick;
 69  
         }
 70  
          
 71  
         public void setExtraButtonOnclick(String extraButtonOnclick) {
 72  0
             this.extraButtonOnclick = extraButtonOnclick;
 73  0
         }
 74  
 
 75  
         public void setExtraButtonSource(String extraButtonSource) {
 76  0
                 if (StringUtils.isNotBlank(extraButtonSource)) {
 77  0
                         this.extraButtonSource = extraButtonSource
 78  
                                         .replace(
 79  
                                                         "${kr.externalizable.images.url}",
 80  
                                                         KNSServiceLocator
 81  
                                                                         .getKualiConfigurationService()
 82  
                                                                         .getPropertyString(
 83  
                                                                                         KNSConstants.EXTERNALIZABLE_IMAGES_URL_KEY))
 84  
                                         .replace(
 85  
                                                         "${externalizable.images.url}",
 86  
                                                         KNSServiceLocator
 87  
                                                                         .getKualiConfigurationService()
 88  
                                                                         .getPropertyString(
 89  
                                                                                         KNSConstants.APPLICATION_EXTERNALIZABLE_IMAGES_URL_KEY));
 90  
                 }
 91  0
         }
 92  
 
 93  
 }