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.BundleContextcontextprotected static CLoggerloggerprotected IDictionaryServiceserviceprotected 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 IDictionaryServiceaddingService(org.osgi.framework.ServiceReference<IDictionaryService> reference)voidaddLog(Level level, String msg)protected booleandirectMerge(File zipfile, String version)voidframeworkEvent(org.osgi.framework.FrameworkEvent event)protected abstract voidframeworkStarted()booleangetDBLock()abstract StringgetName()ProcessInfogetProcessInfo()StringgetVersion()protected booleaninstalledPackage(String version)static BooleanisFrameworkStarted()protected booleanmerge(File zipfile, String version)voidmodifiedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)voidreleaseLock()voidremovedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)voidsetProcessInfo(ProcessInfo processInfo)voidsetProcessUI(IProcessUI processUI)voidsetSummary(Level level, String msg)protected voidstart()call when bundle have been started ( after this.context have been set )voidstart(org.osgi.framework.BundleContext context)protected voidstatusUpdate(String message)protected voidstop()call when bundle is stop ( before this.context is set to null )voidstop(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:
startin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
stop
public void stop(org.osgi.framework.BundleContext context) throws Exception- Specified by:
stopin 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:
frameworkEventin 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:
addingServicein interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>
-
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)
- Specified by:
modifiedServicein interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>
-
removedService
public void removedService(org.osgi.framework.ServiceReference<IDictionaryService> reference, IDictionaryService service)
- Specified by:
removedServicein interfaceorg.osgi.util.tracker.ServiceTrackerCustomizer<IDictionaryService,IDictionaryService>
-
-