com.redhat.rhn.domain.server
Class Server

java.lang.Object
  extended by com.redhat.rhn.domain.BaseDomainHelper
      extended by com.redhat.rhn.domain.server.Server
All Implemented Interfaces:
Identifiable
Direct Known Subclasses:
MonitoredServer, ProxyServer, SatelliteServer

public class Server
extends BaseDomainHelper
implements Identifiable

Server - Class representation of the table rhnServer.


Constructor Summary
protected Server()
          Protected constructor
 
Method Summary
 void addChannel(Channel c)
          Adds the given channel to this Server.
 void addCustomDataValue(CustomDataKey key, java.lang.String value, User user)
          Adds a custom data value to the set of custom data values
 void addCustomDataValue(CustomDataValue value)
          Adds a custom data value to the set of custom data values for this server.
 void addCustomDataValue(java.lang.String keyLabel, java.lang.String value, User user)
          Adds a custom data value to the set of custom data values
 void addDevice(Device device)
          Adds a device to the list of devices for this server.
 void addGuest(VirtualInstance guest)
           
 void addNetwork(Network network)
          Adds a network to the set of networks for this server.
 void addNetworkInterface(NetworkInterface netIn)
          Adds a network interface to the set of network interfaces for this server.
 void addNote(Note note)
          Adds a note to the notes set
 void addNote(User user, java.lang.String subject, java.lang.String body)
          Adds a note to the notes set.
 HostAndGuestCountView asHostAndGuestCountView()
          An adapter method that transforms a Server into a HostAndGuestCountView.
 boolean deleteGuest(VirtualInstance guest)
          Removes the virtual instance guest from this server.
 boolean equals(java.lang.Object other)
          
 java.util.Set getAddOnEntitlements()
          Set of add-on entitlements for the Server.
 java.lang.String getAddOnEntitlementsAsText()
          Returns a comma-delimted list of add-on entitlements with their human readable labels.
 java.lang.String getAutoDeliver()
          Getter for autoDeliver
 java.lang.String getAutoUpdate()
          Getter for autoUpdate
 Channel getBaseChannel()
          Returns the base channel for this server or null if not set.
 Entitlement getBaseEntitlement()
          Base entitlement for the Server.
 java.util.Set<Channel> getChannels()
          Returns the set of Channels this Server is subscribed to.
 java.util.Date getChannelsChanged()
          Getter for channelsChanged
 java.lang.Long getCheckinCount()
          Gets the number of times this server has checked in
 java.util.Set<Channel> getChildChannels()
          Get the Set of Child Channel objects associated with this server.
 java.util.List getConfigChannels()
           
protected  java.util.List getConfigChannelsHibernate()
          ONLY TO BE USED FOR/BY HIBERNATE
 CPU getCpu()
           
 java.util.Date getCreated()
          Gets the current value of created
 User getCreator()
           
 CustomDataValue getCustomDataValue(CustomDataKey key)
          Retrieves a specific CustomDataValue from the customDataValues set
 java.util.Set getCustomDataValues()
           
 java.lang.String getDescription()
          Getter for description
 java.util.Set getDevices()
          Returns the set of devices attached to this server.
 java.lang.String getDigitalServerId()
          Getter for digitalServerId
 Dmi getDmi()
           
 java.util.List getEntitledGroups()
          The set of ServerGroup(s) that this Server is a member of
 java.util.Set<Entitlement> getEntitlements()
          Give a set of the entitlements a server has.
 java.util.Collection<VirtualInstance> getGuests()
          Returns a read-only collection of VirtualInstance objects.
 java.util.Set getHistory()
           
 java.lang.String getHostname()
          Get the primary hostname for this server
 java.lang.Long getId()
          Getter for id
 java.lang.String getInfo()
          Getter for info
 java.lang.String getIpAddress()
          Get the primary ip address for this server
 java.lang.Long getLastBoot()
          Getter for lastBoot
 java.util.Date getLastBootAsDate()
          Getter for lastBoot as a date
 java.util.Date getLastCheckin()
          Gets the last checkin date for this server
protected  java.util.Set getLocalChannels()
           
 ConfigChannel getLocalOverride()
          Retrieves the local override channel associated with this system.
 Location getLocation()
           
 ServerLock getLock()
           
 java.util.List<ManagedServerGroup> getManagedGroups()
          The set of ServerGroup(s) that this Server is a member of
 java.lang.String getName()
          Getter for name
 java.util.Set getNetworkInterfaces()
           
 java.util.Set getNetworks()
           
 java.util.Set getNotes()
           
 Org getOrg()
           
 java.lang.String getOs()
          Getter for os
 java.util.Set getPackages()
           
 ProvisionState getProvisionState()
           
 PushClient getPushClient()
           
 long getRam()
          Returns the total amount of ram for this server.
 java.lang.String getRamString()
          Convenience method for formatting the Ram as a String value.
 java.lang.String getRelease()
          Getter for release
 InstalledPackage getReleasePackage()
          Returns the "Release" package associated to this server This has useful information like the Rhel release, and evr
 java.lang.String getRunningKernel()
          Getter for runningKernel
 ConfigChannel getSandboxOverride()
          Retrieves the sandbox override channel associated with this system.
 java.lang.String getSecret()
          Getter for secret
 ServerArch getServerArch()
           
 ServerInfo getServerInfo()
           
 ServerUuid getServerUuid()
           
 long getSwap()
          Returns the amount of swap for this server.
 java.util.Set getValidAddonEntitlementsForServer()
          Get the Set of valid addon Entitlements for this server.
 VirtualInstance getVirtualInstance()
          Return the virtual instance that owns this server when the server is a virtual guest.
 boolean hasEntitlement(Entitlement entitlement)
          Returns true if the server has the given Entitlement.
 int hashCode()
          
 boolean hasVirtualizationEntitlement()
          Return true if this system has virtualization entitlements, false otherwise.
 boolean isEntitlementAllowed(Entitlement entIn)
          Check to see if the passed in entitlement can be applied to this server.
 boolean isInactive()
          Business method to check if the system is considered 'inactive'
 boolean isProxy()
          Returns true if this is a proxy server.
 boolean isSatellite()
          Returns true if this is a satellite server.
 boolean isSolaris()
          Checks to see if this server is Solaris
 boolean isSubscribed(Channel channelIn)
          Simple check to see if the Server is subscribed to the passed in channel already.
 boolean isVirtualGuest()
          Return true if this a guest system, false otherwise.
 boolean isVirtualHost()
          Return true if this is a virtual host, false otherwise.
 boolean removeGuest(VirtualInstance guest)
          Remove the association between a guest and this server, but do not delete the guest server.
 void setAutoDeliver(java.lang.String autoDeliverIn)
          Setter for autoDeliver
 void setAutoUpdate(java.lang.String autoUpdateIn)
          Setter for autoUpdate
 void setBaseEntitlement(Entitlement baseIn)
          Base entitlement for the Server.
protected  void setChannels(java.util.Set chans)
           
 void setChannelsChanged(java.util.Date channelsChangedIn)
          Setter for channelsChanged
protected  void setConfigChannelsHibernate(java.util.List configChannelsIn)
          ONLY TO BE USED FOR/BY HIBERNATE
 void setCpu(CPU cpuIn)
           
 void setCreated(java.util.Date createdIn)
          Sets the value of created to new value
 void setCreator(User c)
           
 void setCustomDataValues(java.util.Set customDataValuesIn)
           
 void setDescription(java.lang.String descriptionIn)
          Setter for description
protected  void setDevices(java.util.Set devicesIn)
          Sets the set of devices.
 void setDigitalServerId(java.lang.String digitalServerIdIn)
          Setter for digitalServerId
 void setDmi(Dmi dmiIn)
           
 void setHistory(java.util.Set historyIn)
          Set the history events for this server
 void setId(java.lang.Long idIn)
          Setter for id
 void setInfo(java.lang.String infoIn)
          Setter for info
 void setLastBoot(java.lang.Long lastBootIn)
          Setter for lastBoot
protected  void setLocalChannels(java.util.Set chls)
           
 void setLocalOverride(ConfigChannel ch)
           
 void setLocation(Location locationIn)
           
 void setLock(ServerLock lockIn)
           
 void setName(java.lang.String nameIn)
          Setter for name
 void setNetworkInterfaces(java.util.Set n)
           
 void setNetworks(java.util.Set n)
          Sets teh set of networks
 void setNotes(java.util.Set n)
           
 void setOrg(Org o)
           
 void setOs(java.lang.String osIn)
          Setter for os
 void setPackages(java.util.Set packagesIn)
           
 void setProvisionState(ProvisionState p)
           
 void setPushClient(PushClient pushClientIn)
           
 void setRam(long ramIn)
          the total amount of ram for this server.
 void setRelease(java.lang.String releaseIn)
          Setter for release
 void setRunningKernel(java.lang.String runningKernelIn)
          Setter for runningKernel
 void setSandboxOverride(ConfigChannel ch)
           
 void setSecret(java.lang.String secretIn)
          Setter for secret
 void setServerArch(ServerArch s)
           
 void setServerInfo(ServerInfo serverInfoIn)
           
 void setServerUuid(ServerUuid serverUuidIn)
           
 void setSwap(long swapIn)
          the amount of swap for this server.
 void subscribe(ConfigChannel cc)
          subscribes a channel to a system, giving it the highest value for the position (or the lowest priority)
 void subscribeAt(ConfigChannel cc, int position)
          subscribes a channel to a system at the given position
 java.lang.String toString()
          
 boolean unsubscribe(ConfigChannel cc)
           
 
Methods inherited from class com.redhat.rhn.domain.BaseDomainHelper
getModified, setModified
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Server

protected Server()
Protected constructor

Method Detail

getLocalOverride

public ConfigChannel getLocalOverride()
Retrieves the local override channel associated with this system.

Returns:
the Local Override Channel or NULL if theres none created yet in rhnServerConfigChannel

setLocalOverride

public void setLocalOverride(ConfigChannel ch)
Parameters:
ch - Override channel to set

setLocalChannels

protected void setLocalChannels(java.util.Set chls)

getLocalChannels

protected java.util.Set getLocalChannels()

getSandboxOverride

public ConfigChannel getSandboxOverride()
Retrieves the sandbox override channel associated with this system.

Returns:
the Sandbox Override Channel or NULL if theres none created yet in rhnServerConfigChannel

setSandboxOverride

public void setSandboxOverride(ConfigChannel ch)
Parameters:
ch - sets the sandbox override channel

setConfigChannelsHibernate

protected void setConfigChannelsHibernate(java.util.List configChannelsIn)
ONLY TO BE USED FOR/BY HIBERNATE

Parameters:
configChannelsIn - The configChannels to set.

getConfigChannelsHibernate

protected java.util.List getConfigChannelsHibernate()
ONLY TO BE USED FOR/BY HIBERNATE

Returns:
List of config channels

getConfigChannels

public java.util.List getConfigChannels()
Returns:
Returns the ServerConfigChannels mappings.

subscribe

public void subscribe(ConfigChannel cc)
subscribes a channel to a system, giving it the highest value for the position (or the lowest priority)

Parameters:
cc - The config channel to subscribe to

subscribeAt

public void subscribeAt(ConfigChannel cc,
                        int position)
subscribes a channel to a system at the given position

Parameters:
cc - the channel to subscribe
position - the positon/ranking of the channel in the system list, must be > 0

unsubscribe

public boolean unsubscribe(ConfigChannel cc)
Parameters:
cc - the ConfigChannel to unsubscribe
Returns:
returns true if the remove operation succeeded

getServerInfo

public ServerInfo getServerInfo()
Returns:
Returns the serverInfo.

setServerInfo

public void setServerInfo(ServerInfo serverInfoIn)
Parameters:
serverInfoIn - The serverInfo to set.

getLastCheckin

public java.util.Date getLastCheckin()
Gets the last checkin date for this server

Returns:
last checkin date

getCheckinCount

public java.lang.Long getCheckinCount()
Gets the number of times this server has checked in

Returns:
number of times this server has checked in.

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

getOrg

public Org getOrg()
Returns:
Returns the org.

setOrg

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

getDigitalServerId

public java.lang.String getDigitalServerId()
Getter for digitalServerId

Returns:
String to get

setDigitalServerId

public void setDigitalServerId(java.lang.String digitalServerIdIn)
Setter for digitalServerId

Parameters:
digitalServerIdIn - to set

getOs

public java.lang.String getOs()
Getter for os

Returns:
String to get

setOs

public void setOs(java.lang.String osIn)
Setter for os

Parameters:
osIn - to set

getRelease

public java.lang.String getRelease()
Getter for release

Returns:
String to get

setRelease

public void setRelease(java.lang.String releaseIn)
Setter for release

Parameters:
releaseIn - to set

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

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

getInfo

public java.lang.String getInfo()
Getter for info

Returns:
String to get

setInfo

public void setInfo(java.lang.String infoIn)
Setter for info

Parameters:
infoIn - to set

getSecret

public java.lang.String getSecret()
Getter for secret

Returns:
String to get

setSecret

public void setSecret(java.lang.String secretIn)
Setter for secret

Parameters:
secretIn - to set

getCreator

public User getCreator()
Returns:
Returns the creator.

setCreator

public void setCreator(User c)
Parameters:
c - The creator to set.

getAutoDeliver

public java.lang.String getAutoDeliver()
Getter for autoDeliver

Returns:
String to get

setAutoDeliver

public void setAutoDeliver(java.lang.String autoDeliverIn)
Setter for autoDeliver

Parameters:
autoDeliverIn - to set

getAutoUpdate

public java.lang.String getAutoUpdate()
Getter for autoUpdate

Returns:
String to get

setAutoUpdate

public void setAutoUpdate(java.lang.String autoUpdateIn)
Setter for autoUpdate

Parameters:
autoUpdateIn - to set

getRunningKernel

public java.lang.String getRunningKernel()
Getter for runningKernel

Returns:
String to get

setRunningKernel

public void setRunningKernel(java.lang.String runningKernelIn)
Setter for runningKernel

Parameters:
runningKernelIn - to set

getLastBoot

public java.lang.Long getLastBoot()
Getter for lastBoot

Returns:
Long to get

getLastBootAsDate

public java.util.Date getLastBootAsDate()
Getter for lastBoot as a date

Returns:
lastBoot time as a Date object

setLastBoot

public void setLastBoot(java.lang.Long lastBootIn)
Setter for lastBoot

Parameters:
lastBootIn - to set

getServerArch

public ServerArch getServerArch()
Returns:
Returns the serverArch.

setServerArch

public void setServerArch(ServerArch s)
Parameters:
s - The serverArch to set.

getProvisionState

public ProvisionState getProvisionState()
Returns:
Returns the provisionState.

setProvisionState

public void setProvisionState(ProvisionState p)
Parameters:
p - The provisionState to set.

getChannelsChanged

public java.util.Date getChannelsChanged()
Getter for channelsChanged

Returns:
Date to get

setChannelsChanged

public void setChannelsChanged(java.util.Date channelsChangedIn)
Setter for channelsChanged

Parameters:
channelsChangedIn - to set

getEntitledGroups

public java.util.List getEntitledGroups()
The set of ServerGroup(s) that this Server is a member of

Returns:
Returns the serverGroups.

getManagedGroups

public java.util.List<ManagedServerGroup> getManagedGroups()
The set of ServerGroup(s) that this Server is a member of

Returns:
Returns the serverGroups.

getDevices

public java.util.Set getDevices()
Returns the set of devices attached to this server.

Returns:
Returns the list of devices attached to this server.

setDevices

protected void setDevices(java.util.Set devicesIn)
Sets the set of devices.

Parameters:
devicesIn - The devices to set.

addDevice

public void addDevice(Device device)
Adds a device to the list of devices for this server.

Parameters:
device - Device to add

getNotes

public java.util.Set getNotes()
Returns:
Returns the notes.

setNotes

public void setNotes(java.util.Set n)
Parameters:
n - The notes to set.

addNote

public void addNote(Note note)
Adds a note to the notes set

Parameters:
note - The note to add

addNote

public void addNote(User user,
                    java.lang.String subject,
                    java.lang.String body)
Adds a note to the notes set.

Parameters:
user - The user creating the note
subject - The subject for the note
body - The body for the note

getNetworks

public java.util.Set getNetworks()
Returns:
Returns the networks

setNetworks

public void setNetworks(java.util.Set n)
Sets teh set of networks

Parameters:
n - The networks to set

addNetwork

public void addNetwork(Network network)
Adds a network to the set of networks for this server.

Parameters:
network - The network to add.

getIpAddress

public java.lang.String getIpAddress()
Get the primary ip address for this server

Returns:
Returns the primary ip for this server

getHostname

public java.lang.String getHostname()
Get the primary hostname for this server

Returns:
Returns the primary hostname for this server

getNetworkInterfaces

public java.util.Set getNetworkInterfaces()
Returns:
Returns the networkInterfaces.

setNetworkInterfaces

public void setNetworkInterfaces(java.util.Set n)
Parameters:
n - The networkInterfaces to set.

addNetworkInterface

public void addNetworkInterface(NetworkInterface netIn)
Adds a network interface to the set of network interfaces for this server.

Parameters:
netIn - The NetworkInterface to add

getRam

public long getRam()
Returns the total amount of ram for this server.

Returns:
the total amount of ram for this server.

getRamString

public java.lang.String getRamString()
Convenience method for formatting the Ram as a String value.

Returns:
String of RAM.

setRam

public void setRam(long ramIn)
the total amount of ram for this server.

Parameters:
ramIn - The ram to set.

getSwap

public long getSwap()
Returns the amount of swap for this server.

Returns:
the amount of swap for this server.

setSwap

public void setSwap(long swapIn)
the amount of swap for this server.

Parameters:
swapIn - the amount of swap for this server.

getCpu

public CPU getCpu()
Returns:
Returns the cpu.

setCpu

public void setCpu(CPU cpuIn)
Parameters:
cpuIn - The cpu to set.

getDmi

public Dmi getDmi()
Returns:
Returns the dmi.

setDmi

public void setDmi(Dmi dmiIn)
Parameters:
dmiIn - The dmi to set.

getLocation

public Location getLocation()
Returns:
Returns the serverLocation associated with the server.

setLocation

public void setLocation(Location locationIn)
Parameters:
locationIn - Location to associate with the server.

getCustomDataValues

public java.util.Set getCustomDataValues()
Returns:
Returns the customDataValues.

setCustomDataValues

public void setCustomDataValues(java.util.Set customDataValuesIn)
Parameters:
customDataValuesIn - The customDataValues to set.

addCustomDataValue

public void addCustomDataValue(CustomDataValue value)
Adds a custom data value to the set of custom data values for this server.

Parameters:
value - The CustomDataValue to add

addCustomDataValue

public void addCustomDataValue(CustomDataKey key,
                               java.lang.String value,
                               User user)
Adds a custom data value to the set of custom data values

Parameters:
key - The CustomDataKey for this value
value - The value to set
user - The user doing the setting

addCustomDataValue

public void addCustomDataValue(java.lang.String keyLabel,
                               java.lang.String value,
                               User user)
Adds a custom data value to the set of custom data values

Parameters:
keyLabel - The label for the CustomDataKey for this value
value - The value to set
user - The user doing the setting

getCustomDataValue

public CustomDataValue getCustomDataValue(CustomDataKey key)
Retrieves a specific CustomDataValue from the customDataValues set

Parameters:
key - The Key for the value you're looking up
Returns:
Returns a CustomDataValue if it exists for this server. null otherwise.

getChannels

public java.util.Set<Channel> getChannels()
Returns the set of Channels this Server is subscribed to.

Returns:
the set of Channels this Server is subscribed to.

setChannels

protected void setChannels(java.util.Set chans)

addChannel

public void addChannel(Channel c)
Adds the given channel to this Server.

Parameters:
c - Channel to be added.

getBaseChannel

public Channel getBaseChannel()
Returns the base channel for this server or null if not set.

Returns:
Returns the base channel for this server or null if not set.

isSolaris

public boolean isSolaris()
Checks to see if this server is Solaris

Returns:
Returns true if System is Solaris.

isSatellite

public boolean isSatellite()
Returns true if this is a satellite server.

Returns:
true if this is a satellite server.

isProxy

public boolean isProxy()
Returns true if this is a proxy server.

Returns:
true if this is a proxy server.

hasEntitlement

public boolean hasEntitlement(Entitlement entitlement)
Returns true if the server has the given Entitlement.

Parameters:
entitlement - Entitlement to verify.
Returns:
true if the server has the given Entitlement.

getEntitlements

public java.util.Set<Entitlement> getEntitlements()
Give a set of the entitlements a server has. This is entirely based on the server groups, but server groups also contain user defined groups.

Returns:
a set of Entitlement objects

getBaseEntitlement

public Entitlement getBaseEntitlement()
Base entitlement for the Server.

Returns:
Entitlement that is the base entitlement for the server

setBaseEntitlement

public void setBaseEntitlement(Entitlement baseIn)
Base entitlement for the Server.

Parameters:
baseIn - to update to

getAddOnEntitlements

public java.util.Set getAddOnEntitlements()
Set of add-on entitlements for the Server.

Returns:
Set of entitlements that are add-on entitlements for the server

getAddOnEntitlementsAsText

public java.lang.String getAddOnEntitlementsAsText()
Returns a comma-delimted list of add-on entitlements with their human readable labels.

Returns:
A comma-delimted list of add-on entitlements with their human readable labels.

isVirtualHost

public boolean isVirtualHost()
Return true if this is a virtual host, false otherwise. If this is a host system, getVirtualInstance() will always be null since we are not supporting/implementing guests of guest in the RHN 500 release.

Returns:
true if the system is a virtual host

isVirtualGuest

public boolean isVirtualGuest()
Return true if this a guest system, false otherwise. If this system is a guest, getVirtualInstance() will be non-null.

Returns:
true if this a guest system, false otherwise.

hasVirtualizationEntitlement

public boolean hasVirtualizationEntitlement()
Return true if this system has virtualization entitlements, false otherwise.

Returns:
true if this system has virtualization entitlements, false otherwise.

getGuests

public java.util.Collection<VirtualInstance> getGuests()
Returns a read-only collection of VirtualInstance objects.

Returns:
A read-only collection of VirtualInstance objects.

addGuest

public void addGuest(VirtualInstance guest)
Parameters:
guest - the guest to add

deleteGuest

public boolean deleteGuest(VirtualInstance guest)
Removes the virtual instance guest from this server. If the guest is registered, then the guest server will be deleted from the virtual instance.

Parameters:
guest - The virtual instance to delete
Returns:
true if the guest is deleted, false otherwise.

removeGuest

public boolean removeGuest(VirtualInstance guest)
Remove the association between a guest and this server, but do not delete the guest server.

Parameters:
guest - Guest to remove from this server.
Returns:
true if the guest is deleted, false otherwise.

getVirtualInstance

public VirtualInstance getVirtualInstance()
Return the virtual instance that owns this server when the server is a virtual guest.

Returns:
The virtual instance that owns this server when the server is a virtual guest. If the server is not a guest, the method returns null.

equals

public boolean equals(java.lang.Object other)

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

getCreated

public java.util.Date getCreated()
Description copied from class: BaseDomainHelper
Gets the current value of created

Overrides:
getCreated in class BaseDomainHelper
Returns:
Returns the created.

setCreated

public void setCreated(java.util.Date createdIn)
Description copied from class: BaseDomainHelper
Sets the value of created to new value

Overrides:
setCreated in class BaseDomainHelper
Parameters:
createdIn - The created to set.

getLock

public ServerLock getLock()
Returns:
Returns the lock.

setLock

public void setLock(ServerLock lockIn)
Parameters:
lockIn - The lock to set.

getServerUuid

public ServerUuid getServerUuid()
Returns:
Returns the uuid.

setServerUuid

public void setServerUuid(ServerUuid serverUuidIn)
Parameters:
serverUuidIn - The uuid to set.

isInactive

public boolean isInactive()
Business method to check if the system is considered 'inactive'

Returns:
boolean if it hasn't checked in recently.

getChildChannels

public java.util.Set<Channel> getChildChannels()
Get the Set of Child Channel objects associated with this server. This is just a convenience method. Basically the channels associated with this server that are not base channels.

Returns:
Set of Child Channels. null of none found.

getPushClient

public PushClient getPushClient()
Returns:
The push client for this server.

setPushClient

public void setPushClient(PushClient pushClientIn)
Parameters:
pushClientIn - The push client to be used for this server.

isSubscribed

public boolean isSubscribed(Channel channelIn)
Simple check to see if the Server is subscribed to the passed in channel already.

Parameters:
channelIn - to check
Returns:
boolean true false if subbed or not.

isEntitlementAllowed

public boolean isEntitlementAllowed(Entitlement entIn)
Check to see if the passed in entitlement can be applied to this server.

Parameters:
entIn - to check
Returns:
boolean if its compatible with this server.

getValidAddonEntitlementsForServer

public java.util.Set getValidAddonEntitlementsForServer()
Get the Set of valid addon Entitlements for this server.

Returns:
Set of valid addon Entitlement instances for this server

asHostAndGuestCountView

public HostAndGuestCountView asHostAndGuestCountView()
An adapter method that transforms a Server into a HostAndGuestCountView.

Returns:
A HostAndGuestCountView from which the Server was transformed

getHistory

public java.util.Set getHistory()
Returns:
this list of history events for this server

setHistory

public void setHistory(java.util.Set historyIn)
Set the history events for this server

Parameters:
historyIn - the List of history events

getPackages

public java.util.Set getPackages()
Returns:
Returns the packages.

setPackages

public void setPackages(java.util.Set packagesIn)
Parameters:
packagesIn - The packages to set.

getReleasePackage

public InstalledPackage getReleasePackage()
Returns the "Release" package associated to this server This has useful information like the Rhel release, and evr

Returns:
the Redhat release Installed Package