View Javadoc

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  
18  package org.apache.jetspeed.om.registry.base;
19  
20  // Jetspeed imports
21  import org.apache.jetspeed.om.registry.SecurityAllow;
22  
23  /***
24   * Interface for manipulatin the Security Allow on the registry entries
25   * 
26   * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
27   * @version $Id: BaseSecurityAllow.java,v 1.5 2004/02/23 03:08:26 jford Exp $
28   */
29  public class BaseSecurityAllow implements SecurityAllow, java.io.Serializable
30  {
31      /*** Holds value of property role. */
32      private String role;
33  
34  	/*** Holds value of property group. */
35  	private String group;
36      
37      /*** Holds value of property user. */
38      private String user;
39      
40      /*** Holds value of property owner. */
41      private boolean owner = false;
42      
43      /*** Creates new BaseSecurityAllow */
44      public BaseSecurityAllow()
45      {
46      }
47  
48      /***
49       * Create a new BaseSecurityAllow that sets the owner property
50       *
51       * @param owner Set the owner property
52       */
53      public BaseSecurityAllow(boolean owner)
54      {
55          this.owner = owner;
56      }
57      
58      /*** Getter for property role.
59       * @return Value of property role.
60       */
61      public String getRole()
62      {
63          return role;
64      }
65      
66      /*** Setter for property role.
67       * @param role New value of property role.
68       */
69      public void setRole(String role)
70      {
71          this.role = role;
72      }
73  
74  	/*** Getter for property group.
75  	 * @return Value of property group.
76  	 */
77  	public String getGroup()
78  	{
79  		return group;
80  	}
81      
82  	/*** Setter for property group.
83  	 * @param role New value of property group.
84  	 */
85  	public void setGroup(String group)
86  	{
87  		this.group = group;
88  	}
89      
90      /*** Getter for property user.
91       * @return Value of property user.
92       */
93      public String getUser()
94      {
95          return user;
96      }
97      
98      /*** Setter for property user.
99       * @param user New value of property user.
100      */
101     public void setUser(String user)
102     {
103         this.user = user;
104     }
105     
106     /*** Getter for property owner.
107      * @return Value of property owner.
108      */
109     public boolean isOwner()
110     {
111         return this.owner;
112     }
113     
114     /*** Setter for property owner.
115      * @param owner New value of property owner.
116      */
117     public void setOwner(boolean owner)
118     {
119         this.owner = owner;
120     }
121     
122 }