1 /**
2 * Copyright 2005-2012 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.krad.uif.element;
17
18 import org.kuali.rice.krad.uif.component.Component;
19 import org.kuali.rice.krad.uif.widget.LightBox;
20
21 import java.util.List;
22
23 /**
24 * Content element that renders a link
25 *
26 * @author Kuali Rice Team (rice.collab@kuali.org)
27 */
28 public class Link extends ContentElementBase {
29 private static final long serialVersionUID = 8989868231938336068L;
30
31 private String linkText;
32 private String target;
33 private String href;
34
35 private LightBox lightBox;
36
37 public Link() {
38 super();
39 }
40
41 /**
42 * @see org.kuali.rice.krad.uif.component.ComponentBase#getComponentsForLifecycle()
43 */
44 @Override
45 public List<Component> getComponentsForLifecycle() {
46 List<Component> components = super.getComponentsForLifecycle();
47
48 components.add(lightBox);
49
50 return components;
51 }
52
53 /**
54 * Returns the label of the link
55 *
56 * @return The link label
57 */
58 public String getLinkText() {
59 return linkText;
60 }
61
62 /**
63 * Setter for the link label
64 *
65 * @param linkText
66 */
67 public void setLinkText(String linkText) {
68 this.linkText = linkText;
69 }
70
71 /**
72 * Returns the target that will be used to specify where to open the href
73 *
74 * @return The target
75 */
76 public String getTarget() {
77 return target;
78 }
79
80 /**
81 * Setter for the link target
82 *
83 * @param target
84 */
85 public void setTarget(String target) {
86 this.target = target;
87 }
88
89 /**
90 * Returns the href text
91 *
92 * @return The href text
93 */
94 public String getHref() {
95 return href;
96 }
97
98 /**
99 * Setter for the hrefText
100 *
101 * @param href
102 */
103 public void setHref(String href) {
104 this.href = href;
105 }
106
107 /**
108 * Returns the <code>LightBox</code> used to open the link in
109 *
110 * @return The <code>LightBox</code>
111 */
112 public LightBox getLightBox() {
113 return lightBox;
114 }
115
116 /**
117 * Setter for the lightBox
118 *
119 * @param lightBox
120 */
121 public void setLightBox(LightBox lightBox) {
122 this.lightBox = lightBox;
123 }
124
125 }