com.friendshipsystems.fsshresourcemanager.config
Class FApplication

java.lang.Object
  extended by com.friendshipsystems.fsshresourcemanager.utils.FDBObject
      extended by com.friendshipsystems.fsshresourcemanager.config.FApplication

public class FApplication
extends com.friendshipsystems.fsshresourcemanager.utils.FDBObject

Class that represents the configured applications

Author:
FRIENDSHIP SYSTEMS

Constructor Summary
FApplication()
           
FApplication(java.lang.String name, int reqLics, int reqCpus, java.lang.String description, java.lang.Boolean needsX)
           
 
Method Summary
 void addHost(FHost host)
           
static FApplication getApplication(int id)
          Returns a specific application identified by its database id
static java.util.List<FApplication> getApplications()
          Returns a list of all configured applications
 java.lang.String getDescription()
           
 FFloatingLicense getFloat()
           
 java.util.Set<FHost> getHosts()
           
 FHost getHostX()
           
 java.lang.Integer getHostXPortIndex()
           
 int getId()
           
 java.lang.Integer getMinMem()
           
 java.lang.String getName()
           
 java.lang.Boolean getNeedsX()
           
 int getRequiredLicenses()
           
 int getRequiredProcessors()
           
 void removeHost(FHost host)
           
 void setDescription(java.lang.String description)
           
 void setFloat(FFloatingLicense fLic)
           
 void setHostX(FHost xHost)
           
 void setHostXPortIndex(java.lang.Integer xHostPortIndex)
           
 void setMinMem(java.lang.Integer minMem)
           
 void setName(java.lang.String name)
           
 void setNeedsX(java.lang.Boolean needsX)
           
 void setRequiredLicenses(int requiredLicenses)
           
 void setRequiredProcessors(int requiredProcessors)
           
 java.util.Map<java.lang.String,java.lang.Object> toMap()
           
 
Methods inherited from class com.friendshipsystems.fsshresourcemanager.utils.FDBObject
delete, save, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FApplication

public FApplication()

FApplication

public FApplication(java.lang.String name,
                    int reqLics,
                    int reqCpus,
                    java.lang.String description,
                    java.lang.Boolean needsX)
Method Detail

getApplications

public static java.util.List<FApplication> getApplications()
Returns a list of all configured applications

Returns:

getApplication

public static FApplication getApplication(int id)
Returns a specific application identified by its database id

Parameters:
id -
Returns:

toMap

public java.util.Map<java.lang.String,java.lang.Object> toMap()
Specified by:
toMap in class com.friendshipsystems.fsshresourcemanager.utils.FDBObject

getId

public int getId()
Returns:
the id

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getName

public java.lang.String getName()
Returns:
the name

setRequiredLicenses

public void setRequiredLicenses(int requiredLicenses)
Parameters:
requiredLicenses - the requiredLicenses to set

getRequiredLicenses

public int getRequiredLicenses()
Returns:
the requiredLicenses

setRequiredProcessors

public void setRequiredProcessors(int requiredProcessors)
Parameters:
requiredProcessors - the requiredProcessors to set

getRequiredProcessors

public int getRequiredProcessors()
Returns:
the requiredProcessors

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

getDescription

public java.lang.String getDescription()
Returns:
the description

setNeedsX

public void setNeedsX(java.lang.Boolean needsX)
Parameters:
needsX - the needsX to set

getNeedsX

public java.lang.Boolean getNeedsX()
Returns:
the needsX

setFloat

public void setFloat(FFloatingLicense fLic)
Parameters:
fLic - the FFloatingLicense to set

getFloat

public FFloatingLicense getFloat()
Returns:
the floatId

getHosts

public java.util.Set<FHost> getHosts()
Returns:
the hosts

addHost

public void addHost(FHost host)

removeHost

public void removeHost(FHost host)

setHostX

public void setHostX(FHost xHost)
Parameters:
xHost - the xHost to set

getHostX

public FHost getHostX()
Returns:
the xHost

setHostXPortIndex

public void setHostXPortIndex(java.lang.Integer xHostPortIndex)
Parameters:
xHostPortIndex - the xHostPortIndex to set

getHostXPortIndex

public java.lang.Integer getHostXPortIndex()
Returns:
the xHostPortIndex

setMinMem

public void setMinMem(java.lang.Integer minMem)
Parameters:
minMem - the minMem to set

getMinMem

public java.lang.Integer getMinMem()
Returns:
the minMem