Activator.java
1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.launchpad.api.StartupListener
* org.osgi.framework.BundleActivator
* org.osgi.framework.BundleContext
* org.osgi.framework.ServiceRegistration
*/
package com.adobe.granite.startup.impl;
import com.adobe.granite.startup.impl.GraniteStartLevel;
import com.adobe.granite.startup.impl.InstallerListener;
import java.util.Dictionary;
import org.apache.sling.launchpad.api.StartupListener;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
public class Activator
implements BundleActivator {
private ServiceRegistration registration;
private static final String DEBUG_START_LEVEL = "granite.startup.startlevel.debug";
public void start(BundleContext context) throws Exception {
if (context.getProperty("granite.startup.startlevel.debug") != null) {
GraniteStartLevel.setup(context);
}
InstallerListener listener = new InstallerListener(context);
this.registration = context.registerService(StartupListener.class.getName(), (Object)listener, null);
}
public void stop(BundleContext context) throws Exception {
if (this.registration != null) {
this.registration.unregister();
this.registration = null;
}
}
}