org.netbeans.modules.autoupdate.services 1.3.1

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

Nested Class Summary
static class UpdateUnitProvider.CATEGORY
           
 
Method Summary
 UpdateUnitProvider.CATEGORY getCategory()
           
 String getDescription()
          Description of provider.
 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 -

getDescription

public String getDescription()
Description of provider. This description can be visualized in UI.

Returns:
description of provider or null

getCategory

public UpdateUnitProvider.CATEGORY getCategory()

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.3.1

Built on January 29 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.