PlatformAppCLIModulesManager

Use Autoupdate Services to manage another Platform application

Current Autoupdate Services allows to managing (install new plugins, removing plugins or changing its state) only running instance of NetBeans Platform application (i.e. running IDE). There are several VOC to extend AU Services to manage another NetBeans application by a standalone application which can be running independently of managed application. Such lightweight application should have a minimal UI, maybe just CLI mode could be enough.

It needs to be free of NetBeans Module System services, these services can provide list of installed modules or get back information about module's state.

Tracked as issue Issue 125522


Contents



Usage of services which are specific to running IDE

UpdateTracking

  • relative clusters against install directory
Method Solution Workaround
List<File> UpdateTracking.clusters() Read subdirs under given install dir
UpdateTracking.getPlatformDir Read platformX under given dir
UpdateTracking.getUserDir N/A Don't allow to use userdir(!)


Startup module

  • org.netbeans.core.startup.MainLookup
  • org.netbeans.core.startup.layers.LocalFileSystemEx

Registering new cluster on the fly. IMHO it is not need for standalone application.

Bootstrap

  • org.netbeans.Module
Method Solution Workaround
Module.getJarFile() Possible to read from config file
Module.isFixed() N/A Simple returns false
Module.isValid() N/A Simple returns true
Module.getProblems() N/A Simple returns empty array
Module.isAutoload() Possible to read from config file
Module.isEager() Possible to read from config file


  • org.netbeans.ModuleManager
  • Checking Module Manager for being a module with given code name base in its district
  • Find out it a module was installed or not
  • Transforming ModuleInfo to Module
Method Solution Workaround
ModuleManager.enable() None Don't allow such action
ModuleManager.disable() None Don't allow such action
ModuleManager.simulateEnable() None Don't allow such action
ModuleManager.simulateDisable() None Don't allow such action
ModuleMananer.getModuleInterdependencies(m, false, false) Calculate from module's metadata Copy&Paste?
ModuleManager.getModuleInterdependencies(m, true, false) Use DependencyDecorator Or Copy&Paste?


  • org.netbeans.InvalidException
  • org.netbeans.Util

Just static utilities, no problem to use it.

Needful changes

  • UpdateManager.getInstance(File installDir)
  • API change
  • Allow to get instance of UpdateManager for given NetBeans install directory
  • Instance of UpdateManager will be exclusive and singleton
  • Autoupdate Services could run either in ordinary mode on running IDE or remote mode on given install directory
  • Provide a trivial implementation org.netbeans.ModuleManager
  • Covering all required methods like ModuleManager.getModuleInterdependencies
  • Provide a trivial implementation org.netbeans.Module
  • (?) Enhance AU SPI with UpdateItem.installedModule()
  • API change
  • Not necessary to do it.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo