KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > metadata > PermissionMetaData


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.core.metadata;
10
11 import java.util.Set JavaDoc;
12
13 /**
14  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
15  * @version $Revision: 1.2 $
16  */

17 public class PermissionMetaData
18 {
19
20    private String JavaDoc name;
21    private Set JavaDoc roleNames;
22
23    public PermissionMetaData(String JavaDoc name)
24    {
25       this.name = name;
26    }
27    
28    public String JavaDoc getName()
29    {
30       return name;
31    }
32    
33    public Set JavaDoc getRoleNames()
34    {
35       return roleNames;
36    }
37    
38    public void setRoleNames(Set JavaDoc roleNames)
39    {
40       this.roleNames = roleNames;
41    }
42
43    public boolean equals(Object JavaDoc obj)
44    {
45       if (obj == this)
46       {
47          return true;
48       }
49       if (obj instanceof PermissionMetaData)
50       {
51          PermissionMetaData other = (PermissionMetaData)obj;
52          return name.equals(other.name);
53       }
54       return false;
55    }
56    
57    public int hashCode()
58    {
59       return name.hashCode();
60    }
61 }
62
Popular Tags