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 org.apache.pluto.om.common.SecurityRole;
20: import org.apache.pluto.util.StringUtils;
21:
22: /**
23: *
24: *
25: * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
26: *
27: * @version CVS $Id: SecurityRoleImpl.java 433543 2006-08-22 06:22:54Z crossley $
28: */
29: public class SecurityRoleImpl implements SecurityRole,
30: java.io.Serializable {
31:
32: private String description;
33: private String roleName;
34:
35: public SecurityRoleImpl() {
36: // nothing to do
37: }
38:
39: // SecurityRole implementation.
40:
41: public String getDescription() {
42: return description;
43: }
44:
45: public String getRoleName() {
46: return roleName;
47: }
48:
49: // additional methods.
50:
51: public void setDescription(String description) {
52: this .description = description;
53: }
54:
55: public void setRoleName(String roleName) {
56: this .roleName = roleName;
57: }
58:
59: public String toString() {
60: return toString(0);
61: }
62:
63: public String toString(int indent) {
64: StringBuffer buffer = new StringBuffer(50);
65: StringUtils.newLine(buffer, indent);
66: buffer.append(getClass().toString());
67: buffer.append(": role-name='");
68: buffer.append(roleName);
69: buffer.append("', description='");
70: buffer.append(description);
71: buffer.append("'");
72: return buffer.toString();
73: }
74:
75: }
|