01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.core.web.ui;
17:
18: import org.apache.commons.lang.StringUtils;
19: import org.kuali.RiceConstants;
20: import org.kuali.rice.KNSServiceLocator;
21:
22: /**
23: * Represents an extra button that may appear on the lookups or bottom of a
24: * document page.
25: */
26: public class ExtraButton {
27: private String extraButtonSource = "";
28:
29: private String extraButtonAltText = "";
30:
31: private String extraButtonParams = "";
32:
33: private String extraButtonProperty = "";
34:
35: public String getExtraButtonAltText() {
36: return extraButtonAltText;
37: }
38:
39: public void setExtraButtonAltText(String extraButtonAltText) {
40: this .extraButtonAltText = extraButtonAltText;
41: }
42:
43: public String getExtraButtonParams() {
44: return extraButtonParams;
45: }
46:
47: public void setExtraButtonParams(String extraButtonParams) {
48: this .extraButtonParams = extraButtonParams;
49: }
50:
51: public String getExtraButtonProperty() {
52: return extraButtonProperty;
53: }
54:
55: public void setExtraButtonProperty(String extraButtonProperty) {
56: this .extraButtonProperty = extraButtonProperty;
57: }
58:
59: public String getExtraButtonSource() {
60: return extraButtonSource;
61: }
62:
63: public void setExtraButtonSource(String extraButtonSource) {
64: if (StringUtils.isNotBlank(extraButtonSource)) {
65: this .extraButtonSource = extraButtonSource
66: .replace(
67: "${kr.externalizable.images.url}",
68: KNSServiceLocator
69: .getKualiConfigurationService()
70: .getPropertyString(
71: RiceConstants.EXTERNALIZABLE_IMAGES_URL_KEY))
72: .replace(
73: "${externalizable.images.url}",
74: KNSServiceLocator
75: .getKualiConfigurationService()
76: .getPropertyString(
77: RiceConstants.APPLICATION_EXTERNALIZABLE_IMAGES_URL_KEY));
78: }
79: }
80:
81: }
|