264 * @param res 265 * A {@link Resolution} previously computed by the 266 * {@link Library#install install()} method 267 * 268 * @param verifySignature 269 * Perform signature verification, if true 270 * 271 * @throws ConfigurationException 272 * If a valid configuration cannot be computed 273 * 274 * @throws IOException 275 * If an I/O error occurs while accessing the module library 276 * 277 * @throws SignatureException 278 * If an error occurs while validating the signature 279 */ 280 public abstract void install(Resolution res, boolean verifySignature) 281 throws ConfigurationException, IOException, SignatureException; 282 283 /** 284 * Find a resource within the given module in this library. 285 * 286 * @param mid 287 * The module's identifier 288 * 289 * @param rn 290 * The name of the requested resource, in the usual 291 * slash-separated form 292 * 293 * @return A {@code File} object naming the location of the resource, 294 * or {@code null} if the named module does not define that 295 * resource 296 */ 297 // ## Returning file or jar URIs here is EVIL! 298 // ## Define a jmod: hierarchical URI scheme? 299 public abstract URI findLocalResource(ModuleId mid, String rn) 300 throws IOException; 301 302 /** 303 * Find a native library within the given module in this library. | 264 * @param res 265 * A {@link Resolution} previously computed by the 266 * {@link Library#install install()} method 267 * 268 * @param verifySignature 269 * Perform signature verification, if true 270 * 271 * @throws ConfigurationException 272 * If a valid configuration cannot be computed 273 * 274 * @throws IOException 275 * If an I/O error occurs while accessing the module library 276 * 277 * @throws SignatureException 278 * If an error occurs while validating the signature 279 */ 280 public abstract void install(Resolution res, boolean verifySignature) 281 throws ConfigurationException, IOException, SignatureException; 282 283 /** 284 * Remove one or more modules from this library. 285 * 286 * @param mids 287 * The module identifiers 288 * 289 * @param dry 290 * Perform a dry run (no changes to the module library), if true. 291 * Otherwise the modules may be removed. 292 * 293 * @throws ConfigurationException 294 * If the configuration of any root modules in the library 295 * require any of the given modules 296 * 297 * @throws IOException 298 * If an I/O error occurs while accessing the module library, or 299 * removing any of the module's files. Any such exceptions are 300 * caught internally. If only one is caught, then it is re-thrown. 301 * If more than one exception is caught, then the second and 302 * following exceptions are added as suppressed exceptions of the 303 * first one caught, which is then re-thrown. 304 */ 305 public abstract void remove(List<ModuleId> mids, boolean dry) 306 throws ConfigurationException, IOException; 307 308 /** 309 * Forcibly remove one or more modules from this library. 310 * 311 * <p> No regard is given to configuration of any root modules in the 312 * library that may require any of the given modules. </p> 313 * 314 * @param mids 315 * The module identifiers 316 * 317 * @throws IOException 318 * If an I/O error occurs while accessing the module library, or 319 * removing any of the module's files. Any such exceptions are 320 * caught internally. If only one is caught, then it is re-thrown. 321 * If more than one exception is caught, then the second and 322 * following exceptions are added as suppressed exceptions of the 323 * first one caught, which is then re-thrown. 324 */ 325 public abstract void removeForcibly(List<ModuleId> mids) 326 throws IOException; 327 328 /** 329 * Find a resource within the given module in this library. 330 * 331 * @param mid 332 * The module's identifier 333 * 334 * @param rn 335 * The name of the requested resource, in the usual 336 * slash-separated form 337 * 338 * @return A {@code File} object naming the location of the resource, 339 * or {@code null} if the named module does not define that 340 * resource 341 */ 342 // ## Returning file or jar URIs here is EVIL! 343 // ## Define a jmod: hierarchical URI scheme? 344 public abstract URI findLocalResource(ModuleId mid, String rn) 345 throws IOException; 346 347 /** 348 * Find a native library within the given module in this library. |