KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > pluto > om > common > SecurityRoleImpl


1 /*
2  * Copyright 2004,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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.apache.cocoon.portal.pluto.om.common;
17
18 import org.apache.pluto.om.common.SecurityRole;
19 import org.apache.pluto.util.StringUtils;
20
21 /**
22  *
23  *
24  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
25  *
26  * @version CVS $Id: SecurityRoleImpl.java 123407 2004-12-27 13:51:59Z cziegeler $
27  */

28 public class SecurityRoleImpl implements SecurityRole, java.io.Serializable JavaDoc {
29
30     private String JavaDoc description;
31     private String JavaDoc roleName;
32
33     public SecurityRoleImpl() {
34         // nothing to do
35
}
36
37     // SecurityRole implementation.
38

39     public String JavaDoc getDescription() {
40         return description;
41     }
42
43     public String JavaDoc getRoleName() {
44         return roleName;
45     }
46
47     // additional methods.
48

49     public void setDescription(String JavaDoc description) {
50         this.description = description;
51     }
52
53     public void setRoleName(String JavaDoc roleName) {
54         this.roleName = roleName;
55     }
56
57     public String JavaDoc toString() {
58         return toString(0);
59     }
60
61     public String JavaDoc toString(int indent) {
62         StringBuffer JavaDoc buffer = new StringBuffer JavaDoc(50);
63         StringUtils.newLine(buffer,indent);
64         buffer.append(getClass().toString());
65         buffer.append(": role-name='");
66         buffer.append(roleName);
67         buffer.append("', description='");
68         buffer.append(description);
69         buffer.append("'");
70         return buffer.toString();
71     }
72
73 }
74
Popular Tags