com.redhat.rhn.domain.config
Class ConfigChannel

java.lang.Object
  extended by com.redhat.rhn.domain.BaseDomainHelper
      extended by com.redhat.rhn.domain.config.ConfigChannel
All Implemented Interfaces:
Identifiable

public class ConfigChannel
extends BaseDomainHelper
implements Identifiable

ConfigChannel - Class representation of the table rhnConfigChannel.


Constructor Summary
protected ConfigChannel()
          Protected constructor Use ConfigurationFactory to create a new channel.
 
Method Summary
 ConfigFile createConfigFile(ConfigFileState state, ConfigFileName cfn)
          Creates a configuration file and saves it to the database with the given information.
 ConfigFile createConfigFile(ConfigFileState state, java.lang.String path)
          See createConfigFile(ConfigFileState, ConfigFileName).
 boolean equals(java.lang.Object obj)
          
 ConfigChannelType getConfigChannelType()
           
 java.util.SortedSet<ConfigFile> getConfigFiles()
           
 java.lang.String getDescription()
          Getter for description
 java.lang.String getDisplayName()
          Provide a wrapper that returns a useful, I18N'd, name for a channel - relies on the utility function in ConfigurationFactory.
 java.lang.Long getId()
          Getter for id
 java.lang.String getLabel()
          Getter for label
 java.lang.String getName()
          Getter for name
 Org getOrg()
           
 java.lang.Long getOrgId()
          Getter for orgId
 int hashCode()
          
 boolean isGlobalChannel()
          Is this a global channel?
 boolean isLocalChannel()
          Is this a local (i.e.
 boolean isSandboxChannel()
          Is this a sandbox channel?
 void setConfigChannelType(ConfigChannelType configChannelTypeIn)
           
protected  void setConfigFiles(java.util.SortedSet cfg)
          Setter for list of config files associated to this channel
 void setDescription(java.lang.String descriptionIn)
          Setter for description
 void setId(java.lang.Long idIn)
          Setter for id
 void setLabel(java.lang.String labelIn)
          Setter for label
 void setName(java.lang.String nameIn)
          Setter for name
 void setOrg(Org orgIn)
           
 java.lang.String toString()
          
 
Methods inherited from class com.redhat.rhn.domain.BaseDomainHelper
getCreated, getModified, setCreated, setModified
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigChannel

protected ConfigChannel()
Protected constructor Use ConfigurationFactory to create a new channel.

Method Detail

getId

public java.lang.Long getId()
Getter for id

Specified by:
getId in interface Identifiable
Returns:
Long to get

setId

public void setId(java.lang.Long idIn)
Setter for id

Parameters:
idIn - to set

getOrgId

public java.lang.Long getOrgId()
Getter for orgId

Returns:
Long to get

getName

public java.lang.String getName()
Getter for name

Returns:
String to get

setName

public void setName(java.lang.String nameIn)
Setter for name

Parameters:
nameIn - to set

getLabel

public java.lang.String getLabel()
Getter for label

Returns:
String to get

setLabel

public void setLabel(java.lang.String labelIn)
Setter for label

Parameters:
labelIn - to set

getDescription

public java.lang.String getDescription()
Getter for description

Returns:
String to get

setDescription

public void setDescription(java.lang.String descriptionIn)
Setter for description

Parameters:
descriptionIn - to set

getConfigChannelType

public ConfigChannelType getConfigChannelType()
Returns:
Returns the configChannelType.

setConfigChannelType

public void setConfigChannelType(ConfigChannelType configChannelTypeIn)
Parameters:
configChannelTypeIn - The configChannelType to set.

getOrg

public Org getOrg()
Returns:
Returns the org.

setOrg

public void setOrg(Org orgIn)
Parameters:
orgIn - The org to set.

isLocalChannel

public boolean isLocalChannel()
Is this a local (i.e. system) channel?

Returns:
true if local

isGlobalChannel

public boolean isGlobalChannel()
Is this a global channel?

Returns:
true if global

isSandboxChannel

public boolean isSandboxChannel()
Is this a sandbox channel?

Returns:
true if sandbox

getConfigFiles

public java.util.SortedSet<ConfigFile> getConfigFiles()
Returns:
Returns the set of config files associated to this channel.

setConfigFiles

protected void setConfigFiles(java.util.SortedSet cfg)
Setter for list of config files associated to this channel

Parameters:
cfg - to set

getDisplayName

public java.lang.String getDisplayName()
Provide a wrapper that returns a useful, I18N'd, name for a channel - relies on the utility function in ConfigurationFactory.

Returns:
displayable, I18N'd channel name, even for local and sandbox channels

createConfigFile

public ConfigFile createConfigFile(ConfigFileState state,
                                   ConfigFileName cfn)
Creates a configuration file and saves it to the database with the given information. Note: users of the same org do not automatically have access to this file. See rhn_config_channel.get_user_file_access

Parameters:
state - The state of the file (dead or alive)
cfn - The file's path
Returns:
T he newly created ConfigFile

createConfigFile

public ConfigFile createConfigFile(ConfigFileState state,
                                   java.lang.String path)
See createConfigFile(ConfigFileState, ConfigFileName).

Parameters:
state - The state of the file (dead or alive)
path - The path of the file
Returns:
The newly created ConfigFile

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object