Package org.apache.sling.installer.api

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


            final String serviceClass = OsgiInstaller.class.getName();
            final ServiceReference ref = ctx.getServiceReference(serviceClass);
            if(ref == null) {
                throw new CrankstartException("Installer service not available, cannot register resource (" + serviceClass + ")");
            }
            final OsgiInstaller installer = (OsgiInstaller)ctx.getService(ref);
            try {
                installer.registerResources(prefix, toRegister.toArray(new InstallableResource[] {}));
                log.info("Registered {} resources with installer, using prefix '{}'", toRegister.size(), prefix);
                resources.clear();
            } finally {
                ctx.ungetService(ref);
            }
View Full Code Here


    }

    public synchronized void notifyChange() {
        final boolean shouldRun = this.installer.hasConfigurations();
        if ( (shouldRun && !running) || (!shouldRun && running) ) {
            final OsgiInstaller installer = (OsgiInstaller)this.installerListener.getService();

            if ( installer != null&& !running ) {
                logger.debug("Starting scanner");
                this.startScanner(installer);
            } else if ( running && installer == null ) {
View Full Code Here

     * If all services are available, register listener and pass resources
     * to the OSGi installer.
     */
    public synchronized void notifyChange() {
        // check if all services are available
        final OsgiInstaller installer = (OsgiInstaller)this.installerListener.getService();
        final LaunchpadContentProvider lcp = (LaunchpadContentProvider)this.providerListener.getService();
        final StartupHandler handler = (StartupHandler)this.startupListener.getService();
        final SlingSettingsService settings = (SlingSettingsService)this.settingsListener.getService();
        if ( installer != null && lcp != null && handler != null && settings != null ) {
            if ( !this.installed ) {
View Full Code Here

TOP

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

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.