KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > sample > SampleItem


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.sample;
21
22 import java.util.List JavaDoc;
23
24 import javax.servlet.http.HttpServletRequest JavaDoc;
25
26 import com.sslexplorer.navigation.AbstractFavoriteItem;
27
28 /**
29  * <p>
30  * The SampleItem which is used for sorting and viewing.
31  *
32  * @author James D Robinson <a HREF="mailto:james@3sp.com">&lt;james@3sp.com&gt;</a>
33  *
34  */

35 public class SampleItem extends AbstractFavoriteItem {
36
37     /**
38      * @param sample The sample object.
39      * @param policies The List of policies.
40      */

41     public SampleItem(Sample sample, List JavaDoc policies) {
42         super(sample, policies);
43     }
44
45     /*
46      * (non-Javadoc)
47      *
48      * @see com.sslexplorer.navigation.FavoriteItem#getId()
49      */

50     public String JavaDoc getFavoriteId() {
51         return String.valueOf(((Sample) this.getResource()).getResourceId());
52     }
53
54     /*
55      * (non-Javadoc)
56      *
57      * @see com.sslexplorer.navigation.FavoriteItem#getOnClick()
58      */

59     public String JavaDoc getOnClick() {
60         return "NO ON CLICK";
61     }
62
63     /*
64      * (non-Javadoc)
65      *
66      * @see com.sslexplorer.navigation.FavoriteItem#getLink()
67      */

68     public String JavaDoc getLink(String JavaDoc referer) {
69         return "NO CLICK";
70     }
71
72     /*
73      * (non-Javadoc)
74      *
75      * @see com.sslexplorer.navigation.FavoriteItem#getTarget()
76      */

77     public String JavaDoc getTarget() {
78         return "_self";
79     }
80
81     /* (non-Javadoc)
82      * @see com.sslexplorer.navigation.AbstractFavoriteItem#getFavoriteName()
83      */

84     public String JavaDoc getFavoriteName() {
85         return getResource().getResourceName();
86     }
87
88     /* (non-Javadoc)
89      * @see com.sslexplorer.navigation.AbstractFavoriteItem#getFavoriteSubType()
90      */

91     public String JavaDoc getFavoriteSubType() {
92         return "";
93     }
94
95     /* (non-Javadoc)
96      * @see com.sslexplorer.navigation.AbstractFavoriteItem#getSmallIconPath(javax.servlet.http.HttpServletRequest)
97      */

98     public String JavaDoc getSmallIconPath(HttpServletRequest JavaDoc request) {
99         return null;
100     }
101
102     /* (non-Javadoc)
103      * @see com.sslexplorer.navigation.AbstractFavoriteItem#getLargeIconPath(javax.servlet.http.HttpServletRequest)
104      */

105     public String JavaDoc getLargeIconPath(HttpServletRequest JavaDoc request) {
106         return null;
107     }
108 }
109
Popular Tags