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

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

public class JadortConsole
extends java.lang.Object

A command line client for JaDOrT

Author:
Malek Chahine, Remy Bresson, S. Ali Tokmen

Field Summary
static java.util.Map<java.lang.String,java.lang.reflect.Method> output
          Associate method name on the versioninig engine with method name to handle output on the client
 
Constructor Summary
JadortConsole()
           
 
Method Summary
static org.ow2.jasmine.jadort.api.entities.topology.GroupBean getGroupByName(java.lang.String name, JadortCommand JadortConsoleInterface)
          Get a group by is name
static java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> getGroups(JadortCommand JadortConsoleInterface)
          Return the list of the groups.
static org.ow2.jasmine.jadort.api.entities.topology.ServerBean getServerByName(java.lang.String name, JadortCommand JadortConsoleInterface)
          Get a server by is name
static java.lang.Integer handleBoolean(java.lang.Boolean bool)
          Display a boolean
static org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean handleCreateOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean op)
          Manage display of a created operation.
static void handleGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean group)
          Display the selected group
static void handleGroupsList(java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> groups)
          Manage display of a groups list
static java.lang.Integer handleInteger(java.lang.Integer integer)
          Display an integer
static void handleOperationsList(java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean> operations)
          Display a list of operation
static void handleServerProgressList(java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean> serverProgresss)
          display a list of serverProgress
static void handleStep(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean.Step step)
          Display a step of operation
static void handleWorkerProgressList(java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean> workerProgresss)
          display a list of workerProgress
static void main(java.lang.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 java.util.Map<java.lang.String,java.lang.reflect.Method> output
Associate method name on the versioninig engine with method name to handle output on the client

Constructor Detail

JadortConsole

public JadortConsole()
Method Detail

main

public static void main(java.lang.String[] args)
The main

Parameters:
args - command line arguments

getGroupByName

public static org.ow2.jasmine.jadort.api.entities.topology.GroupBean getGroupByName(java.lang.String name,
                                                                                    JadortCommand JadortConsoleInterface)
                                                                             throws java.lang.Exception
Get a group by is name

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

getServerByName

public static org.ow2.jasmine.jadort.api.entities.topology.ServerBean getServerByName(java.lang.String name,
                                                                                      JadortCommand JadortConsoleInterface)
                                                                               throws java.lang.Exception
Get a server by is name

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

getGroups

public static java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> getGroups(JadortCommand JadortConsoleInterface)
                                                                                        throws java.lang.Exception
Return the list of the groups.

Parameters:
JadortConsoleInterface - a instance of CmmandInterface
Returns:
list of the groups
Throws:
java.lang.Exception

handleCreateOperation

public static org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean handleCreateOperation(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean op)
Manage display of a created operation.

Parameters:
op - The operation to display

handleOperationsList

public static void handleOperationsList(java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean> operations)
Display a list of operation

Parameters:
operations - List of operations

handleGroupsList

public static void handleGroupsList(java.util.List<org.ow2.jasmine.jadort.api.entities.topology.GroupBean> groups)
Manage display of a groups list

Parameters:
groups - The group list to display

handleGroup

public static void handleGroup(org.ow2.jasmine.jadort.api.entities.topology.GroupBean group)
Display the selected group

Parameters:
group - The selected group.

handleServerProgressList

public static void handleServerProgressList(java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.ServerProgressBean> serverProgresss)
display a list of serverProgress

Parameters:
serverProgresss - The list of serverProgress to display.

handleWorkerProgressList

public static void handleWorkerProgressList(java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.WorkerProgressBean> workerProgresss)
display a list of workerProgress

Parameters:
workerProgresss - The list of serverProgress to display.

handleBoolean

public static java.lang.Integer handleBoolean(java.lang.Boolean bool)
Display a boolean

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

handleInteger

public static java.lang.Integer handleInteger(java.lang.Integer integer)
Display an integer

Parameters:
integer - The integer to display
Returns:
integer

handleStep

public static void handleStep(org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean.Step step)
Display a step of operation

Parameters:
step - The step to display


Copyright © 2009 OW2 Consortium. All Rights Reserved.