01: /*
02: * %W% %E%
03: *
04: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package com.sun.jump.module.installer;
28:
29: import com.sun.jump.common.JUMPAppModel;
30: import com.sun.jump.module.JUMPModuleFactory;
31:
32: /**
33: * <code>JUMPInstallerModuleFactory</code> is a factory for
34: * <code>JUMPInstallerModule</code>
35: */
36: public abstract class JUMPInstallerModuleFactory extends
37: JUMPModuleFactory {
38: private static JUMPInstallerModuleFactory INSTANCE = null;
39:
40: public static JUMPInstallerModuleFactory getInstance() {
41: return INSTANCE;
42: }
43:
44: /**
45: * Creates a new instance of JUMPInstallerModuleFactory
46: */
47: protected JUMPInstallerModuleFactory() {
48: synchronized (JUMPInstallerModuleFactory.class) {
49: if (INSTANCE == null) {
50: INSTANCE = this ;
51: }
52: }
53: }
54:
55: /**
56: * Returns a <code>JUMPInstallerModule</code> for the app model specified
57: *
58: * @param appModel the application model for which an appropriate
59: * installer module should be returned.
60: */
61: public abstract JUMPInstallerModule getModule(JUMPAppModel appModel);
62:
63: /**
64: * Returns a <code>JUMPInstallerModule</code> for the mime type
65: * specified.
66: *
67: * @param mimeType mime type for which an appropriate
68: * installer module should be returned.
69: *
70: * @return This can return null if no installer module is available
71: *
72: */
73: public abstract JUMPInstallerModule getModule(String mimeType);
74:
75: /**
76: * @return a list of all registered installers in the system for all types
77: * of content.
78: */
79: public abstract JUMPInstallerModule[] getAllInstallers();
80: }
|