|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redhat.rhn.domain.BaseDomainHelper
com.redhat.rhn.domain.server.Server
public class Server
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 |
|---|
protected Server()
| Method Detail |
|---|
public ConfigChannel getLocalOverride()
public void setLocalOverride(ConfigChannel ch)
ch - Override channel to setprotected void setLocalChannels(java.util.Set chls)
protected java.util.Set getLocalChannels()
public ConfigChannel getSandboxOverride()
public void setSandboxOverride(ConfigChannel ch)
ch - sets the sandbox override channelprotected void setConfigChannelsHibernate(java.util.List configChannelsIn)
configChannelsIn - The configChannels to set.protected java.util.List getConfigChannelsHibernate()
public java.util.List getConfigChannels()
public void subscribe(ConfigChannel cc)
cc - The config channel to subscribe to
public void subscribeAt(ConfigChannel cc,
int position)
cc - the channel to subscribeposition - the positon/ranking of the channel in the system list,
must be > 0public boolean unsubscribe(ConfigChannel cc)
cc - the ConfigChannel to unsubscribe
public ServerInfo getServerInfo()
public void setServerInfo(ServerInfo serverInfoIn)
serverInfoIn - The serverInfo to set.public java.util.Date getLastCheckin()
public java.lang.Long getCheckinCount()
public java.lang.Long getId()
getId in interface Identifiablepublic void setId(java.lang.Long idIn)
idIn - to setpublic Org getOrg()
public void setOrg(Org o)
o - The org to set.public java.lang.String getDigitalServerId()
public void setDigitalServerId(java.lang.String digitalServerIdIn)
digitalServerIdIn - to setpublic java.lang.String getOs()
public void setOs(java.lang.String osIn)
osIn - to setpublic java.lang.String getRelease()
public void setRelease(java.lang.String releaseIn)
releaseIn - to setpublic java.lang.String getName()
public void setName(java.lang.String nameIn)
nameIn - to setpublic java.lang.String getDescription()
public void setDescription(java.lang.String descriptionIn)
descriptionIn - to setpublic java.lang.String getInfo()
public void setInfo(java.lang.String infoIn)
infoIn - to setpublic java.lang.String getSecret()
public void setSecret(java.lang.String secretIn)
secretIn - to setpublic User getCreator()
public void setCreator(User c)
c - The creator to set.public java.lang.String getAutoDeliver()
public void setAutoDeliver(java.lang.String autoDeliverIn)
autoDeliverIn - to setpublic java.lang.String getAutoUpdate()
public void setAutoUpdate(java.lang.String autoUpdateIn)
autoUpdateIn - to setpublic java.lang.String getRunningKernel()
public void setRunningKernel(java.lang.String runningKernelIn)
runningKernelIn - to setpublic java.lang.Long getLastBoot()
public java.util.Date getLastBootAsDate()
public void setLastBoot(java.lang.Long lastBootIn)
lastBootIn - to setpublic ServerArch getServerArch()
public void setServerArch(ServerArch s)
s - The serverArch to set.public ProvisionState getProvisionState()
public void setProvisionState(ProvisionState p)
p - The provisionState to set.public java.util.Date getChannelsChanged()
public void setChannelsChanged(java.util.Date channelsChangedIn)
channelsChangedIn - to setpublic java.util.List getEntitledGroups()
public java.util.List<ManagedServerGroup> getManagedGroups()
public java.util.Set getDevices()
protected void setDevices(java.util.Set devicesIn)
devicesIn - The devices to set.public void addDevice(Device device)
device - Device to addpublic java.util.Set getNotes()
public void setNotes(java.util.Set n)
n - The notes to set.public void addNote(Note note)
note - The note to add
public void addNote(User user,
java.lang.String subject,
java.lang.String body)
user - The user creating the notesubject - The subject for the notebody - The body for the notepublic java.util.Set getNetworks()
public void setNetworks(java.util.Set n)
n - The networks to setpublic void addNetwork(Network network)
network - The network to add.public java.lang.String getIpAddress()
public java.lang.String getHostname()
public java.util.Set getNetworkInterfaces()
public void setNetworkInterfaces(java.util.Set n)
n - The networkInterfaces to set.public void addNetworkInterface(NetworkInterface netIn)
netIn - The NetworkInterface to addpublic long getRam()
public java.lang.String getRamString()
public void setRam(long ramIn)
ramIn - The ram to set.public long getSwap()
public void setSwap(long swapIn)
swapIn - the amount of swap for this server.public CPU getCpu()
public void setCpu(CPU cpuIn)
cpuIn - The cpu to set.public Dmi getDmi()
public void setDmi(Dmi dmiIn)
dmiIn - The dmi to set.public Location getLocation()
public void setLocation(Location locationIn)
locationIn - Location to associate with the server.public java.util.Set getCustomDataValues()
public void setCustomDataValues(java.util.Set customDataValuesIn)
customDataValuesIn - The customDataValues to set.public void addCustomDataValue(CustomDataValue value)
value - The CustomDataValue to add
public void addCustomDataValue(CustomDataKey key,
java.lang.String value,
User user)
key - The CustomDataKey for this valuevalue - The value to setuser - The user doing the setting
public void addCustomDataValue(java.lang.String keyLabel,
java.lang.String value,
User user)
keyLabel - The label for the CustomDataKey for this valuevalue - The value to setuser - The user doing the settingpublic CustomDataValue getCustomDataValue(CustomDataKey key)
key - The Key for the value you're looking up
public java.util.Set<Channel> getChannels()
protected void setChannels(java.util.Set chans)
public void addChannel(Channel c)
c - Channel to be added.public Channel getBaseChannel()
public boolean isSolaris()
public boolean isSatellite()
public boolean isProxy()
public boolean hasEntitlement(Entitlement entitlement)
entitlement - Entitlement to verify.
public java.util.Set<Entitlement> getEntitlements()
public Entitlement getBaseEntitlement()
public void setBaseEntitlement(Entitlement baseIn)
baseIn - to update topublic java.util.Set getAddOnEntitlements()
public java.lang.String getAddOnEntitlementsAsText()
public boolean isVirtualHost()
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.
public boolean isVirtualGuest()
true if this a guest system, false otherwise. If
this system is a guest, getVirtualInstance() will be non-null.
true if this a guest system, false otherwise.public boolean hasVirtualizationEntitlement()
true if this system has virtualization entitlements,
false otherwise.
true if this system has virtualization entitlements,
false otherwise.public java.util.Collection<VirtualInstance> getGuests()
public void addGuest(VirtualInstance guest)
guest - the guest to addpublic boolean deleteGuest(VirtualInstance guest)
guest - The virtual instance to delete
true if the guest is deleted, false otherwise.public boolean removeGuest(VirtualInstance guest)
guest - Guest to remove from this server.
true if the guest is deleted, false otherwise.public VirtualInstance getVirtualInstance()
null.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Date getCreated()
BaseDomainHelper
getCreated in class BaseDomainHelperpublic void setCreated(java.util.Date createdIn)
BaseDomainHelper
setCreated in class BaseDomainHelpercreatedIn - The created to set.public ServerLock getLock()
public void setLock(ServerLock lockIn)
lockIn - The lock to set.public ServerUuid getServerUuid()
public void setServerUuid(ServerUuid serverUuidIn)
serverUuidIn - The uuid to set.public boolean isInactive()
public java.util.Set<Channel> getChildChannels()
public PushClient getPushClient()
public void setPushClient(PushClient pushClientIn)
pushClientIn - The push client to be used for this server.public boolean isSubscribed(Channel channelIn)
channelIn - to check
public boolean isEntitlementAllowed(Entitlement entIn)
entIn - to check
public java.util.Set getValidAddonEntitlementsForServer()
public HostAndGuestCountView asHostAndGuestCountView()
public java.util.Set getHistory()
public void setHistory(java.util.Set historyIn)
historyIn - the List of history eventspublic java.util.Set getPackages()
public void setPackages(java.util.Set packagesIn)
packagesIn - The packages to set.public InstalledPackage getReleasePackage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||