org.ow2.jasmine.jadort.api
Interface IJadortService


public interface IJadortService

JaDOrT service's EJB3 interface. Gives direct access to the JaDOrT engine.

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

Nested Class Summary
static class IJadortService.OperationType
          Operation types.
 
Field Summary
static java.lang.String EJB_JNDI_NAME
          The JNDI name of the JaDOrT Stateful EJB3 bean.
 
Method Summary
 void abortServer(ServerBean server)
          Aborts the task a ServerBean is currently doing.
 void abortWorker(WorkerBean worker)
          Aborts the task a WorkerBean is currently doing.
 boolean checkServer(ServerBean server)
          Checks if the problem on a given ServerBean has been resolved.
 boolean checkWorker(WorkerBean worker)
          Checks if the problem on a given WorkerBean has been resolved.
 void createNewOperation(java.lang.String newOperationName)
          Create a new operation
 void deleteOperation(OperationStateBean operation)
          Delete an Operation from the operation list
 OperationStateBean getCurrentOperation()
          Returns the current operation.
 OperationStateBean.Step getCurrentStep()
          Returns the current Step of the current operation
 java.util.List<OperationStateBean> getOperationsList()
          Returns the list of operations
 void ignoreServer(ServerBean server)
          Ignores the error on a given ServerBean.
 void ignoreWorker(WorkerBean worker)
          Ignores the error on a given WorkerBean.
 void loadTopology(java.io.File xmlTopoFile)
          Loads the topology from a .xml file.
 void next()
          goes to next step
 void previous()
          Goes back to the previous step.
 void restartServer(ServerBean server)
          Restarts a ServerBean that's in an error.
 void restartWorker(WorkerBean worker)
          Restarts a WorkerBean that's in an error.
 void selectApplication(java.net.URL url)
          Create a new application
 void selectGroup(GroupBean selectedGroup)
          Select the group that JaDOrT will be maintaining or migrating
 void selectOperation(OperationStateBean operation)
          Select an Operation from the operation list
 void selectOperationType(IJadortService.OperationType operationType)
          Select the operation type
 void selectServers(java.util.List<ServerBean> selectedServers)
          Select the servers to process
 void selectVMImage(VMImageBean selectedVMImage)
          Select a VM image from the VM images list.
 void selectVMImage(VMImageBean selectedVMImage, ServerBean server)
          Select a VM image from the VM images list for a given server.
 

Field Detail

EJB_JNDI_NAME

static final java.lang.String EJB_JNDI_NAME
The JNDI name of the JaDOrT Stateful EJB3 bean.

See Also:
Constant Field Values
Method Detail

getCurrentStep

OperationStateBean.Step getCurrentStep()
                                       throws JadortServiceException
Returns the current Step of the current operation

Returns:
The current step.
Throws:
JadortServiceException

getOperationsList

java.util.List<OperationStateBean> getOperationsList()
                                                     throws JadortServiceException
Returns the list of operations

Returns:
List of Operations.
Throws:
JadortServiceException

deleteOperation

void deleteOperation(OperationStateBean operation)
                     throws JadortServiceException
Delete an Operation from the operation list

Parameters:
operation - the operation to be deleted
Throws:
JadortServiceException

selectOperation

void selectOperation(OperationStateBean operation)
                     throws JadortServiceException
Select an Operation from the operation list

Parameters:
operation - the operation to be selected
Throws:
JadortServiceException

createNewOperation

void createNewOperation(java.lang.String newOperationName)
                        throws JadortServiceException
Create a new operation

Parameters:
newOperationName - the name of the new operation that will be created
Throws:
JadortServiceException

getCurrentOperation

OperationStateBean getCurrentOperation()
                                       throws JadortServiceException
Returns the current operation. You need to use this method in order to get all details related to the progress of the current operation, the list of groups, the list of applications, etc.

Returns:
The current operation.
Throws:
JadortServiceException

next

void next()
          throws JadortServiceException
goes to next step

Throws:
JadortServiceException
See Also:
IJadortService#canGoToNextStep()

previous

void previous()
              throws JadortServiceException
Goes back to the previous step.

Throws:
JadortServiceException
See Also:
IJadortService#canGoToPreviousStep()

loadTopology

void loadTopology(java.io.File xmlTopoFile)
                  throws JadortServiceException
Loads the topology from a .xml file.

Parameters:
xmlTopoFile - the file path of the .xml file uploaded by the user, this file contains the topology description
Throws:
JadortServiceException

selectGroup

void selectGroup(GroupBean selectedGroup)
                 throws JadortServiceException
Select the group that JaDOrT will be maintaining or migrating

Parameters:
selectedGroup - the group that JaDOrT will be maintaining or migrating
Throws:
JadortServiceException

selectOperationType

void selectOperationType(IJadortService.OperationType operationType)
                         throws JadortServiceException
Select the operation type

Parameters:
operationType - the operation type
Throws:
JadortServiceException

selectVMImage

void selectVMImage(VMImageBean selectedVMImage)
                   throws JadortServiceException
Select a VM image from the VM images list. If this method is called, the selected VM image will be deployed on all maintained VMs. If you want to deploy a different VM image on each server, don't call this method but go to the next step directly.

Parameters:
selectedVMImage - the VM image to be selected
Throws:
JadortServiceException

selectVMImage

void selectVMImage(VMImageBean selectedVMImage,
                   ServerBean server)
                   throws JadortServiceException
Select a VM image from the VM images list for a given server.

Parameters:
selectedVMImage - the VM image to be selected
server - the server on which this image shall be deployed
Throws:
JadortServiceException

selectApplication

void selectApplication(java.net.URL url)
                       throws JadortServiceException
Create a new application

Parameters:
url - URL where to fetch the application. Can be local, remote (HTTP, FTP, ...)
Throws:
JadortServiceException

selectServers

void selectServers(java.util.List<ServerBean> selectedServers)
                   throws JadortServiceException
Select the servers to process

Parameters:
selectedServers - the servers to process
Throws:
JadortServiceException

restartServer

void restartServer(ServerBean server)
                   throws JadortServiceException
Restarts a ServerBean that's in an error.

Parameters:
server - the server on which the task will be restarted
Throws:
JadortServiceException

checkServer

boolean checkServer(ServerBean server)
                    throws JadortServiceException
Checks if the problem on a given ServerBean has been resolved.

Parameters:
server - the server that will be checked
Returns:
true if the problem is resolved and it can be ignored safely, false if the problem still persists
Throws:
JadortServiceException

ignoreServer

void ignoreServer(ServerBean server)
                  throws JadortServiceException
Ignores the error on a given ServerBean.

Parameters:
server - the server that will be ignored
Throws:
JadortServiceException

abortServer

void abortServer(ServerBean server)
                 throws JadortServiceException
Aborts the task a ServerBean is currently doing.

Parameters:
server - the server that will be aborted
Throws:
JadortServiceException

restartWorker

void restartWorker(WorkerBean worker)
                   throws JadortServiceException
Restarts a WorkerBean that's in an error.

Parameters:
worker - the worker on which the task will be restarted
Throws:
JadortServiceException

checkWorker

boolean checkWorker(WorkerBean worker)
                    throws JadortServiceException
Checks if the problem on a given WorkerBean has been resolved.

Parameters:
worker - the worker that will be checked
Returns:
true if the problem is resolved and it can be ignored safely, false if the problem still persists
Throws:
JadortServiceException

ignoreWorker

void ignoreWorker(WorkerBean worker)
                  throws JadortServiceException
Ignores the error on a given WorkerBean.

Parameters:
worker - the worker that will be ignored
Throws:
JadortServiceException

abortWorker

void abortWorker(WorkerBean worker)
                 throws JadortServiceException
Aborts the task a WorkerBean is currently doing.

Parameters:
worker - the worker that will be aborted
Throws:
JadortServiceException


Copyright © 2009 OW2 Consortium. All Rights Reserved.