KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > om > security > BaseJetspeedPermission


1 /*
2  * Copyright 2000-2001,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 package org.apache.jetspeed.om.security;
18
19 /**
20  * A Jetspeed basic Group.
21  *
22  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
23  * @version $Id: BaseJetspeedPermission.java,v 1.3 2004/02/23 03:14:12 jford Exp $
24  */

25 public class BaseJetspeedPermission implements Permission
26 {
27     protected String JavaDoc name;
28     protected String JavaDoc id = null;
29     protected boolean isNew = true;
30
31     public BaseJetspeedPermission(String JavaDoc id)
32     {
33         this.id = id;
34         isNew = true;
35     }
36
37     public BaseJetspeedPermission()
38     {
39         isNew = true;
40     }
41
42     /**
43      * Get the name of the Permission
44      *
45      * @return the name of the permission.
46      */

47     public String JavaDoc getName()
48     {
49         return name;
50     }
51  
52     /**
53      * Set the name of the Permission
54      *
55      * @param permissionName the name of the Permission.
56      */

57     public void setName(String JavaDoc permissionName)
58     {
59         name = permissionName;
60     }
61
62     /**
63      * Get the id of the Permission
64      *
65      * @return the id of the permission.
66      */

67     public String JavaDoc getId()
68     {
69         return id;
70     }
71
72     /**
73      * Set the id of the Permission
74      *
75      * @param id the new id for the permission
76      */

77     public void setId(String JavaDoc id)
78     {
79         if (this.id == null)
80         {
81             this.id = id;
82         }
83     }
84
85     public boolean isNew()
86     {
87         return isNew;
88     }
89
90     void setNew(boolean isNew)
91     {
92         this.isNew = isNew;
93     }
94
95 }
96
97
98
99
100
Popular Tags