Skip to content
Snippets Groups Projects
Commit 58cb21a5 authored by Eric Slenk's avatar Eric Slenk
Browse files

Import StructuresSnapshotService.

parent 0544099b
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ apply plugin: 'war'
apply plugin: 'eclipse'
sourceCompatibility = '1.8'
version = '0.1.0-1'
version = '0.1.0-3'
repositories {
......@@ -14,7 +14,7 @@ repositories {
}
dependencies {
compile fileTree(dir: 'src/main/resources/libs', include: '*.jar')
compile fileTree(dir: "${getFelixDirPath()}/load", include: '*.jar')
compile (group: 'com.dotcms', name: 'dotcms', version: '3.3.2'){
transitive = true
}
......
package edu.msu.anr.osgi.structuralintegrity.viewtool;
import com.dotcms.repackage.org.osgi.framework.BundleContext;
import com.dotcms.repackage.org.osgi.util.tracker.ServiceTracker;
import com.dotmarketing.osgi.GenericBundleActivator;
import com.dotmarketing.util.Logger;
import edu.msu.anr.osgi.structuralintegrity.service.StructuresSnapshotService;
public class Activator extends GenericBundleActivator {
private ServiceTracker<StructuresSnapshotService, StructuresSnapshotService> structuresSnapshotServiceTracker;
@Override
public void start ( BundleContext bundleContext ) throws Exception {
//Initializing services...
initializeServices( bundleContext );
// Create a ServiceTracker for the StructuresSnapshotService
try {
structuresSnapshotServiceTracker = new ServiceTracker<>(
bundleContext,
StructuresSnapshotService.class.getName(),
null
);
} catch (Exception e) {
Logger.error(this, e.getMessage());
throw e;
}
//Registering the ViewTool service
registerViewToolService( bundleContext, new StructuresSnapshotServiceToolInfo() );
}
......@@ -18,6 +36,7 @@ public class Activator extends GenericBundleActivator {
@Override
public void stop ( BundleContext bundleContext ) throws Exception {
unregisterViewToolServices();
structuresSnapshotServiceTracker.close();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment