001: // The contents of this file are subject to the Mozilla Public License Version
002: // 1.1
003: //(the "License"); you may not use this file except in compliance with the
004: //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
005: //
006: //Software distributed under the License is distributed on an "AS IS" basis,
007: //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
008: //for the specific language governing rights and
009: //limitations under the License.
010: //
011: //The Original Code is "The Columba Project"
012: //
013: //The Initial Developers of the Original Code are Frederik Dietz and Timo
014: // Stich.
015: //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
016: //
017: //All Rights Reserved.
018: package org.columba.api.plugin;
019:
020: import java.io.File;
021: import java.util.Enumeration;
022: import java.util.Vector;
023:
024: public class PluginMetadata {
025:
026: private String id;
027:
028: private String name;
029:
030: private String description;
031:
032: private String version;
033:
034: private String category;
035:
036: private boolean enabled;
037:
038: private Vector extensions = new Vector();
039:
040: private File directory;
041:
042: public PluginMetadata(String id, String name, boolean enabled) {
043: this .id = id;
044: this .name = name;
045: this .enabled = enabled;
046: }
047:
048: public PluginMetadata(String id, String name, String description,
049: String version, String category, boolean enabled) {
050: this (id, name, enabled);
051:
052: this .description = description;
053: this .version = version;
054: this .category = category;
055:
056: }
057:
058: public void addExtension(ExtensionMetadata metadata) {
059: extensions.add(metadata);
060: }
061:
062: public Enumeration enumExtensions() {
063: return extensions.elements();
064: }
065:
066: /**
067: * @return Returns the category.
068: */
069: public String getCategory() {
070: return category;
071: }
072:
073: /**
074: * @return Returns the description.
075: */
076: public String getDescription() {
077: return description;
078: }
079:
080: /**
081: * @return Returns the directory.
082: */
083: public File getDirectory() {
084: return directory;
085: }
086:
087: /**
088: * @return Returns the enabled.
089: */
090: public boolean isEnabled() {
091: return enabled;
092: }
093:
094: /**
095: * @return Returns the extensions.
096: */
097: public Vector getExtensions() {
098: return extensions;
099: }
100:
101: /**
102: * @return Returns the id.
103: */
104: public String getId() {
105: return id;
106: }
107:
108: /**
109: * @return Returns the name.
110: */
111: public String getName() {
112: return name;
113: }
114:
115: /**
116: * @return Returns the version.
117: */
118: public String getVersion() {
119: return version;
120: }
121:
122: /**
123: * @param enabled
124: * The enabled to set.
125: */
126: public void setEnabled(boolean enabled) {
127: this .enabled = enabled;
128: }
129:
130: /**
131: * @param directory
132: * The directory to set.
133: */
134: public void setDirectory(File directory) {
135: this.directory = directory;
136: }
137:
138: }
|