Class JarRevision


  • class JarRevision
    extends BundleArchiveRevision

    This class implements a bundle archive revision for a standard bundle JAR file. The specified location is the URL of the JAR file. By default, the associated JAR file is copied into the revision's directory on the file system, but it is possible to mark the JAR as 'by reference', which will result in the bundle JAR be used 'in place' and not being copied. In either case, some of the contents may be extracted into the revision directory, such as embedded JAR files and native libraries.

    • Constructor Detail

      • JarRevision

        public JarRevision​(Logger logger,
                           java.util.Map configMap,
                           WeakZipFileFactory zipFactory,
                           java.io.File revisionRootDir,
                           java.lang.String location,
                           boolean byReference,
                           java.io.InputStream is)
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getManifestHeader

        public java.util.Map getManifestHeader()
                                        throws java.lang.Exception
        Description copied from class: BundleArchiveRevision

        Returns the main attributes of the JAR file manifest header of the revision. The returned map is case insensitive.

        Specified by:
        getManifestHeader in class BundleArchiveRevision
        Returns:
        the case-insensitive JAR file manifest header of the revision.
        Throws:
        java.lang.Exception - if any error occurs.
      • close

        protected void close()
                      throws java.lang.Exception
        Description copied from class: BundleArchiveRevision

        This method is called when the revision is no longer needed. The directory associated with the revision will automatically be removed for each revision, so this method only needs to be concerned with other issues, such as open files.

        Specified by:
        close in class BundleArchiveRevision
        Throws:
        java.lang.Exception - if any error occurs.
      • initialize

        private void initialize​(boolean byReference,
                                java.io.InputStream is)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMainAttributes

        private static void getMainAttributes​(java.util.Map result,
                                              WeakZipFileFactory.WeakZipFile zipFile)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception