01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.container.om.common;
07:
08: import java.io.Serializable;
09: import java.util.Locale;
10:
11: import org.apache.pluto.om.common.Description;
12: import org.apache.pluto.om.common.DescriptionSet;
13: import org.apache.pluto.om.common.SecurityRoleRef;
14: import org.apache.pluto.om.common.SecurityRoleRefCtrl;
15:
16: /**
17: * Implementation of Apache Pluto object model.
18: * @author Ken Weiner, kweiner@unicon.net
19: * @version $Revision: 34757 $
20: */
21: public class SecurityRoleRefImpl implements SecurityRoleRef,
22: SecurityRoleRefCtrl, Serializable {
23:
24: private String roleName;
25: private String roleLink;
26: private DescriptionSet descriptions;
27:
28: public SecurityRoleRefImpl() {
29: this .descriptions = new DescriptionSetImpl();
30: }
31:
32: // SecurityRoleRef methods
33:
34: public String getRoleName() {
35: return roleName;
36: }
37:
38: public String getRoleLink() {
39: return roleLink;
40: }
41:
42: public Description getDescription(Locale locale) {
43: return descriptions.get(locale);
44: }
45:
46: // SecurityRoleRefCtrl methods
47:
48: public void setRoleName(String roleName) {
49: this .roleName = roleName;
50: }
51:
52: public void setRoleLink(String roleLink) {
53: this .roleLink = roleLink;
54: }
55:
56: public void setDescription(String description) {
57: ((DescriptionSetImpl) descriptions).add(description, Locale
58: .getDefault());
59: }
60:
61: // Additional methods
62:
63: public void setDescriptions(DescriptionSet descriptions) {
64: this .descriptions = descriptions;
65: }
66:
67: public DescriptionSet getDescriptions() {
68: return this.descriptions;
69: }
70:
71: }
|