Package org.apache.sling.installer.api

Examples of org.apache.sling.installer.api.InstallableResource


        String relPath = getInstallableResourceId(path, bundleResource);
        String name = FilenameUtils.getName(relPath);
        if (name == null || name.isEmpty()) {
            return null; //ignore directories!
        }
        InstallableResource resource;
        try {
            /*
             * Notes:
             *  - use <relativepath> as id
             *  - parse null as type to enable autodetection for configs as
             *    implemented by InternalReseouce.create(..)
             *  - we use the symbolic name and the modification date of the bundle as digest
             *  - the Dictionary will be ignored if an input stream is present
             *    so it is best to parse null
             *  - No idea how the priority is used by the Sling Installer. For
             *    now parse null than the default priority is used.
             */
            resource = new InstallableResource(relPath,
                    bundleResource.openStream(), null,
                    String.valueOf(bundle.getSymbolicName()+bundle.getLastModified()), null, null);
            log.info(" ... found installable resource " + bundleResource);
        } catch (IOException e) {
            log.error(String.format("Unable to process configuration File %s from Bundle %s",
View Full Code Here

TOP

Related Classes of org.apache.sling.installer.api.InstallableResource

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.