View Javadoc

1   /**
2    * Copyright 2005-2011 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.krad.service.KRADServiceLocator;
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
29  public class ExtraButton implements Serializable {
30  	private String extraButtonSource = "";
31  
32  	private String extraButtonAltText = "";
33  
34  	private String extraButtonParams = "";
35  
36  	private String extraButtonProperty = "";
37  
38  	private String extraButtonOnclick = "";
39  	 
40  	public String getExtraButtonAltText() {
41  		return extraButtonAltText;
42  	}
43  
44  	public void setExtraButtonAltText(String extraButtonAltText) {
45  		this.extraButtonAltText = extraButtonAltText;
46  	}
47  
48  	public String getExtraButtonParams() {
49  		return extraButtonParams;
50  	}
51  
52  	public void setExtraButtonParams(String extraButtonParams) {
53  		this.extraButtonParams = extraButtonParams;
54  	}
55  
56  	public String getExtraButtonProperty() {
57  		return extraButtonProperty;
58  	}
59  
60  	public void setExtraButtonProperty(String extraButtonProperty) {
61  		this.extraButtonProperty = extraButtonProperty;
62  	}
63  
64  	public String getExtraButtonSource() {
65  		return extraButtonSource;
66  	}
67  	    
68  	public String getExtraButtonOnclick() {
69  	    return this.extraButtonOnclick;
70  	}
71  	 
72  	public void setExtraButtonOnclick(String extraButtonOnclick) {
73  	    this.extraButtonOnclick = extraButtonOnclick;
74  	}
75  
76  	public void setExtraButtonSource(String extraButtonSource) {
77  		if (StringUtils.isNotBlank(extraButtonSource)) {
78  			this.extraButtonSource = extraButtonSource
79  					.replace(
80  							"${kr.externalizable.images.url}",
81  							KRADServiceLocator
82  									.getKualiConfigurationService()
83  									.getPropertyValueAsString(KRADConstants.EXTERNALIZABLE_IMAGES_URL_KEY))
84  					.replace(
85  							"${externalizable.images.url}",
86  							KRADServiceLocator
87  									.getKualiConfigurationService()
88  									.getPropertyValueAsString(KRADConstants.APPLICATION_EXTERNALIZABLE_IMAGES_URL_KEY));
89  		}
90  	}
91  
92  }