< prev index next >

src/java.base/share/classes/sun/misc/ExtensionDependency.java

Print this page

        

*** 43,72 **** import java.net.URL; import java.net.MalformedURLException; import sun.net.www.ParseUtil; /** - * <p> * This class checks dependent extensions a particular jar file may have * declared through its manifest attributes. ! * </p> * Jar file declared dependent extensions through the extension-list * attribute. The extension-list contains a list of keys used to * fetch the other attributes describing the required extension. * If key is the extension key declared in the extension-list * attribute, the following describing attribute can be found in ! * the manifest : ! * key-Extension-Name: (Specification package name) ! * key-Specification-Version: (Specification-Version) ! * key-Implementation-Version: (Implementation-Version) ! * key-Implementation-Vendor-Id: (Imlementation-Vendor-Id) ! * key-Implementation-Version: (Implementation version) ! * key-Implementation-URL: (URL to download the requested extension) * <p> * This class also maintain versioning consistency of installed * extensions dependencies declared in jar file manifest. - * </p> * * @deprecated this class will be removed in a future release. * @author Jerome Dochez */ @Deprecated --- 43,72 ---- import java.net.URL; import java.net.MalformedURLException; import sun.net.www.ParseUtil; /** * This class checks dependent extensions a particular jar file may have * declared through its manifest attributes. ! * <p> * Jar file declared dependent extensions through the extension-list * attribute. The extension-list contains a list of keys used to * fetch the other attributes describing the required extension. * If key is the extension key declared in the extension-list * attribute, the following describing attribute can be found in ! * the manifest: ! * <ul> ! * <li>key-Extension-Name: (Specification package name)</li> ! * <li>key-Specification-Version: (Specification-Version)</li> ! * <li>key-Implementation-Version: (Implementation-Version)</li> ! * <li>key-Implementation-Vendor-Id: (Imlementation-Vendor-Id)</li> ! * <li>key-Implementation-Version: (Implementation version)</li> ! * <li>key-Implementation-URL: (URL to download the requested extension)</li> ! * </ul> * <p> * This class also maintain versioning consistency of installed * extensions dependencies declared in jar file manifest. * * @deprecated this class will be removed in a future release. * @author Jerome Dochez */ @Deprecated
*** 74,87 **** /* Callbak interfaces to delegate installation of missing extensions */ private static Vector<ExtensionInstallationProvider> providers; /** - * <p> * Register an ExtensionInstallationProvider. The provider is responsible * for handling the installation (upgrade) of any missing extensions. ! * </p> * @param eip ExtensionInstallationProvider implementation */ public synchronized static void addExtensionInstallationProvider (ExtensionInstallationProvider eip) { --- 74,86 ---- /* Callbak interfaces to delegate installation of missing extensions */ private static Vector<ExtensionInstallationProvider> providers; /** * Register an ExtensionInstallationProvider. The provider is responsible * for handling the installation (upgrade) of any missing extensions. ! * * @param eip ExtensionInstallationProvider implementation */ public synchronized static void addExtensionInstallationProvider (ExtensionInstallationProvider eip) {
*** 90,114 **** } providers.add(eip); } /** - * <p> * Unregister a previously installed installation provider - * </p> */ public synchronized static void removeExtensionInstallationProvider (ExtensionInstallationProvider eip) { providers.remove(eip); } /** - * <p> * Checks the dependencies of the jar file on installed extension. ! * </p> ! * @param jarFile containing the attriutes declaring the dependencies */ public static boolean checkExtensionsDependencies(JarFile jar) { if (providers == null) { // no need to bother, nobody is registered to install missing --- 89,110 ---- } providers.add(eip); } /** * Unregister a previously installed installation provider */ public synchronized static void removeExtensionInstallationProvider (ExtensionInstallationProvider eip) { providers.remove(eip); } /** * Checks the dependencies of the jar file on installed extension. ! * ! * @param jar containing the attributes declaring the dependencies */ public static boolean checkExtensionsDependencies(JarFile jar) { if (providers == null) { // no need to bother, nobody is registered to install missing
*** 180,192 **** return result; } /* - * <p> * Check that a particular dependency on an extension is satisfied. ! * </p> * @param extensionName is the key used for the attributes in the manifest * @param attr is the attributes of the manifest file * * @return true if the dependency is satisfied by the installed extensions */ --- 176,187 ---- return result; } /* * Check that a particular dependency on an extension is satisfied. ! * * @param extensionName is the key used for the attributes in the manifest * @param attr is the attributes of the manifest file * * @return true if the dependency is satisfied by the installed extensions */
*** 202,215 **** ExtensionInfo reqInfo = new ExtensionInfo(extensionName, attr); return installExtension(reqInfo, null); } /* - * <p> * Check if a particular extension is part of the currently installed * extensions. ! * </p> * @param extensionName is the key for the attributes in the manifest * @param attr is the attributes of the manifest * * @return true if the requested extension is already installed */ --- 197,209 ---- ExtensionInfo reqInfo = new ExtensionInfo(extensionName, attr); return installExtension(reqInfo, null); } /* * Check if a particular extension is part of the currently installed * extensions. ! * * @param extensionName is the key for the attributes in the manifest * @param attr is the attributes of the manifest * * @return true if the requested extension is already installed */
*** 260,274 **** } return false; } /* - * <p> * Check if the requested extension described by the attributes * in the manifest under the key extensionName is compatible with * the jar file. - * </p> * * @param extensionName key in the attribute list * @param attr manifest file attributes * @param file installed extension jar file to compare the requested * extension against. --- 254,266 ----
*** 335,348 **** } return false; } /* - * <p> * An required extension is missing, if an ExtensionInstallationProvider is * registered, delegate the installation of that particular extension to it. - * </p> * * @param reqInfo Missing extension information * @param instInfo Older installed version information * * @return true if the installation is successful --- 327,338 ----
*** 378,392 **** debug(reqInfo.name + " installation failed"); return false; } /** - * <p> * Checks if the extension, that is specified in the extension-list in * the applet jar manifest, is already installed (i.e. exists in the * extension directory). - * </p> * * @param extensionName extension name in the extension-list * * @return the extension if it exists in the extension directory */ --- 368,380 ----
*** 426,438 **** } }); } /** - * <p> * @return the java.ext.dirs property as a list of directory - * </p> */ private static File[] getExtDirs() { String s = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction("java.ext.dirs")); --- 414,424 ----
*** 454,466 **** debug("getExtDirs dirs.length " + dirs.length); return dirs; } /* - * <p> * Scan the directories and return all files installed in those ! * </p> * @param dirs list of directories to scan * * @return the list of files installed in all the directories */ private static File[] getExtFiles(File[] dirs) throws IOException { --- 440,451 ---- debug("getExtDirs dirs.length " + dirs.length); return dirs; } /* * Scan the directories and return all files installed in those ! * * @param dirs list of directories to scan * * @return the list of files installed in all the directories */ private static File[] getExtFiles(File[] dirs) throws IOException {
*** 481,493 **** debug("getExtFiles ua.length " + ua.length); return ua; } /* - * <p> * @return the list of installed extensions jar files - * </p> */ private File[] getInstalledExtensions() throws IOException { return AccessController.doPrivileged( new PrivilegedAction<File[]>() { public File[] run() { --- 466,476 ----
*** 501,513 **** } }); } /* - * <p> * Add the newly installed jar file to the extension class loader. - * </p> * * @param cl the current installed extension class loader * * @return true if successful */ --- 484,494 ----
< prev index next >