org.ow2.jasmine.jadort.client.console
Class JadortConsole

java.lang.Object
  extended by org.ow2.jasmine.jadort.client.console.JadortConsole

public class JadortConsole
extends Object

A command line client for JaDOrT

Author:
Remy Bresson

Field Summary
static Map<String,Method> output
          Associate method name on the JaDOrT engine with method name to handle output on the client
 
Constructor Summary
JadortConsole()
           
 
Method Summary
static GroupBean getGroupByName(String name, JadortCommand JadortConsoleInterface)
          Get a group by is name
static List<GroupBean> getGroups(JadortCommand JadortConsoleInterface)
          Return the list of the groups.
static ServerBean getServerByName(String name, JadortCommand JadortConsoleInterface)
          Get a server by its name
static VMImageBean getVMImageByName(String name, JadortCommand JadortConsoleInterface)
          Get a VM Image by its name
static List<VMImageBean> getVMImages(JadortCommand JadortConsoleInterface)
          Return the list of the VM Images.
static WorkerBean getWorkerByName(String name, JadortCommand JadortConsoleInterface)
          Get a worker by its name
static Integer handleBoolean(Boolean bool)
          Display a boolean
static OperationStateBean handleCreateOperation(OperationStateBean op)
          Manage display of a created operation.
static void handleGroup(GroupBean group)
          Display the selected group
static void handleGroupsList(List<GroupBean> groups)
          Manage display of a groups list
static Integer handleInteger(Integer integer)
          Display an integer
static void handleOperationsList(List<OperationStateBean> operations)
          Display a list of operation
static void handleServerProgressList(List<ServerProgressBean> serverProgresss)
          display a list of serverProgress
static void handleStep(OperationStateBean.Step step)
          Display a step of operation
static void handleVMImage(VMImageBean vmImage)
          Display the selected VMImage
static void handleVMImagesList(List<VMImageBean> vmImages)
          Manage display of a VM Image list
static void handleWorkerProgressList(List<WorkerProgressBean> workerProgresss)
          display a list of workerProgress
static void main(String[] args)
          The main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

output

public static Map<String,Method> output
Associate method name on the JaDOrT engine with method name to handle output on the client

Constructor Detail

JadortConsole

public JadortConsole()
Method Detail

main

public static void main(String[] args)
The main

Parameters:
args - command line arguments

getGroupByName

public static GroupBean getGroupByName(String name,
                                       JadortCommand JadortConsoleInterface)
                                throws Exception
Get a group by is name

Parameters:
name - The name of the group you are looking for.
JadortConsoleInterface - a instance of CommandInterface
Returns:
The group with the good name or null if it doesn't exist
Throws:
Exception

getVMImageByName

public static VMImageBean getVMImageByName(String name,
                                           JadortCommand JadortConsoleInterface)
                                    throws Exception
Get a VM Image by its name

Parameters:
name - The name of the VM Image you are looking for.
JadortConsoleInterface - a instance of CommandInterface
Returns:
The VMImageBean with the good UUID or null if it doesn't exist
Throws:
Exception

getServerByName

public static ServerBean getServerByName(String name,
                                         JadortCommand JadortConsoleInterface)
                                  throws Exception
Get a server by its name

Parameters:
name - The name of the server you are looking for.
JadortConsoleInterface - a instance of CommandInterface
Returns:
The server with the good name or null if it doesn't exist
Throws:
Exception

getWorkerByName

public static WorkerBean getWorkerByName(String name,
                                         JadortCommand JadortConsoleInterface)
                                  throws Exception
Get a worker by its name

Parameters:
name - The name of the worker you are looking for.
JadortConsoleInterface - a instance of CommandInterface
Returns:
The worker with the good name or null if it doesn't exist
Throws:
Exception

getGroups

public static List<GroupBean> getGroups(JadortCommand JadortConsoleInterface)
                                 throws Exception
Return the list of the groups.

Parameters:
JadortConsoleInterface - a instance of CommandInterface
Returns:
list of the groups
Throws:
Exception

getVMImages

public static List<VMImageBean> getVMImages(JadortCommand JadortConsoleInterface)
                                     throws Exception
Return the list of the VM Images.

Parameters:
JadortConsoleInterface - a instance of CommandInterface
Returns:
list of the VM images
Throws:
Exception

handleCreateOperation

public static OperationStateBean handleCreateOperation(OperationStateBean op)
Manage display of a created operation.

Parameters:
op - The operation to display

handleOperationsList

public static void handleOperationsList(List<OperationStateBean> operations)
Display a list of operation

Parameters:
operations - List of operations

handleGroupsList

public static void handleGroupsList(List<GroupBean> groups)
Manage display of a groups list

Parameters:
groups - The group list to display

handleGroup

public static void handleGroup(GroupBean group)
Display the selected group

Parameters:
group - The selected group.

handleVMImagesList

public static void handleVMImagesList(List<VMImageBean> vmImages)
Manage display of a VM Image list

Parameters:
vmImages - The group list to display

handleVMImage

public static void handleVMImage(VMImageBean vmImage)
Display the selected VMImage

Parameters:
group - The selected VM Image.

handleServerProgressList

public static void handleServerProgressList(List<ServerProgressBean> serverProgresss)
display a list of serverProgress

Parameters:
serverProgresss - The list of serverProgress to display.

handleWorkerProgressList

public static void handleWorkerProgressList(List<WorkerProgressBean> workerProgresss)
display a list of workerProgress

Parameters:
workerProgresss - The list of serverProgress to display.

handleBoolean

public static Integer handleBoolean(Boolean bool)
Display a boolean

Parameters:
bool - The boolean to display
Returns:
0 if false, 1 if true

handleInteger

public static Integer handleInteger(Integer integer)
Display an integer

Parameters:
integer - The integer to display
Returns:
integer

handleStep

public static void handleStep(OperationStateBean.Step step)
Display a step of operation

Parameters:
step - The step to display


Copyright © 2012 OW2 Consortium. All Rights Reserved.