final Attributes attributes = manifest.getMainAttributes(); final BundleDetails.Builder builder = new BundleDetails.Builder(); builder.workingDir(narDirectory);
/** * Returns a bundle representing the system class loader. * * @param niFiProperties a NiFiProperties instance which will be used to obtain the default NAR library path, * which will become the working directory of the returned bundle * @return a bundle for the system class loader */ public static Bundle create(final NiFiProperties niFiProperties) { final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); final String narLibraryDirectory = niFiProperties.getProperty(NiFiProperties.NAR_LIBRARY_DIRECTORY); if (StringUtils.isBlank(narLibraryDirectory)) { throw new IllegalStateException("Unable to create system bundle because " + NiFiProperties.NAR_LIBRARY_DIRECTORY + " was null or empty"); } final BundleDetails systemBundleDetails = new BundleDetails.Builder() .workingDir(new File(narLibraryDirectory)) .coordinate(SYSTEM_BUNDLE_COORDINATE) .build(); return new Bundle(systemBundleDetails, systemClassLoader); } }
final Attributes attributes = manifest.getMainAttributes(); final BundleDetails.Builder builder = new BundleDetails.Builder(); builder.workingDir(narDirectory);
final Attributes attributes = manifest.getMainAttributes(); final BundleDetails.Builder builder = new BundleDetails.Builder(); builder.workingDir(narDirectory);
/** * Returns a bundle representing the system class loader. * * @param niFiProperties a NiFiProperties instance which will be used to obtain the default NAR library path, * which will become the working directory of the returned bundle * @return a bundle for the system class loader */ public static Bundle create(final NiFiProperties niFiProperties) { final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); final String narLibraryDirectory = niFiProperties.getProperty(NiFiProperties.NAR_LIBRARY_DIRECTORY); if (StringUtils.isBlank(narLibraryDirectory)) { throw new IllegalStateException("Unable to create system bundle because " + NiFiProperties.NAR_LIBRARY_DIRECTORY + " was null or empty"); } final BundleDetails systemBundleDetails = new BundleDetails.Builder() .workingDir(new File(narLibraryDirectory)) .coordinate(SYSTEM_BUNDLE_COORDINATE) .build(); return new Bundle(systemBundleDetails, systemClassLoader); } }
/** * Returns a bundle representing the system class loader. * * @param niFiProperties a NiFiProperties instance which will be used to obtain the default NAR library path, * which will become the working directory of the returned bundle * @return a bundle for the system class loader */ public static Bundle create(final NiFiProperties niFiProperties) { final ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); final String narLibraryDirectory = niFiProperties.getProperty(NiFiProperties.NAR_LIBRARY_DIRECTORY); if (StringUtils.isBlank(narLibraryDirectory)) { throw new IllegalStateException("Unable to create system bundle because " + NiFiProperties.NAR_LIBRARY_DIRECTORY + " was null or empty"); } final BundleDetails systemBundleDetails = new BundleDetails.Builder() .workingDir(new File(narLibraryDirectory)) .coordinate(SYSTEM_BUNDLE_COORDINATE) .build(); return new Bundle(systemBundleDetails, systemClassLoader); } }