站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

UpdateUnitProvider (Auto Update Services) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.autoupdate.services 1.2

org.netbeans.api.autoupdate
Class UpdateUnitProvider

java.lang.Object
  extended by org.netbeans.api.autoupdate.UpdateUnitProvider

public final class UpdateUnitProvider
extends Object

UpdateUnitProvider providers UpdateUnit. The units are build of the of SPI UpdateProvider.

See Also:
UpdateProvider

Method Summary
 String getDisplayName()
          Display name of provider.
 String getName()
          Name of provider, this name is used by Autoupdate infrastructure for manimulating of providers.
 URL getProviderURL()
          It's special support for UpdateProvider based on Autoupdate Catalog.
 List<UpdateUnit> getUpdateUnits()
          Returns java.util.List of UpdateUnit build of the content of the provider.
 List<UpdateUnit> getUpdateUnits(UpdateManager.TYPE... types)
          Returns java.util.List of UpdateUnit build of the content of the provider.
 boolean isEnabled()
          Returns true if the provider is automatically checked and its UpdateUnit are returned from UpdateManager
 boolean refresh(ProgressHandle handle, boolean force)
          Make refresh of content of the provider.
 void setDisplayName(String name)
          Sets the display name of the provider.
 void setEnable(boolean state)
          Sets the enable flag.
 void setProviderURL(URL url)
          Modified URL of URL-based provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Name of provider, this name is used by Autoupdate infrastructure for manimulating of providers.

Returns:
name of provider

getDisplayName

public String getDisplayName()
Display name of provider. This display name can be visualized in UI.

Returns:
display name of provider

setDisplayName

public void setDisplayName(String name)
Sets the display name of the provider. This name can be presented to users in UI.

Parameters:
name -

getProviderURL

public URL getProviderURL()
It's special support for UpdateProvider based on Autoupdate Catalog. It's most kind of Update Providers and have a special support in UI.

Returns:
URL of provider URL or null if and only if the UpdateProvider doesn't based of Autoupdate Catalog

setProviderURL

public void setProviderURL(URL url)
Modified URL of URL-based provider. If the UpdateProvider doesn't support URL then the method has no affect.

Parameters:
url - new URL

getUpdateUnits

public List<UpdateUnit> getUpdateUnits()
Returns java.util.List of UpdateUnit build of the content of the provider.

Returns:
list of UpdateUnit

getUpdateUnits

public List<UpdateUnit> getUpdateUnits(UpdateManager.TYPE... types)
Returns java.util.List of UpdateUnit build of the content of the provider.

Parameters:
types - returns UpdateUnits contain only given types, e.g. modules for MODULE type. If types is null or null then returns default types
Returns:
list of UpdateUnit

refresh

public boolean refresh(ProgressHandle handle,
                       boolean force)
                throws IOException
Make refresh of content of the provider. The content can be read from a cache. The force parameter forces reading content from remote server.

Parameters:
handle - started ProgressHandle or null
force - if true then forces to reread the content from server
Returns:
true if refresh succeed
Throws:
IOException - when any network problem appreared

isEnabled

public boolean isEnabled()
Returns true if the provider is automatically checked and its UpdateUnit are returned from UpdateManager

Returns:
enable flag

setEnable

public void setEnable(boolean state)
Sets the enable flag.

Parameters:
state -
See Also:
isEnabled()

org.netbeans.modules.autoupdate.services 1.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.