89 providers = new Vector<>();
90 }
91 providers.add(eip);
92 }
93
94 /**
95 * <p>
96 * Unregister a previously installed installation provider
97 * </p>
98 */
99 public synchronized static void removeExtensionInstallationProvider
100 (ExtensionInstallationProvider eip)
101 {
102 providers.remove(eip);
103 }
104
105 /**
106 * <p>
107 * Checks the dependencies of the jar file on installed extension.
108 * </p>
109 * @param jarFile containing the attriutes declaring the dependencies
110 */
111 public static boolean checkExtensionsDependencies(JarFile jar)
112 {
113 if (providers == null) {
114 // no need to bother, nobody is registered to install missing
115 // extensions
116 return true;
117 }
118
119 try {
120 ExtensionDependency extDep = new ExtensionDependency();
121 return extDep.checkExtensions(jar);
122 } catch (ExtensionInstallationException e) {
123 debug(e.getMessage());
124 }
125 return false;
126 }
127
128 /*
129 * Check for all declared required extensions in the jar file
|
89 providers = new Vector<>();
90 }
91 providers.add(eip);
92 }
93
94 /**
95 * <p>
96 * Unregister a previously installed installation provider
97 * </p>
98 */
99 public synchronized static void removeExtensionInstallationProvider
100 (ExtensionInstallationProvider eip)
101 {
102 providers.remove(eip);
103 }
104
105 /**
106 * <p>
107 * Checks the dependencies of the jar file on installed extension.
108 * </p>
109 * @param jar containing the attriutes declaring the dependencies
110 */
111 public static boolean checkExtensionsDependencies(JarFile jar)
112 {
113 if (providers == null) {
114 // no need to bother, nobody is registered to install missing
115 // extensions
116 return true;
117 }
118
119 try {
120 ExtensionDependency extDep = new ExtensionDependency();
121 return extDep.checkExtensions(jar);
122 } catch (ExtensionInstallationException e) {
123 debug(e.getMessage());
124 }
125 return false;
126 }
127
128 /*
129 * Check for all declared required extensions in the jar file
|