View Javadoc
1   /**
2    * Copyright 2005-2016 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 org.apache.commons.lang.StringUtils;
19  import org.kuali.rice.core.api.CoreApiServiceLocator;
20  import org.kuali.rice.krad.util.KRADConstants;
21  
22  import java.io.Serializable;
23  
24  /**
25   * Represents an extra button that may appear on the lookups or bottom of a
26   * document page.
27   *
28   * @deprecated KNS Struts deprecated, use KRAD and the Spring MVC framework.
29   */
30  @Deprecated
31  public class ExtraButton implements Serializable {
32  	private String extraButtonSource = "";
33  
34  	private String extraButtonAltText = "";
35  
36  	private String extraButtonParams = "";
37  
38  	private String extraButtonProperty = "";
39  
40  	private String extraButtonOnclick = "";
41  	 
42  	public String getExtraButtonAltText() {
43  		return extraButtonAltText;
44  	}
45  
46  	public void setExtraButtonAltText(String extraButtonAltText) {
47  		this.extraButtonAltText = extraButtonAltText;
48  	}
49  
50  	public String getExtraButtonParams() {
51  		return extraButtonParams;
52  	}
53  
54  	public void setExtraButtonParams(String extraButtonParams) {
55  		this.extraButtonParams = extraButtonParams;
56  	}
57  
58  	public String getExtraButtonProperty() {
59  		return extraButtonProperty;
60  	}
61  
62  	public void setExtraButtonProperty(String extraButtonProperty) {
63  		this.extraButtonProperty = extraButtonProperty;
64  	}
65  
66  	public String getExtraButtonSource() {
67  		return extraButtonSource;
68  	}
69  	    
70  	public String getExtraButtonOnclick() {
71  	    return this.extraButtonOnclick;
72  	}
73  	 
74  	public void setExtraButtonOnclick(String extraButtonOnclick) {
75  	    this.extraButtonOnclick = extraButtonOnclick;
76  	}
77  
78  	public void setExtraButtonSource(String extraButtonSource) {
79  		if (StringUtils.isNotBlank(extraButtonSource)) {
80  			this.extraButtonSource = extraButtonSource
81  					.replace("${kr.externalizable.images.url}",
82  							CoreApiServiceLocator
83  									.getKualiConfigurationService()
84  									.getPropertyValueAsString(KRADConstants.EXTERNALIZABLE_IMAGES_URL_KEY))
85  					.replace(
86  							"${externalizable.images.url}",
87  							CoreApiServiceLocator
88  									.getKualiConfigurationService()
89  									.getPropertyValueAsString(KRADConstants.APPLICATION_EXTERNALIZABLE_IMAGES_URL_KEY));
90  		}
91  	}
92  
93  }