mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/advanced/BundleImportMgrImpl.java
private Long determineBundleId() throws IOException
    {
        // Create a jar input stream from the file.
        final JarInputStream jis = new JarInputStream(m_BundleFile.getInputstream());

        // Retrieve the manifest from the jar file.
        final Manifest manifest = jis.getManifest();

        // Close the jar input stream.
        jis.close();

        // If no manifest can be retrieved then file is not a valid jar. Will
        // throw null pointer exception later if not
        // handled now.
        if (manifest == null)
        {
            throw new IOException("The bundle does not contain a valid manifest file.");
        }

        // Retrieve the bundle name from the manifest file.
        final String bundleName = manifest.getMainAttributes().getValue(
                "Bundle-SymbolicName");

        final List<BundleModel> bundles = bundleConfigurationMgr.getBundles();

        Long bundleId = Long.valueOf(-1);
        for (BundleModel bundle : bundles)
        {
            if (bundle.getSymbolicName().equals(bundleName))
            {
                bundleId = bundle.getBundleId();
            }
        }

        return bundleId;
    }
/**
     * Used to determine the ID of bundle and whether or not it is already
     * currently installed. If the bundle is installed then this method returns
     * the ID of the bundle. If the bundle is not currently installed it will
     * return -1 as the bundle ID value.
     * 
     * @return A long which represents the bundle ID on the active controller or
     *         -1 if it is not currently installed on the active controller.
     * @throws IOException
     *             thrown if file is not a valid jar file.
     */
Used to determine the ID of bundle and whether or not it is already
currently installed. If the bundle is installed then this method returns
the ID of the bundle. If the bundle is not currently installed it will
return -1 as the bundle ID value.

@return A long which represents the bundle ID on the active controller or
-1 if it is not currently installed on the active controller.
@throws IOException
thrown if file is not a valid jar file.
Used to determine the ID of bundle and whether or not it is already currently installed . If the bundle is installed then this method returns the ID of the bundle . If the bundle is not currently installed it will return - 1 as the bundle ID value . @return A long which represents the bundle ID on the active controller or - 1 if it is not currently installed on the active controller . @throws IOException thrown if file is not a valid jar file .
private Long determineBundleId() throws IOException
    {
        final JarInputStream jis = new JarInputStream(m_BundleFile.getInputstream());
        final Manifest manifest = jis.getManifest();
        jis.close();
        if (manifest == null)
        {
            throw new IOException("The bundle does not contain a valid manifest file.");
        }
        final String bundleName = manifest.getMainAttributes().getValue(
                "Bundle-SymbolicName");
        final List<BundleModel> bundles = bundleConfigurationMgr.getBundles();
        Long bundleId = Long.valueOf(-1);
        for (BundleModel bundle : bundles)
        {
            if (bundle.getSymbolicName().equals(bundleName))
            {
                bundleId = bundle.getBundleId();
            }
        }
        return bundleId;
    }
private Long determineBundleId ( ) throws IOException { final JarInputStream jis = new JarInputStream ( m_BundleFile . getInputstream ( ) ) ; final Manifest manifest = jis . getManifest ( ) ; jis . close ( ) ; if ( manifest == null ) { throw new IOException ( "The bundle does not contain a valid manifest file." ) ; } final String bundleName = manifest . getMainAttributes ( ) . getValue ( "Bundle-SymbolicName" ) ; final List < BundleModel > bundles = bundleConfigurationMgr . getBundles ( ) ; Long bundleId = Long . valueOf ( - 1 ) ; for ( BundleModel bundle : bundles ) { if ( bundle . getSymbolicName ( ) . equals ( bundleName ) ) { bundleId = bundle . getBundleId ( ) ; } } return bundleId ; }
Used to determine the ID of bundle and whether or not it is already
 currently installed.
Used to determine the ID of bundle and whether or not it is already currently installed .
// Create a jar input stream from the file. // Retrieve the manifest from the jar file. // Close the jar input stream. // If no manifest can be retrieved then file is not a valid jar. Will // throw null pointer exception later if not // handled now. // Retrieve the bundle name from the manifest file.