org.rhq.core.domain.content
Class ContentSourceType

java.lang.Object
  extended by org.rhq.core.domain.content.ContentSourceType
All Implemented Interfaces:
Serializable

public class ContentSourceType
extends Object
implements Serializable

Defines an adapter that can speak to a particular external package source. This definition includes information on how to connect/configure the external source as well as the Java implementation to use to perform the actual connection. Each source type represents a different mechanism for loading package information into the server.

See Also:
Serialized Form

Field Summary
static String QUERY_FIND_ALL
           
static String QUERY_FIND_BY_NAME
           
static String QUERY_FIND_BY_NAME_WITH_CONFIG_DEF
           
 
Constructor Summary
ContentSourceType()
           
ContentSourceType(String name)
           
 
Method Summary
 void addContentSource(ContentSource contentSource)
           
 boolean equals(Object obj)
           
 String getContentSourceApiClass()
          Indicates the Java class that should be instantiated to be the content source and used to connect to the underlying external source.
 ConfigurationDefinition getContentSourceConfigurationDefinition()
          Defines the configuration properties that must be set when creating a content source of this type.
 Set<ContentSource> getContentSources()
          Content sources of this type.
 DownloadMode getDefaultDownloadMode()
          The default download mode for instances of this content source type.
 String getDefaultSyncSchedule()
          Periodically, the content source plugin adapter will be asked to synchronize with the remote content source repository.
 String getDescription()
          Free text description of this repo source type.
 String getDisplayName()
          Name of this repo source type that is suitable for display to the user in the UI.
 int getId()
           
 String getName()
          Programmatic name of the repo source type.
 String getPluginName()
          The name of the plugin that defined this content source type.
 int hashCode()
           
 boolean isDefaultLazyLoad()
          If true, the content bits for all packages coming from content sources of this type will only be loaded on demand.
 void setContentSourceApiClass(String contentSourceApiClass)
           
 void setContentSourceConfigurationDefinition(ConfigurationDefinition contentSourceConfigurationDefinition)
           
 void setContentSources(Set<ContentSource> contentSources)
           
 void setDefaultDownloadMode(DownloadMode defaultDownloadMode)
           
 void setDefaultLazyLoad(boolean defaultLazyLoad)
           
 void setDefaultSyncSchedule(String syncSchedule)
           
 void setDescription(String description)
           
 void setDisplayName(String displayName)
           
 void setId(int id)
           
 void setName(String name)
           
 void setPluginName(String pluginName)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_ALL

public static final String QUERY_FIND_ALL
See Also:
Constant Field Values

QUERY_FIND_BY_NAME_WITH_CONFIG_DEF

public static final String QUERY_FIND_BY_NAME_WITH_CONFIG_DEF
See Also:
Constant Field Values

QUERY_FIND_BY_NAME

public static final String QUERY_FIND_BY_NAME
See Also:
Constant Field Values
Constructor Detail

ContentSourceType

public ContentSourceType()

ContentSourceType

public ContentSourceType(String name)
Method Detail

getId

public int getId()

setId

public void setId(int id)

getName

public String getName()
Programmatic name of the repo source type.


setName

public void setName(String name)

getDisplayName

public String getDisplayName()
Name of this repo source type that is suitable for display to the user in the UI.


setDisplayName

public void setDisplayName(String displayName)

getDescription

public String getDescription()
Free text description of this repo source type.


setDescription

public void setDescription(String description)

getPluginName

public String getPluginName()
The name of the plugin that defined this content source type.


setPluginName

public void setPluginName(String pluginName)

isDefaultLazyLoad

public boolean isDefaultLazyLoad()
If true, the content bits for all packages coming from content sources of this type will only be loaded on demand. This means the package contents will only be loaded when they are asked for the very first time. If false, the content source should attempt to download all packages as soon as possible. Note: this is only a default, suggested value - the user will be given the chance to override this setting when creating content sources.


setDefaultLazyLoad

public void setDefaultLazyLoad(boolean defaultLazyLoad)

getDefaultDownloadMode

public DownloadMode getDefaultDownloadMode()
The default download mode for instances of this content source type. Download mode indicates where (and even if) package bits are downloaded.

Returns:
the download mode

setDefaultDownloadMode

public void setDefaultDownloadMode(DownloadMode defaultDownloadMode)

getDefaultSyncSchedule

public String getDefaultSyncSchedule()
Periodically, the content source plugin adapter will be asked to synchronize with the remote content source repository. This gives the adapter a chance to see if any content has been added, updated or removed from the remote repository. This attribute defines the schedule, as a cron string. The default will be set for everyday at 3:00am local time. If content sources of this type should never automatically sync, this should be null. Note that individual content sources of this type can override this setting.

Returns:
sync schedule as a cron string or null if the sync should not automatically occur

setDefaultSyncSchedule

public void setDefaultSyncSchedule(String syncSchedule)

getContentSourceConfigurationDefinition

public ConfigurationDefinition getContentSourceConfigurationDefinition()
Defines the configuration properties that must be set when creating a content source of this type. Typically, this will define the properties necessary for specifying how to connect to the underlying source.


setContentSourceConfigurationDefinition

public void setContentSourceConfigurationDefinition(ConfigurationDefinition contentSourceConfigurationDefinition)

getContentSourceApiClass

public String getContentSourceApiClass()
Indicates the Java class that should be instantiated to be the content source and used to connect to the underlying external source. This class will be an implementation of org.rhq.enterprise.server.plugin.pc.content.ContentProvider.


setContentSourceApiClass

public void setContentSourceApiClass(String contentSourceApiClass)

getContentSources

public Set<ContentSource> getContentSources()
Content sources of this type.


addContentSource

public void addContentSource(ContentSource contentSource)

setContentSources

public void setContentSources(Set<ContentSource> contentSources)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.