KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > core > www > TestWebModule3


1 /*
2  * Copyright (c) 2006 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: TestWebModule3.java,v 1.5 2007/01/07 06:14:26 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.core.www;
23
24
25 /**
26  * Test class representing portal web module 3.
27  *
28  * @version $Id: TestWebModule3.java,v 1.5 2007/01/07 06:14:26 bastafidli Exp $
29  * @author Julian Legeny
30  * @code.reviewer Miro Halas
31  * @code.reviewed 1.3 2006/04/20 00:16:49 jlegeny
32  */

33 public class TestWebModule3 implements WebModule
34 {
35    // Configuration parameters /////////////////////////////////////////////////
36

37    /**
38     * String unique name of the module. This string will be used as identifier
39     * for the module within the html code.
40     */

41    public static final String JavaDoc TEST3_WEB_MODULE_NAME = "module3";
42
43    /**
44     * String unique tab name of the module. This string will be displayed
45     * on the tab with modules.
46     */

47    public static final String JavaDoc TEST3_WEB_MODULE_TABNAME = "Module 3";
48
49    /**
50     * String tooltip for module. This string will be displayed as tooltip
51     * on the GUI.
52     */

53    public static final String JavaDoc TEST3_WEB_MODULE_TOOLTIP = "Test module 3";
54
55    // Constants ////////////////////////////////////////////////////////////////
56

57    /**
58     * Lock used in synchronized sections.
59     */

60    private static final String JavaDoc IMPL_LOCK = "IMPL_LOCK";
61
62    // Attributes ////////////////////////////////////////////////////////////
63

64    /**
65     * Module URL that will be set from context parameter.
66     */

67    private static String JavaDoc s_moduleURL = null;
68
69    // Cached values ////////////////////////////////////////////////////////////
70

71    /**
72     * Reference to the instance actually in use.
73     */

74    private static WebModule s_defaultInstance;
75
76    // Public methods ///////////////////////////////////////////////////////////
77

78    /**
79     * Get the default instance of the security bundle.
80     *
81     * @return SecurityDefinitionBundle - default instance
82     */

83    public static WebModule getInstance()
84    {
85       if (s_defaultInstance == null)
86       {
87          synchronized (IMPL_LOCK)
88          {
89             if (s_defaultInstance == null)
90             {
91                s_defaultInstance = new TestWebModule3();
92             }
93          }
94          
95       }
96       return s_defaultInstance;
97    }
98
99    /**
100     * {@inheritDoc}
101     */

102    public String JavaDoc getName()
103    {
104       return TEST3_WEB_MODULE_NAME;
105    }
106
107    /**
108     * {@inheritDoc}
109     */

110    public String JavaDoc getTabName()
111    {
112       return TEST3_WEB_MODULE_TABNAME;
113    }
114
115    /**
116     * {@inheritDoc}
117     */

118    public String JavaDoc getTooltip()
119    {
120       return TEST3_WEB_MODULE_TOOLTIP;
121    }
122
123    /**
124     * {@inheritDoc}
125     */

126    public String JavaDoc getURL()
127    {
128       return s_moduleURL;
129    }
130
131    /**
132     * {@inheritDoc}
133     */

134    public void setURL(
135       String JavaDoc strURL
136    )
137    {
138       s_moduleURL = strURL;
139    }
140 }
141
Popular Tags