tk.exgerm.pluginmanager
Class PluginManager

java.lang.Object
  extended by tk.exgerm.pluginmanager.PluginManager

public class PluginManager
extends Object


Field Summary
static String componentName
           
 
Constructor Summary
PluginManager(ICoreContext coreContext, org.osgi.framework.BundleContext context, PluginManagerService service)
           
 
Method Summary
 org.osgi.framework.Bundle getBundle(Integer id)
           
 ArrayList<Vector<String>> getBundles()
          Vraća listu vektora Stringova sa podacima o bundlovima Pozivaju ga komanda 'plugins' i glavni prozor PM-a da bi ih ispisali.
 org.osgi.framework.BundleContext getContext()
           
 ICoreContext getCoreContext()
           
 PluginManagerService getService()
           
 org.osgi.framework.Bundle installFilesysetem(String path)
          Instalira novi bundle iz filesystema, pri čemu ga kopira u plugins, pa tek potom instalira i pokreće.
 void installURL(String url)
          Instalira plugin sa neke web adrese.
 void updateBundle(Integer id)
          Proverava da li ima novija verzija bundle-a.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentName

public static String componentName
Constructor Detail

PluginManager

public PluginManager(ICoreContext coreContext,
                     org.osgi.framework.BundleContext context,
                     PluginManagerService service)
Method Detail

getCoreContext

public ICoreContext getCoreContext()

getContext

public org.osgi.framework.BundleContext getContext()

getBundles

public ArrayList<Vector<String>> getBundles()
Vraća listu vektora Stringova sa podacima o bundlovima Pozivaju ga komanda 'plugins' i glavni prozor PM-a da bi ih ispisali.

Returns:
lista vektora stringova sa podacima o bundlovima.

installFilesysetem

public org.osgi.framework.Bundle installFilesysetem(String path)
                                             throws org.osgi.framework.BundleException,
                                                    IOException
Instalira novi bundle iz filesystema, pri čemu ga kopira u plugins, pa tek potom instalira i pokreće.

Parameters:
path - putanja do jar paketa
Returns:
referencu na upravo instaliran Bundle
Throws:
org.osgi.framework.BundleException - u vezi sa osgi problemom u toku instalacije
IOException - greška u čitanju/pisanju sa medijuma

installURL

public void installURL(String url)
                throws ExGOSGiUpdateException
Instalira plugin sa neke web adrese.

Parameters:
url - koja vodi do jar paketa komponente
Throws:
ExGOSGiUpdateException - ishod update-a

getBundle

public org.osgi.framework.Bundle getBundle(Integer id)
                                    throws NumberFormatException
Throws:
NumberFormatException

getService

public PluginManagerService getService()

updateBundle

public void updateBundle(Integer id)
                  throws ExGOSGiUpdateException
Proverava da li ima novija verzija bundle-a. Ako ima, kopira je preko stare verzije i pokreće.

Parameters:
id - identifikator bundle-a kojeg updateujemo
Throws:
ExGOSGiUpdateException - greška prilikom update-a