01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.portal.pluto.om.common;
18:
19: import java.util.Collection;
20: import java.util.Locale;
21:
22: import org.apache.pluto.om.common.Description;
23: import org.apache.pluto.om.common.DescriptionSet;
24: import org.apache.pluto.om.common.SecurityRoleRef;
25:
26: /**
27: *
28: *
29: * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
30: *
31: * @version CVS $Id: SecurityRoleRefImpl.java 433543 2006-08-22 06:22:54Z crossley $
32: */
33: public class SecurityRoleRefImpl implements SecurityRoleRef,
34: java.io.Serializable {
35:
36: private String roleName;
37: private String roleLink;
38: private DescriptionSet descriptions;
39:
40: public SecurityRoleRefImpl() {
41: descriptions = new DescriptionSetImpl();
42: }
43:
44: // SecurityRoleRef implementation.
45:
46: public String getRoleName() {
47: return roleName;
48: }
49:
50: public String getRoleLink() {
51: return roleLink;
52: }
53:
54: /* (non-Javadoc)
55: * @see org.apache.pluto.om.common.SecurityRoleRef#getDescription(Locale)
56: */
57: public Description getDescription(Locale locale) {
58: return descriptions.get(locale);
59: }
60:
61: public void setRoleName(String roleName) {
62: this .roleName = roleName;
63: }
64:
65: // additional methods.
66:
67: public void setRoleLink(String roleLink) {
68: this .roleLink = roleLink;
69: }
70:
71: public DescriptionSet getDescriptionSet() {
72: return descriptions;
73: }
74:
75: public void setDescriptionSet(DescriptionSet descriptions) {
76: this .descriptions = descriptions;
77: }
78:
79: public Collection getCastorDescriptions() {
80: return (DescriptionSetImpl) descriptions;
81: }
82:
83: public void setCastorDescriptions(DescriptionSet castorDescriptions) {
84: this.descriptions = castorDescriptions;
85: }
86:
87: }
|