KickJava   Java API By Example, From Geeks To Geeks.

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


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.3 $
16  */

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