Examples of addBundleFile()


Examples of org.rhq.enterprise.server.bundle.BundleManagerLocal.addBundleFile()

            String version = getFormField(formFields, "version", Integer.toString(bundleVersionId));
            Architecture architecture = new Architecture(getFormField(formFields, "arch", "noarch"));
            InputStream fileStream = new FileInputStream(file);
            try {
                BundleManagerLocal bundleManager = LookupUtil.getBundleManager();
                BundleFile bundleFile = bundleManager.addBundleFile(subject, bundleVersionId, name, version,
                    architecture, fileStream);
                successMsg = "success [" + bundleFile.getId() + "]";
            } finally {
                fileStream.close(); // I don't think this is necessary (seems BundleManager closes it for us) but do it anyway just in case
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.