fr.paris.lutece.plugins.updater.service
Class UpdateService

java.lang.Object
  extended by fr.paris.lutece.plugins.updater.service.UpdateService
All Implemented Interfaces:
IUpdateService

public class UpdateService
extends java.lang.Object
implements IUpdateService

UpdateService


Field Summary
 
Fields inherited from interface fr.paris.lutece.plugins.updater.service.IUpdateService
STATUS_CRITICAL_UPDATE, STATUS_NO_UPDATE, STATUS_REGULAR_UPDATE
 
Constructor Summary
UpdateService()
           
 
Method Summary
 void checkUpdate(java.util.Collection<fr.paris.lutece.portal.service.plugin.Plugin> listPlugins)
          Check for updates and update the status
 void deployPlugin(java.lang.String strPluginName, java.lang.String strVersion)
          Deploy a plugin (downloaded => deploy)
 void downloadPlugin(java.lang.String strPluginName, java.lang.String strVersion)
          Download a plugin release
 void downloadPluginUpgrade(java.lang.String strPluginName, java.lang.String strVersion, java.lang.String strVersionFrom)
          Download a plugin release
 java.util.List<NewInfos> getNewPluginsInfos(java.util.Collection<fr.paris.lutece.portal.service.plugin.Plugin> listPlugins)
          Gets available plugins not already installed
 int getStatus()
          Returns the updater status : (no update available, regular updates available or critical updates available.
 java.util.List<UpdateInfos> getUpdateInfos(java.util.Collection<fr.paris.lutece.portal.service.plugin.Plugin> listPlugins)
          Gets available update for a list of plugins
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateService

public UpdateService()
Method Detail

getUpdateInfos

public java.util.List<UpdateInfos> getUpdateInfos(java.util.Collection<fr.paris.lutece.portal.service.plugin.Plugin> listPlugins)
Gets available update for a list of plugins

Specified by:
getUpdateInfos in interface IUpdateService
Parameters:
listPlugins - The list of installed plugins
Returns:
Update infos for installed plugins

getNewPluginsInfos

public java.util.List<NewInfos> getNewPluginsInfos(java.util.Collection<fr.paris.lutece.portal.service.plugin.Plugin> listPlugins)
Gets available plugins not already installed

Specified by:
getNewPluginsInfos in interface IUpdateService
Parameters:
listPlugins - The list of installed plugins
Returns:
New plugins infos list

deployPlugin

public void deployPlugin(java.lang.String strPluginName,
                         java.lang.String strVersion)
Deploy a plugin (downloaded => deploy)

Specified by:
deployPlugin in interface IUpdateService
Parameters:
strPluginName - The plugin name
strVersion - The update version

getStatus

public int getStatus()
Returns the updater status : (no update available, regular updates available or critical updates available.

Specified by:
getStatus in interface IUpdateService
Returns:
The status

checkUpdate

public void checkUpdate(java.util.Collection<fr.paris.lutece.portal.service.plugin.Plugin> listPlugins)
Check for updates and update the status

Specified by:
checkUpdate in interface IUpdateService
Parameters:
listPlugins - The list of installed plugins

downloadPlugin

public void downloadPlugin(java.lang.String strPluginName,
                           java.lang.String strVersion)
                    throws UpdaterDownloadException
Download a plugin release

Specified by:
downloadPlugin in interface IUpdateService
Parameters:
strPluginName - The plugin name
strVersion - The version
Throws:
UpdaterDownloadException - If an exception occurs during download

downloadPluginUpgrade

public void downloadPluginUpgrade(java.lang.String strPluginName,
                                  java.lang.String strVersion,
                                  java.lang.String strVersionFrom)
                           throws UpdaterDownloadException
Download a plugin release

Specified by:
downloadPluginUpgrade in interface IUpdateService
Parameters:
strPluginName - The plugin name
strVersion - The version
strVersionFrom - The version from which to upgrade
Throws:
UpdaterDownloadException - If an exception occurs during download


Copyright © 2010 Mairie de Paris. All Rights Reserved.