Package org.adempiere.plugin.utils
Class AbstractActivator
- java.lang.Object
-
- org.adempiere.plugin.utils.AbstractActivator
-
- All Implemented Interfaces:
EventListener
,org.osgi.framework.BundleActivator
,org.osgi.framework.FrameworkListener
,org.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>
- Direct Known Subclasses:
AdempiereActivator
,Incremental2PackActivator
,PackInApplicationActivator
,Version2PackActivator
public abstract class AbstractActivator extends Object implements org.osgi.framework.BundleActivator, org.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>, org.osgi.framework.FrameworkListener
-
-
Field Summary
Fields Modifier and Type Field Description protected org.osgi.framework.BundleContext
context
protected static CLogger
logger
protected IDictionaryService
service
protected org.osgi.util.tracker.ServiceTracker<IDictionaryService,IDictionaryService>
serviceTracker
-
Constructor Summary
Constructors Constructor Description AbstractActivator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IDictionaryService
addingService(org.osgi.framework.ServiceReference<IDictionaryService> reference)
void
addLog(Level level, String msg)
protected boolean
directMerge(File zipfile, String version)
void
frameworkEvent(org.osgi.framework.FrameworkEvent event)
protected abstract void
frameworkStarted()
boolean
getDBLock()
abstract String
getName()
ProcessInfo
getProcessInfo()
String
getVersion()
protected boolean
installedPackage(String version)
static Boolean
isFrameworkStarted()
protected boolean
merge(File zipfile, String version)
void
modifiedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)
void
releaseLock()
void
removedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)
void
setProcessInfo(ProcessInfo processInfo)
void
setProcessUI(IProcessUI processUI)
void
setSummary(Level level, String msg)
protected void
start()
call when bundle have been started ( after this.context have been set )void
start(org.osgi.framework.BundleContext context)
protected void
statusUpdate(String message)
protected void
stop()
call when bundle is stop ( before this.context is set to null )void
stop(org.osgi.framework.BundleContext context)
-
-
-
Field Detail
-
logger
protected static final CLogger logger
-
context
protected org.osgi.framework.BundleContext context
-
serviceTracker
protected org.osgi.util.tracker.ServiceTracker<IDictionaryService,IDictionaryService> serviceTracker
-
service
protected IDictionaryService service
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext context) throws Exception
- Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
- Throws:
Exception
-
stop
public void stop(org.osgi.framework.BundleContext context) throws Exception
- Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
- Throws:
Exception
-
directMerge
protected boolean directMerge(File zipfile, String version) throws Exception
- Throws:
Exception
-
installedPackage
protected boolean installedPackage(String version)
-
getName
public abstract String getName()
-
getDBLock
public boolean getDBLock() throws AdempiereSystemError
- Throws:
AdempiereSystemError
-
releaseLock
public void releaseLock()
-
setProcessInfo
public void setProcessInfo(ProcessInfo processInfo)
-
getProcessInfo
public ProcessInfo getProcessInfo()
-
setProcessUI
public void setProcessUI(IProcessUI processUI)
-
statusUpdate
protected void statusUpdate(String message)
-
frameworkEvent
public void frameworkEvent(org.osgi.framework.FrameworkEvent event)
- Specified by:
frameworkEvent
in interfaceorg.osgi.framework.FrameworkListener
-
isFrameworkStarted
public static Boolean isFrameworkStarted()
-
frameworkStarted
protected abstract void frameworkStarted()
-
start
protected void start()
call when bundle have been started ( after this.context have been set )
-
stop
protected void stop()
call when bundle is stop ( before this.context is set to null )
-
getVersion
public String getVersion()
-
addingService
public IDictionaryService addingService(org.osgi.framework.ServiceReference<IDictionaryService> reference)
- Specified by:
addingService
in interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>
-
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)
- Specified by:
modifiedService
in interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>
-
removedService
public void removedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)
- Specified by:
removedService
in interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>
-
-