1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.security;
18
19 /***
20 * A Jetspeed basic Role.
21 *
22 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
23 * @version $Id: BaseJetspeedRole.java,v 1.3 2004/02/23 03:14:12 jford Exp $
24 */
25 public class BaseJetspeedRole implements Role
26 {
27 protected String name;
28 protected String id = null;
29
30 protected boolean isNew = true;
31
32 public BaseJetspeedRole(String id)
33 {
34 this.id = id;
35 isNew = true;
36 }
37
38 public BaseJetspeedRole()
39 {
40 isNew = true;
41 }
42
43 /***
44 * Get the name of the Role
45 *
46 * @return the name of the role.
47 */
48 public String getName()
49 {
50 return name;
51 }
52
53 /***
54 * Set the name of the Role
55 *
56 * @param roleName the name of the Role.
57 */
58 public void setName(String roleName)
59 {
60 name = roleName;
61 }
62
63 /***
64 * Get the id of the Role
65 *
66 * @return the id of the role.
67 */
68 public String getId()
69 {
70 return id;
71 }
72
73 /***
74 * Set the id of the Role
75 *
76 * @param id the new id for the role
77 */
78 public void setId(String id)
79 {
80 if (this.id == null)
81 {
82 this.id = id;
83 }
84 }
85
86 public boolean isNew()
87 {
88 return isNew;
89 }
90
91 void setNew(boolean isNew)
92 {
93 this.isNew = isNew;
94 }
95
96 }
97
98