com.friendshipsystems.fsshresourcemanager
Class FSshResourceManager

java.lang.Object
  extended by com.friendshipsystems.fsshresourcemanager.FSshResourceManager
All Implemented Interfaces:
FIResourceManager

public class FSshResourceManager
extends java.lang.Object
implements FIResourceManager

The xml-rpc handler class that implements the FIResourceManager interface. All handler objects share one common internal state represented by the FSshResourceManagerState class.

Author:
FRIENDSHIP SYSTEMS

Constructor Summary
FSshResourceManager()
           
 
Method Summary
 int addApplication(java.lang.String appName, int requiredLicenses, int requiredProcessors, java.lang.String description, java.lang.Boolean needsX)
           
 java.lang.Boolean addAppToHost(int hostId, int appId, java.lang.String pathToExe, int numberOfHardLics, int prio)
           
 int addFloatingLicense(int number, java.lang.String name)
           
 int addFloatingLicenseWithApp(int appId, int number, java.lang.String name)
           
 int addHost(java.lang.String hostName, int numberOfProcessors, int mbMemory, int osId, java.lang.Boolean isActive, java.lang.Boolean supportsX)
           
 int addHost(java.lang.String hostName, int port, int numberOfProcessors, int mbMemory, int osId, java.lang.String tempDir, java.lang.String sftpRoot, java.lang.Boolean isActive, java.lang.Boolean supportsX, java.lang.String xPort)
           
 int addHost(java.lang.String hostName, int numberOfProcessors, int mbMemory, int osId, java.lang.String tempDir, java.lang.Boolean isActive, java.lang.Boolean supportsX)
           
 int addHost(java.lang.String hostName, int numberOfProcessors, int mbMemory, int osId, java.lang.String tempDir, java.lang.String sftpRoot, java.lang.Boolean isActive, java.lang.Boolean supportsX)
           
 java.lang.Boolean addHostToKnownHosts(int hostId, java.lang.String hostName, java.lang.String type, java.lang.String fingerPrint)
          Confirms the fingerprint of a host
 java.lang.String addJobCanceler(int osId, java.lang.String code, java.lang.String className)
           
 int addOS(java.lang.String name, int parentOsId)
           
 int addOS(java.lang.String name, int parentOsId, java.lang.String chdirCommand)
           
 int addOS(java.lang.String name, int parentOsId, java.lang.String chdirCommand, java.lang.String pathDelimiter)
           
 int addOS(java.lang.String name, int parentOsId, java.lang.String chdirCommand, java.lang.String pathDelimiter, java.lang.String cancelerClass)
           
 int addUser(java.lang.String userName, java.lang.String password, int role)
           
 int addUser(java.lang.String userName, java.lang.String password, int role, java.lang.String email)
           
 java.lang.Boolean blockSchedule()
          Blocks the schedule for new jobs from the current client
 java.lang.Boolean blockSchedule(java.lang.String address)
          Blocks the schedule for new jobs from the given address
 java.lang.Boolean cancelJob(java.lang.String jobID)
          Cancels the job with the given id
 java.lang.Boolean changeFloatingLicenseName(int floatId, java.lang.String name)
           
 java.lang.Boolean changeFloatingLicenseNumber(int floatId, int number)
           
 java.lang.Boolean changeHostsOS(int oldOSId, int newOSId)
           
 java.lang.Boolean changeOSChdirCommand(int osId, java.lang.String chdirCommand)
           
 java.lang.Boolean changeOSJobCanceler(int osId, java.lang.String className)
           
 java.lang.Boolean changeOSName(int osId, java.lang.String newName)
           
 java.lang.Boolean changeOSParent(int osId, int parentOsId)
           
 java.lang.Boolean changeOSParents(int oldParentId, int newParentId)
           
 java.lang.Boolean changeOSPathDelimiter(int osId, java.lang.String pathDelimiter)
           
 java.lang.Boolean changeUserEmail(int id, java.lang.String email)
           
 java.lang.Boolean changeUserPass(int id, java.lang.String newPass)
           
 java.lang.Boolean changeUserPassByName(java.lang.String id, java.lang.String oldPass, java.lang.String newPass)
           
 java.lang.Boolean changeUserRole(int id, int role)
           
 java.util.Map<java.lang.String,java.lang.Object> checkAuth(java.lang.String userName, java.lang.String pass)
          Checks whether the passed username and password is a valid login for the SshResourceManager
 java.lang.Boolean checkHostKnown(int hostId)
          Checks whether the host identified by the given id is a known host
 java.lang.Boolean cleanUp()
           
 java.lang.Boolean clearFinishedJobs()
          Clears the list of finished jobs
 java.lang.Boolean cloneAllAppsFromHostToHost(int from, int to)
           
 java.lang.Boolean cloneAppsFromHostToHost(int from, int to, java.lang.Object[] appIds)
           
 java.lang.Boolean commit()
           
 java.lang.Boolean confirmOutputFilesReceived(java.lang.String jobID)
          called to confirm that the result files for the given job were successfully received and can be deleted
 int countCurrentRunningJobs()
          Returns the number of currently running jobs
 int countCurrentWaitingJobs()
          Returns the number of currently queued jobs
 java.lang.Boolean deleteUser(int id)
           
 java.util.Map<java.lang.String,java.lang.Object> getActiveApplications()
           
 java.util.Map<java.lang.String,java.lang.Object> getActiveApplications(int withAuth)
           
 java.util.Map<java.lang.String,java.lang.Object> getApplicationById(int appId)
           
 java.util.Map<java.lang.String,java.lang.Object> getApplicationByName(java.lang.String name)
           
 java.util.Map<java.lang.String,java.lang.Object> getApplicationInfoForHost(int appId, int hostId)
           
 java.lang.Object[] getApplications()
           
 java.lang.Object[] getApplicationsByFloatId(int floatId)
           
 java.lang.Object[] getApplicationsByHost(int hostId)
           
 java.util.Map<java.lang.String,java.lang.Object> getAppState()
          The state of configured applications
 java.lang.String getCancelerCode(java.lang.String className)
           
 java.util.Map<java.lang.String,java.lang.Object> getFloatingLicense(int floatId)
           
 java.util.Map<java.lang.String,java.lang.Object> getFloatingLicenseForApp(int appId)
           
 java.lang.Object[] getFloatingLicenses()
           
 int getFloatingLicNumberForApp(int appId)
          Returns the number of floating licenses for an application
 java.util.Map<java.lang.String,java.lang.Object> getHostById(int hostId)
           
 java.util.Map<java.lang.String,java.lang.Object> getHostByName(java.lang.String hostName)
           
 int getHostCpus(java.util.List<java.lang.String> list)
          Returns the total number of cpus for the given hosts
 java.util.Map<java.lang.String,java.lang.Object> getHostInfo(int hostId)
          Returns the host information (fingerprint) of a host
 int getHostLockedCpus(java.util.List<java.lang.String> list)
          Returns the number of locked CPUs for the given hosts
 java.lang.Object[] getHosts()
           
 java.lang.Object[] getHostsByApplication(int appId)
           
 java.lang.Object[] getHostsByOS(int osId)
           
 java.lang.Object[] getHostsByOSParent(int parentOsId)
           
 java.lang.Object[] getHostsByOSParent(int parentOsId, java.lang.Boolean recursive)
           
 java.lang.Object[] getHostsByXSupport(java.lang.Boolean supportsX)
           
 java.util.Map<java.lang.String,java.lang.Object> getHostState()
          The state of configured hosts
 java.lang.Object[] getJobCancelerImplementations()
           
 byte[] getJobOutput(java.lang.String jobId)
          Returns the console output of a job
 java.util.Map<java.lang.String,java.lang.Object> getJobState(java.lang.String caller)
          The state of all jobs (queued, running and finished)
 int getJobState(java.lang.String jobId, int taskIndex)
          Returns the state of the task with the given index in the job identified by the given id
 int getMaxSimultaneousJobs()
          Returns the maximum number of jobs running at the same time
 int getNumberOfFloatingLicensesForApp(int appId)
           
 java.util.Map<java.lang.String,java.lang.Object> getOperatingSystemById(int osId)
           
 java.lang.Object[] getOperatingSystems()
           
 java.lang.Object[] getOperatingSystemsByParentId(int parentOsId)
           
 java.lang.Object[] getOperatingSystemsByParentId(int parentOsId, java.lang.Boolean recursive)
           
 java.util.Map<java.lang.String,byte[]> getPublicKey()
          The public RSA key of the SshResourceManager
 java.lang.Object[] getRoles()
           
 java.util.Map<java.lang.String,java.lang.Object> getSchedulerState()
          The Scheduler State
 java.util.Map<java.lang.String,java.lang.Object> getState(java.lang.String caller)
          Returns the full state of the SshResourceManager, including Jobs, Apps, Hosts, Blocking state, Users...
 java.util.Map<java.lang.String,java.lang.Object> getUser(int id)
           
 java.util.Map<java.lang.String,java.lang.Object> getUserByName(java.lang.String name)
           
 java.lang.Object[] getUsers()
           
 java.lang.Object[] getUsersByRole(int role)
           
 java.util.Map<java.lang.String,java.lang.Object> getUserState()
          The state of configured users
 java.lang.Object[] getXHosts()
           
 java.lang.Boolean globalScheduleBlock()
          Blocks the scheduling of all jobs
 java.lang.Boolean globalScheduleUnblock()
          Releases the global block of scheduling
 java.lang.Boolean hasDefaultXForward()
           
 void init(FSshResourceManagerState state)
           
 int isHostLocked(java.util.List<java.lang.String> list)
          Returns whether the hosts with the given hostinfo are locked
 java.lang.Boolean lockHost(java.util.List<java.lang.String> list)
          Locks hosts matching the given hostInfos
static boolean lookupRole(java.lang.String method, FUserRole role)
          Determines whether a given user role is sufficient to call a certain method
 java.lang.Boolean releaseFloatingLicsOfApp(int appId, int amount)
          releases a number of floating licenses of an application
 java.lang.Boolean removeAppFromHost(int hostId, int appId)
           
 java.lang.Boolean removeApplication(int appId)
           
 java.lang.Boolean removeFloatingLicense(int floatId)
           
 java.lang.Boolean removeHost(int hostId)
           
 java.lang.Boolean removeHostFromKnownHosts(int hostId)
          Removes the entry for the given host from the known hosts
 java.lang.Boolean removeOS(int osId)
           
 java.util.Map<java.lang.String,java.lang.Object> requestOutputFiles(java.lang.String jobId)
          Requests the output data of a job marshalled into a map
 java.util.Map<java.lang.String,java.lang.Object> requestOutputFileServerPort()
          Requests the port of the result file server in order to request the output of a job
 java.lang.Boolean resetAppToHost(int hostId, int appId)
           
 java.lang.Boolean resetFloatingLicense(int floatId)
           
 java.lang.Boolean resetHostLockedCpus(int hostId)
           
 java.lang.Boolean resetHostUsedCpus(int hostId)
           
 java.lang.Boolean rollback()
           
 java.lang.Boolean setAppDescription(int appId, java.lang.String desc)
           
 java.lang.Boolean setAppFloatingLicense(int appId, int floatId)
           
 java.lang.Boolean setAppHardLicsOnHost(int hostId, int appId, int numberOfHardLics)
           
 java.lang.Boolean setAppName(int appId, java.lang.String appName)
           
 java.lang.Boolean setAppNeedsX(int appId, java.lang.Boolean needsX)
           
 java.lang.Boolean setAppPathOnHost(int hostId, int appId, java.lang.String pathToExe)
           
 java.lang.Boolean setAppPrioOnHost(int hostId, int appId, int priority)
           
 java.lang.Boolean setAppRL(int appId, int requiredLicenses)
           
 java.lang.Boolean setAppRP(int appId, int requiredProcessors)
           
 java.lang.Boolean setAppXHost(int appId, int hostId, int portIndex)
           
 java.lang.Boolean setHostActive(int hostId, java.lang.Boolean isActive)
           
 java.lang.Boolean setHostCredentials(int hostId, java.lang.String userName, java.lang.String password, java.lang.Boolean check)
           
 java.lang.Boolean setHostLockedCpus(java.util.List<java.lang.String> list, int cpus)
          Sets the number of locked CPUs for a given host
 java.lang.Boolean setHostMem(int hostId, int mbMemory)
           
 java.lang.Boolean setHostNP(int hostId, int np)
           
 java.lang.Boolean setHostOS(int hostId, int osId)
           
 java.lang.Boolean setHostPort(int hostId, int port)
           
 java.lang.Boolean setHostSftpRootDir(int hostId, java.lang.String sftpDir)
           
 java.lang.Boolean setHostSupportsX(int hostId, java.lang.Boolean supportsX)
           
 java.lang.Boolean setHostTempDir(int hostId, java.lang.String tempDir)
           
 java.lang.Boolean setHostXPort(int hostId, java.lang.String port)
           
 java.lang.String startJob(java.util.Map<java.lang.String,java.lang.Object> _job)
          Starts the job marshalled in the given map
 java.util.Map<java.lang.String,java.lang.Object> startJobv2(java.util.Map<java.lang.String,java.lang.Object> _job)
          Starts the job marshalled in the given map
 java.lang.Boolean startTransaction()
           
 java.lang.String testCanceler(java.lang.String code, java.lang.String className)
           
 java.lang.Boolean unblockSchedule()
          Unblocks the schedule for new jobs from the current client
 java.lang.Boolean unblockSchedule(java.lang.String address)
          Unblocks the schedule for new jobs from the given address
 java.lang.Boolean unlockHost(java.util.List<java.lang.String> list)
          Unlocks hosts matching the given hostInfos
 java.lang.Boolean useFloatingLicsOfApp(int appId, int amount)
          acquires a number of floating licenses of an application
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSshResourceManager

public FSshResourceManager()
Method Detail

getPublicKey

public java.util.Map<java.lang.String,byte[]> getPublicKey()
Description copied from interface: FIResourceManager
The public RSA key of the SshResourceManager

Specified by:
getPublicKey in interface FIResourceManager
Returns:

blockSchedule

public java.lang.Boolean blockSchedule()
Description copied from interface: FIResourceManager
Blocks the schedule for new jobs from the current client

Specified by:
blockSchedule in interface FIResourceManager
Returns:

blockSchedule

public java.lang.Boolean blockSchedule(java.lang.String address)
Description copied from interface: FIResourceManager
Blocks the schedule for new jobs from the given address

Specified by:
blockSchedule in interface FIResourceManager
Returns:

globalScheduleBlock

public java.lang.Boolean globalScheduleBlock()
Description copied from interface: FIResourceManager
Blocks the scheduling of all jobs

Specified by:
globalScheduleBlock in interface FIResourceManager
Returns:

cancelJob

public java.lang.Boolean cancelJob(java.lang.String jobID)
Description copied from interface: FIResourceManager
Cancels the job with the given id

Specified by:
cancelJob in interface FIResourceManager
Returns:

countCurrentRunningJobs

public int countCurrentRunningJobs()
Description copied from interface: FIResourceManager
Returns the number of currently running jobs

Specified by:
countCurrentRunningJobs in interface FIResourceManager
Returns:
the number of currently running jobs

countCurrentWaitingJobs

public int countCurrentWaitingJobs()
Description copied from interface: FIResourceManager
Returns the number of currently queued jobs

Specified by:
countCurrentWaitingJobs in interface FIResourceManager
Returns:
the number of currently queued jobs

getJobState

public int getJobState(java.lang.String jobId,
                       int taskIndex)
Description copied from interface: FIResourceManager
Returns the state of the task with the given index in the job identified by the given id

Specified by:
getJobState in interface FIResourceManager
Parameters:
jobId - the id of the job
taskIndex - the index in the list of tasks of the job
Returns:
the state

getMaxSimultaneousJobs

public int getMaxSimultaneousJobs()
Description copied from interface: FIResourceManager
Returns the maximum number of jobs running at the same time

Specified by:
getMaxSimultaneousJobs in interface FIResourceManager
Returns:
the maximum number of jobs running at the same time

init

public void init(FSshResourceManagerState state)
Specified by:
init in interface FIResourceManager

startJob

public java.lang.String startJob(java.util.Map<java.lang.String,java.lang.Object> _job)
Description copied from interface: FIResourceManager
Starts the job marshalled in the given map

Specified by:
startJob in interface FIResourceManager
Parameters:
_job - the job marshalled as a map
Returns:
the id of the newly started job

startJobv2

public java.util.Map<java.lang.String,java.lang.Object> startJobv2(java.util.Map<java.lang.String,java.lang.Object> _job)
Description copied from interface: FIResourceManager
Starts the job marshalled in the given map

Specified by:
startJobv2 in interface FIResourceManager
Parameters:
_job - the job marshalled as a map
Returns:
information about the input file server which is going to receive the input files

unblockSchedule

public java.lang.Boolean unblockSchedule()
Description copied from interface: FIResourceManager
Unblocks the schedule for new jobs from the current client

Specified by:
unblockSchedule in interface FIResourceManager
Returns:

unblockSchedule

public java.lang.Boolean unblockSchedule(java.lang.String address)
Description copied from interface: FIResourceManager
Unblocks the schedule for new jobs from the given address

Specified by:
unblockSchedule in interface FIResourceManager
Returns:

globalScheduleUnblock

public java.lang.Boolean globalScheduleUnblock()
Description copied from interface: FIResourceManager
Releases the global block of scheduling

Specified by:
globalScheduleUnblock in interface FIResourceManager
Returns:

requestOutputFileServerPort

public java.util.Map<java.lang.String,java.lang.Object> requestOutputFileServerPort()
Description copied from interface: FIResourceManager
Requests the port of the result file server in order to request the output of a job

Specified by:
requestOutputFileServerPort in interface FIResourceManager
Returns:

requestOutputFiles

public java.util.Map<java.lang.String,java.lang.Object> requestOutputFiles(java.lang.String jobId)
Description copied from interface: FIResourceManager
Requests the output data of a job marshalled into a map

Specified by:
requestOutputFiles in interface FIResourceManager
Returns:

confirmOutputFilesReceived

public java.lang.Boolean confirmOutputFilesReceived(java.lang.String jobID)
Description copied from interface: FIResourceManager
called to confirm that the result files for the given job were successfully received and can be deleted

Specified by:
confirmOutputFilesReceived in interface FIResourceManager
Returns:

getJobOutput

public byte[] getJobOutput(java.lang.String jobId)
Description copied from interface: FIResourceManager
Returns the console output of a job

Specified by:
getJobOutput in interface FIResourceManager
Returns:

checkAuth

public java.util.Map<java.lang.String,java.lang.Object> checkAuth(java.lang.String userName,
                                                                  java.lang.String pass)
Description copied from interface: FIResourceManager
Checks whether the passed username and password is a valid login for the SshResourceManager

Specified by:
checkAuth in interface FIResourceManager
Returns:

getState

public java.util.Map<java.lang.String,java.lang.Object> getState(java.lang.String caller)
Description copied from interface: FIResourceManager
Returns the full state of the SshResourceManager, including Jobs, Apps, Hosts, Blocking state, Users...

Specified by:
getState in interface FIResourceManager
Returns:

getSchedulerState

public java.util.Map<java.lang.String,java.lang.Object> getSchedulerState()
Description copied from interface: FIResourceManager
The Scheduler State

Specified by:
getSchedulerState in interface FIResourceManager
Returns:

getUserState

public java.util.Map<java.lang.String,java.lang.Object> getUserState()
Description copied from interface: FIResourceManager
The state of configured users

Specified by:
getUserState in interface FIResourceManager
Returns:

getAppState

public java.util.Map<java.lang.String,java.lang.Object> getAppState()
Description copied from interface: FIResourceManager
The state of configured applications

Specified by:
getAppState in interface FIResourceManager
Returns:

getHostState

public java.util.Map<java.lang.String,java.lang.Object> getHostState()
Description copied from interface: FIResourceManager
The state of configured hosts

Specified by:
getHostState in interface FIResourceManager
Returns:

getJobState

public java.util.Map<java.lang.String,java.lang.Object> getJobState(java.lang.String caller)
Description copied from interface: FIResourceManager
The state of all jobs (queued, running and finished)

Specified by:
getJobState in interface FIResourceManager
Returns:

clearFinishedJobs

public java.lang.Boolean clearFinishedJobs()
Description copied from interface: FIResourceManager
Clears the list of finished jobs

Specified by:
clearFinishedJobs in interface FIResourceManager
Returns:

getFloatingLicNumberForApp

public int getFloatingLicNumberForApp(int appId)
Description copied from interface: FIResourceManager
Returns the number of floating licenses for an application

Specified by:
getFloatingLicNumberForApp in interface FIResourceManager
Returns:

useFloatingLicsOfApp

public java.lang.Boolean useFloatingLicsOfApp(int appId,
                                              int amount)
Description copied from interface: FIResourceManager
acquires a number of floating licenses of an application

Specified by:
useFloatingLicsOfApp in interface FIResourceManager
Returns:

releaseFloatingLicsOfApp

public java.lang.Boolean releaseFloatingLicsOfApp(int appId,
                                                  int amount)
Description copied from interface: FIResourceManager
releases a number of floating licenses of an application

Specified by:
releaseFloatingLicsOfApp in interface FIResourceManager
Returns:

cleanUp

public java.lang.Boolean cleanUp()
Specified by:
cleanUp in interface FIResourceManager

addAppToHost

public java.lang.Boolean addAppToHost(int hostId,
                                      int appId,
                                      java.lang.String pathToExe,
                                      int numberOfHardLics,
                                      int prio)
Specified by:
addAppToHost in interface FIResourceManager

addApplication

public int addApplication(java.lang.String appName,
                          int requiredLicenses,
                          int requiredProcessors,
                          java.lang.String description,
                          java.lang.Boolean needsX)
Specified by:
addApplication in interface FIResourceManager

addHost

public int addHost(java.lang.String hostName,
                   int numberOfProcessors,
                   int mbMemory,
                   int osId,
                   java.lang.Boolean isActive,
                   java.lang.Boolean supportsX)
Specified by:
addHost in interface FIResourceManager

addHost

public int addHost(java.lang.String hostName,
                   int numberOfProcessors,
                   int mbMemory,
                   int osId,
                   java.lang.String tempDir,
                   java.lang.Boolean isActive,
                   java.lang.Boolean supportsX)
Specified by:
addHost in interface FIResourceManager

addHost

public int addHost(java.lang.String hostName,
                   int numberOfProcessors,
                   int mbMemory,
                   int osId,
                   java.lang.String tempDir,
                   java.lang.String sftpRoot,
                   java.lang.Boolean isActive,
                   java.lang.Boolean supportsX)
Specified by:
addHost in interface FIResourceManager

addHost

public int addHost(java.lang.String hostName,
                   int port,
                   int numberOfProcessors,
                   int mbMemory,
                   int osId,
                   java.lang.String tempDir,
                   java.lang.String sftpRoot,
                   java.lang.Boolean isActive,
                   java.lang.Boolean supportsX,
                   java.lang.String xPort)
Specified by:
addHost in interface FIResourceManager

addHostToKnownHosts

public java.lang.Boolean addHostToKnownHosts(int hostId,
                                             java.lang.String hostName,
                                             java.lang.String type,
                                             java.lang.String fingerPrint)
Description copied from interface: FIResourceManager
Confirms the fingerprint of a host

Specified by:
addHostToKnownHosts in interface FIResourceManager
Parameters:
hostId - database id of the host
hostName - name of the host
type - type of the fingerprint
fingerPrint - the fingerprint
Returns:
true if the sent fingerprint matches the current fingerprint of the host and the host was successfully updated in the database, optherwise false

getHostInfo

public java.util.Map<java.lang.String,java.lang.Object> getHostInfo(int hostId)
Description copied from interface: FIResourceManager
Returns the host information (fingerprint) of a host

Specified by:
getHostInfo in interface FIResourceManager
Returns:

checkHostKnown

public java.lang.Boolean checkHostKnown(int hostId)
Description copied from interface: FIResourceManager
Checks whether the host identified by the given id is a known host

Specified by:
checkHostKnown in interface FIResourceManager
Returns:

removeHostFromKnownHosts

public java.lang.Boolean removeHostFromKnownHosts(int hostId)
Description copied from interface: FIResourceManager
Removes the entry for the given host from the known hosts

Specified by:
removeHostFromKnownHosts in interface FIResourceManager
Returns:
true if successfully removed

addOS

public int addOS(java.lang.String name,
                 int parentOsId)
Specified by:
addOS in interface FIResourceManager

addOS

public int addOS(java.lang.String name,
                 int parentOsId,
                 java.lang.String chdirCommand)
Specified by:
addOS in interface FIResourceManager

addOS

public int addOS(java.lang.String name,
                 int parentOsId,
                 java.lang.String chdirCommand,
                 java.lang.String pathDelimiter)
Specified by:
addOS in interface FIResourceManager

addOS

public int addOS(java.lang.String name,
                 int parentOsId,
                 java.lang.String chdirCommand,
                 java.lang.String pathDelimiter,
                 java.lang.String cancelerClass)
Specified by:
addOS in interface FIResourceManager

changeFloatingLicenseName

public java.lang.Boolean changeFloatingLicenseName(int floatId,
                                                   java.lang.String name)
Specified by:
changeFloatingLicenseName in interface FIResourceManager

changeFloatingLicenseNumber

public java.lang.Boolean changeFloatingLicenseNumber(int floatId,
                                                     int number)
Specified by:
changeFloatingLicenseNumber in interface FIResourceManager

changeHostsOS

public java.lang.Boolean changeHostsOS(int oldOSId,
                                       int newOSId)
Specified by:
changeHostsOS in interface FIResourceManager

changeOSParents

public java.lang.Boolean changeOSParents(int oldParentId,
                                         int newParentId)
Specified by:
changeOSParents in interface FIResourceManager

changeOSChdirCommand

public java.lang.Boolean changeOSChdirCommand(int osId,
                                              java.lang.String chdirCommand)
Specified by:
changeOSChdirCommand in interface FIResourceManager

changeOSPathDelimiter

public java.lang.Boolean changeOSPathDelimiter(int osId,
                                               java.lang.String pathDelimiter)
Specified by:
changeOSPathDelimiter in interface FIResourceManager

changeOSName

public java.lang.Boolean changeOSName(int osId,
                                      java.lang.String newName)
Specified by:
changeOSName in interface FIResourceManager

changeOSParent

public java.lang.Boolean changeOSParent(int osId,
                                        int parentOsId)
Specified by:
changeOSParent in interface FIResourceManager

changeOSJobCanceler

public java.lang.Boolean changeOSJobCanceler(int osId,
                                             java.lang.String className)
Specified by:
changeOSJobCanceler in interface FIResourceManager

addJobCanceler

public java.lang.String addJobCanceler(int osId,
                                       java.lang.String code,
                                       java.lang.String className)
Specified by:
addJobCanceler in interface FIResourceManager

testCanceler

public java.lang.String testCanceler(java.lang.String code,
                                     java.lang.String className)
Specified by:
testCanceler in interface FIResourceManager

cloneAllAppsFromHostToHost

public java.lang.Boolean cloneAllAppsFromHostToHost(int from,
                                                    int to)
Specified by:
cloneAllAppsFromHostToHost in interface FIResourceManager

cloneAppsFromHostToHost

public java.lang.Boolean cloneAppsFromHostToHost(int from,
                                                 int to,
                                                 java.lang.Object[] appIds)
Specified by:
cloneAppsFromHostToHost in interface FIResourceManager

commit

public java.lang.Boolean commit()
Specified by:
commit in interface FIResourceManager

getApplicationById

public java.util.Map<java.lang.String,java.lang.Object> getApplicationById(int appId)
Specified by:
getApplicationById in interface FIResourceManager

getApplicationByName

public java.util.Map<java.lang.String,java.lang.Object> getApplicationByName(java.lang.String name)
Specified by:
getApplicationByName in interface FIResourceManager

getApplicationInfoForHost

public java.util.Map<java.lang.String,java.lang.Object> getApplicationInfoForHost(int appId,
                                                                                  int hostId)
Specified by:
getApplicationInfoForHost in interface FIResourceManager

getApplications

public java.lang.Object[] getApplications()
Specified by:
getApplications in interface FIResourceManager

getActiveApplications

public java.util.Map<java.lang.String,java.lang.Object> getActiveApplications()
Specified by:
getActiveApplications in interface FIResourceManager

getActiveApplications

public java.util.Map<java.lang.String,java.lang.Object> getActiveApplications(int withAuth)
Specified by:
getActiveApplications in interface FIResourceManager

getApplicationsByHost

public java.lang.Object[] getApplicationsByHost(int hostId)
Specified by:
getApplicationsByHost in interface FIResourceManager

getFloatingLicense

public java.util.Map<java.lang.String,java.lang.Object> getFloatingLicense(int floatId)
Specified by:
getFloatingLicense in interface FIResourceManager

getFloatingLicenseForApp

public java.util.Map<java.lang.String,java.lang.Object> getFloatingLicenseForApp(int appId)
Specified by:
getFloatingLicenseForApp in interface FIResourceManager

getFloatingLicenses

public java.lang.Object[] getFloatingLicenses()
Specified by:
getFloatingLicenses in interface FIResourceManager

getHostById

public java.util.Map<java.lang.String,java.lang.Object> getHostById(int hostId)
Specified by:
getHostById in interface FIResourceManager

getHostByName

public java.util.Map<java.lang.String,java.lang.Object> getHostByName(java.lang.String hostName)
Specified by:
getHostByName in interface FIResourceManager

getHosts

public java.lang.Object[] getHosts()
Specified by:
getHosts in interface FIResourceManager

getXHosts

public java.lang.Object[] getXHosts()
Specified by:
getXHosts in interface FIResourceManager

hasDefaultXForward

public java.lang.Boolean hasDefaultXForward()
Specified by:
hasDefaultXForward in interface FIResourceManager

getHostsByApplication

public java.lang.Object[] getHostsByApplication(int appId)
Specified by:
getHostsByApplication in interface FIResourceManager

getHostsByOS

public java.lang.Object[] getHostsByOS(int osId)
Specified by:
getHostsByOS in interface FIResourceManager

getHostsByOSParent

public java.lang.Object[] getHostsByOSParent(int parentOsId)
Specified by:
getHostsByOSParent in interface FIResourceManager

getHostsByOSParent

public java.lang.Object[] getHostsByOSParent(int parentOsId,
                                             java.lang.Boolean recursive)
Specified by:
getHostsByOSParent in interface FIResourceManager

getHostsByXSupport

public java.lang.Object[] getHostsByXSupport(java.lang.Boolean supportsX)
Specified by:
getHostsByXSupport in interface FIResourceManager

setHostXPort

public java.lang.Boolean setHostXPort(int hostId,
                                      java.lang.String port)
Specified by:
setHostXPort in interface FIResourceManager

getNumberOfFloatingLicensesForApp

public int getNumberOfFloatingLicensesForApp(int appId)
Specified by:
getNumberOfFloatingLicensesForApp in interface FIResourceManager

getOperatingSystemById

public java.util.Map<java.lang.String,java.lang.Object> getOperatingSystemById(int osId)
Specified by:
getOperatingSystemById in interface FIResourceManager

getOperatingSystems

public java.lang.Object[] getOperatingSystems()
Specified by:
getOperatingSystems in interface FIResourceManager

getJobCancelerImplementations

public java.lang.Object[] getJobCancelerImplementations()
Specified by:
getJobCancelerImplementations in interface FIResourceManager

getCancelerCode

public java.lang.String getCancelerCode(java.lang.String className)
Specified by:
getCancelerCode in interface FIResourceManager

getOperatingSystemsByParentId

public java.lang.Object[] getOperatingSystemsByParentId(int parentOsId)
Specified by:
getOperatingSystemsByParentId in interface FIResourceManager

getOperatingSystemsByParentId

public java.lang.Object[] getOperatingSystemsByParentId(int parentOsId,
                                                        java.lang.Boolean recursive)
Specified by:
getOperatingSystemsByParentId in interface FIResourceManager

removeAppFromHost

public java.lang.Boolean removeAppFromHost(int hostId,
                                           int appId)
Specified by:
removeAppFromHost in interface FIResourceManager

removeApplication

public java.lang.Boolean removeApplication(int appId)
Specified by:
removeApplication in interface FIResourceManager

removeFloatingLicense

public java.lang.Boolean removeFloatingLicense(int floatId)
Specified by:
removeFloatingLicense in interface FIResourceManager

removeHost

public java.lang.Boolean removeHost(int hostId)
Specified by:
removeHost in interface FIResourceManager

removeOS

public java.lang.Boolean removeOS(int osId)
Specified by:
removeOS in interface FIResourceManager

rollback

public java.lang.Boolean rollback()
Specified by:
rollback in interface FIResourceManager

setAppDescription

public java.lang.Boolean setAppDescription(int appId,
                                           java.lang.String desc)
Specified by:
setAppDescription in interface FIResourceManager

setAppHardLicsOnHost

public java.lang.Boolean setAppHardLicsOnHost(int hostId,
                                              int appId,
                                              int numberOfHardLics)
Specified by:
setAppHardLicsOnHost in interface FIResourceManager

setAppName

public java.lang.Boolean setAppName(int appId,
                                    java.lang.String appName)
Specified by:
setAppName in interface FIResourceManager

setAppNeedsX

public java.lang.Boolean setAppNeedsX(int appId,
                                      java.lang.Boolean needsX)
Specified by:
setAppNeedsX in interface FIResourceManager

setAppPathOnHost

public java.lang.Boolean setAppPathOnHost(int hostId,
                                          int appId,
                                          java.lang.String pathToExe)
Specified by:
setAppPathOnHost in interface FIResourceManager

setAppPrioOnHost

public java.lang.Boolean setAppPrioOnHost(int hostId,
                                          int appId,
                                          int priority)
Specified by:
setAppPrioOnHost in interface FIResourceManager

setAppRP

public java.lang.Boolean setAppRP(int appId,
                                  int requiredProcessors)
Specified by:
setAppRP in interface FIResourceManager

setAppRL

public java.lang.Boolean setAppRL(int appId,
                                  int requiredLicenses)
Specified by:
setAppRL in interface FIResourceManager

setHostActive

public java.lang.Boolean setHostActive(int hostId,
                                       java.lang.Boolean isActive)
Specified by:
setHostActive in interface FIResourceManager

setHostCredentials

public java.lang.Boolean setHostCredentials(int hostId,
                                            java.lang.String userName,
                                            java.lang.String password,
                                            java.lang.Boolean check)
Specified by:
setHostCredentials in interface FIResourceManager

setHostMem

public java.lang.Boolean setHostMem(int hostId,
                                    int mbMemory)
Specified by:
setHostMem in interface FIResourceManager

setHostNP

public java.lang.Boolean setHostNP(int hostId,
                                   int np)
Specified by:
setHostNP in interface FIResourceManager

setHostOS

public java.lang.Boolean setHostOS(int hostId,
                                   int osId)
Specified by:
setHostOS in interface FIResourceManager

setHostSftpRootDir

public java.lang.Boolean setHostSftpRootDir(int hostId,
                                            java.lang.String sftpDir)
Specified by:
setHostSftpRootDir in interface FIResourceManager

setHostSupportsX

public java.lang.Boolean setHostSupportsX(int hostId,
                                          java.lang.Boolean supportsX)
Specified by:
setHostSupportsX in interface FIResourceManager

setHostTempDir

public java.lang.Boolean setHostTempDir(int hostId,
                                        java.lang.String tempDir)
Specified by:
setHostTempDir in interface FIResourceManager

setHostPort

public java.lang.Boolean setHostPort(int hostId,
                                     int port)
Specified by:
setHostPort in interface FIResourceManager

startTransaction

public java.lang.Boolean startTransaction()
Specified by:
startTransaction in interface FIResourceManager

addFloatingLicense

public int addFloatingLicense(int number,
                              java.lang.String name)
Specified by:
addFloatingLicense in interface FIResourceManager

addFloatingLicenseWithApp

public int addFloatingLicenseWithApp(int appId,
                                     int number,
                                     java.lang.String name)
Specified by:
addFloatingLicenseWithApp in interface FIResourceManager

getApplicationsByFloatId

public java.lang.Object[] getApplicationsByFloatId(int floatId)
Specified by:
getApplicationsByFloatId in interface FIResourceManager

setAppXHost

public java.lang.Boolean setAppXHost(int appId,
                                     int hostId,
                                     int portIndex)
Specified by:
setAppXHost in interface FIResourceManager

setAppFloatingLicense

public java.lang.Boolean setAppFloatingLicense(int appId,
                                               int floatId)
Specified by:
setAppFloatingLicense in interface FIResourceManager

addUser

public int addUser(java.lang.String userName,
                   java.lang.String password,
                   int role)
Specified by:
addUser in interface FIResourceManager

addUser

public int addUser(java.lang.String userName,
                   java.lang.String password,
                   int role,
                   java.lang.String email)
Specified by:
addUser in interface FIResourceManager

changeUserPass

public java.lang.Boolean changeUserPass(int id,
                                        java.lang.String newPass)
Specified by:
changeUserPass in interface FIResourceManager

changeUserPassByName

public java.lang.Boolean changeUserPassByName(java.lang.String id,
                                              java.lang.String oldPass,
                                              java.lang.String newPass)
Specified by:
changeUserPassByName in interface FIResourceManager

changeUserRole

public java.lang.Boolean changeUserRole(int id,
                                        int role)
Specified by:
changeUserRole in interface FIResourceManager

changeUserEmail

public java.lang.Boolean changeUserEmail(int id,
                                         java.lang.String email)
Specified by:
changeUserEmail in interface FIResourceManager

deleteUser

public java.lang.Boolean deleteUser(int id)
Specified by:
deleteUser in interface FIResourceManager

getUsers

public java.lang.Object[] getUsers()
Specified by:
getUsers in interface FIResourceManager

getUsersByRole

public java.lang.Object[] getUsersByRole(int role)
Specified by:
getUsersByRole in interface FIResourceManager

getUser

public java.util.Map<java.lang.String,java.lang.Object> getUser(int id)
Specified by:
getUser in interface FIResourceManager

getUserByName

public java.util.Map<java.lang.String,java.lang.Object> getUserByName(java.lang.String name)
Specified by:
getUserByName in interface FIResourceManager

getHostCpus

public int getHostCpus(java.util.List<java.lang.String> list)
Description copied from interface: FIResourceManager
Returns the total number of cpus for the given hosts

Specified by:
getHostCpus in interface FIResourceManager
Returns:

getHostLockedCpus

public int getHostLockedCpus(java.util.List<java.lang.String> list)
Description copied from interface: FIResourceManager
Returns the number of locked CPUs for the given hosts

Specified by:
getHostLockedCpus in interface FIResourceManager
Returns:

setHostLockedCpus

public java.lang.Boolean setHostLockedCpus(java.util.List<java.lang.String> list,
                                           int cpus)
Description copied from interface: FIResourceManager
Sets the number of locked CPUs for a given host

Specified by:
setHostLockedCpus in interface FIResourceManager
Returns:

lockHost

public java.lang.Boolean lockHost(java.util.List<java.lang.String> list)
Description copied from interface: FIResourceManager
Locks hosts matching the given hostInfos

Specified by:
lockHost in interface FIResourceManager
Returns:

unlockHost

public java.lang.Boolean unlockHost(java.util.List<java.lang.String> list)
Description copied from interface: FIResourceManager
Unlocks hosts matching the given hostInfos

Specified by:
unlockHost in interface FIResourceManager
Returns:

isHostLocked

public int isHostLocked(java.util.List<java.lang.String> list)
Description copied from interface: FIResourceManager
Returns whether the hosts with the given hostinfo are locked

Specified by:
isHostLocked in interface FIResourceManager
Returns:

resetAppToHost

public java.lang.Boolean resetAppToHost(int hostId,
                                        int appId)
Specified by:
resetAppToHost in interface FIResourceManager

resetFloatingLicense

public java.lang.Boolean resetFloatingLicense(int floatId)
Specified by:
resetFloatingLicense in interface FIResourceManager

resetHostLockedCpus

public java.lang.Boolean resetHostLockedCpus(int hostId)
Specified by:
resetHostLockedCpus in interface FIResourceManager

resetHostUsedCpus

public java.lang.Boolean resetHostUsedCpus(int hostId)
Specified by:
resetHostUsedCpus in interface FIResourceManager

getRoles

public java.lang.Object[] getRoles()
Specified by:
getRoles in interface FIResourceManager

lookupRole

public static boolean lookupRole(java.lang.String method,
                                 FUserRole role)
Determines whether a given user role is sufficient to call a certain method

Parameters:
method - The method to call
role - The user role of the user trying to call the method
Returns:
true if user level is sufficient, else false