View Javadoc

1   /*
2    * Copyright 2003,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  /* 
17  
18   */
19  
20  
21  package org.apache.pluto.portalImpl.om.common.impl;
22  
23  import org.apache.pluto.om.common.SecurityRole;
24  import org.apache.pluto.util.StringUtils;
25  
26  public class SecurityRoleImpl implements SecurityRole,  java.io.Serializable {
27  
28      private String description;
29      private String roleName;
30  
31      public SecurityRoleImpl()
32      {
33      }
34  
35      // SecurityRole implementation.
36  
37      public String getDescription()
38      {
39          return description;
40      }
41  
42      public String getRoleName()
43      {
44          return roleName;
45      }
46  
47      // additional methods.
48  
49      public void setDescription(String description)
50      {
51          this.description = description;
52      }
53  
54      public void setRoleName(String roleName)
55      {
56          this.roleName = roleName;
57      }
58  
59      public String toString()
60      {
61          return toString(0);
62      }
63  
64      public String toString(int indent)
65      {
66          StringBuffer buffer = new StringBuffer(50);
67          StringUtils.newLine(buffer,indent);
68          buffer.append(getClass().toString());
69          buffer.append(": role-name='");
70          buffer.append(roleName);
71          buffer.append("', description='");
72          buffer.append(description);
73          buffer.append("'");
74          return buffer.toString();
75      }
76  
77  }