KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > navigation > Favorite


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.navigation;
21
22 /**
23  * Implementations of this interface point to a particular resource of a
24  * particular type. These will then be made available on a users <i>Favorites</i>
25  * page.
26  * <p>
27  * Favorites will be one of two types, a <i>User Favorite</i> or a <i>Global
28  * Favorite</i>.
29  * <p>
30  * A user may configure their own <i>User Favorites</i> by clicking on the
31  * appropriate icon in a resource listing page such as <i>Web Forwards</i> or
32  * <i>Network Places</i>.
33  * <p>
34  * An administrator may configure a <i>Global Favorite</i> at the time of
35  * creating the resource. This will be accessable to all users that have the
36  * correct <i>Policy</i>.
37  *
38  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
39  */

40 public interface Favorite {
41
42     /**
43      * Get the favorite id
44      *
45      * @return id
46      */

47     public int getId();
48
49     /**
50      * Get the username if this is a <i>User Favorite</i>
51      * or <code>null</code> if it is a <i>Global Favorite</i>
52      *
53      * @return username
54      */

55     public String JavaDoc getUsername();
56
57     /**
58      * Get the type of favorite. This maps directly to the <i>Resource Type</i>
59      * id ({@link com.sslexplorer.policyframework.ResourceType#getResourceTypeId()})
60      * of the {@link com.sslexplorer.policyframework.Resource} the favorite
61      * points to.
62      *
63      * @return favorite type
64      */

65     public int getType();
66
67     /**
68      * Get the ID of the {@link com.sslexplorer.policyframework.Resource} that
69      * the favorite points to.
70      *
71      * @return favorite key
72      */

73     public int getFavoriteKey();
74 }
75
Popular Tags