Source code: com/dghda/module/BaseModule.java
1 /* Copyright (C) 2001 Duane Griffin <duanegriffin@users.sourceforge.net>
2 This file is part of Kent.
3
4 Kent is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 Kent is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13
14 You should have received a copy of the GNU General Public
15 License along with Kent; see the file COPYING. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA.
18 */
19
20 package com.dghda.module;
21
22 import java.io.*;
23
24 /**
25 A base implementation of a module.
26 */
27 abstract public class BaseModule implements Module {
28
29 /**
30 Create a new module.
31 @param id The unique ID of the module.
32 @param shortName The name of the module.
33 @param description A description of the module.
34 @param version The module's version information.
35 */
36 public BaseModule (String id, String shortName, String description, Module.ModuleVersion version) {
37 m_ID = id;
38 m_ShortName = shortName;
39 m_Description = description;
40 m_Version = version;
41 }
42
43 /** Returns the module's ID. */
44 public String getID() {
45 return m_ID;
46 }
47
48 /**
49 Returns the name of the module.
50 This name should be suitable for display.
51 */
52 public String getName() {
53 return m_ShortName;
54 }
55
56 /** Returns version information about the module. */
57 public Module.ModuleVersion getVersion() {
58 return m_Version;
59 }
60
61 /** Returns a description of the module. */
62 public String getDescription() {
63 return m_Description;
64 }
65
66 private String m_ID;
67 private String m_ShortName;
68 private String m_Description;
69 private Module.ModuleVersion m_Version;
70 }