Package org.apache.felix.bundlerepository.impl

Examples of org.apache.felix.bundlerepository.impl.DataModelHelperImpl$Headers


            if (entity.getContentType().getValue().equals("application/java-archive")
                    || entity.getContentType().getValue().equals("application/octet-stream")) {
                // I have a jar/binary, potentially a resource
                try {
                    if ((filter == null) || (url.matches(filter))) {
                        ResourceImpl resource = (ResourceImpl) new DataModelHelperImpl().createResource(new URL(url));
                        if (resource != null) {
                            LOGGER.debug("Copy {} into the Cave repository storage", url);
                            int index = url.lastIndexOf("/");
                            if (index > 0) {
                                url = url.substring(index);
                            }
                            File destination = new File(new File(this.getLocation()), url);
                            FileOutputStream outputStream = new FileOutputStream(destination);
                            entity.writeTo(outputStream);
                            outputStream.flush();
                            outputStream.close();
                            if (update) {
                                resource = (ResourceImpl) new DataModelHelperImpl().createResource(destination.toURI().toURL());
                                LOGGER.debug("Update OBR metadata with {}", resource.getId());
                                this.addResource(resource);
                            }
                        }
                    }
View Full Code Here

TOP

Related Classes of org.apache.felix.bundlerepository.impl.DataModelHelperImpl$Headers

Copyright © 2018 www.massapicom. 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.