org.ow2.jasmine.jadort.api.entities.deployment
Class OperationStateBean

java.lang.Object
  extended by org.ow2.jasmine.jadort.api.entities.deployment.OperationStateBean
All Implemented Interfaces:
java.io.Serializable

public class OperationStateBean
extends java.lang.Object
implements java.io.Serializable

Bean that represents an operation

Author:
Malek Chahine, Remy Bresson, S. Ali Tokmen
See Also:
Serialized Form

Nested Class Summary
static class OperationStateBean.ActionState
          Different states for a progress action.
static class OperationStateBean.Step
          Different steps of an operation.
 
Constructor Summary
OperationStateBean()
          Default OperationStateBean constructor
 
Method Summary
 void addAllServerProgressList(java.util.Collection<ServerProgressBean> serverProgressListToAdd)
           
 void addAllServerProgressList(ServerProgressBean serverProgressToAdd)
           
 void addAllWorkerProgressList(java.util.Collection<WorkerProgressBean> workerProgressListToAdd)
           
 void addAllWorkerProgressList(WorkerProgressBean workerProgressToAdd)
           
 boolean equals(java.lang.Object obj)
          
 int getAimedProgressPercent()
          Get the progress percent to reach, when the operation is in the OperationStateBean.Step.EXECUTING_MIGRATION, OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION , OperationStateBean.Step.EXECUTING_MIGRATION_OSGI, OperationStateBean.Step.ERASE_OLD_VERSIONS, OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER or OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps.
 ServerProgressState getAimedServerProgressState()
          Get the serverProgress step to reach
 WorkerProgressState getAimedWorkerProgressState()
           
 java.util.Set<ServerProgressBean> getAllServerProgressList()
           
 java.util.Set<WorkerProgressBean> getAllWorkerProgressList()
           
 ApplicationBean getApplication()
          Get the application to deploy
 boolean getCanGoToNextStep()
           
 boolean getCanGoToPreviousStep()
           
 OperationStateBean.Step getCurrentStep()
          Get the current operation step
 java.util.Date getDate()
          Get the operation creation date
 java.lang.Integer getId()
          Get the operation id
 boolean getIsDeletable()
           
 java.lang.String getName()
          Get the operation name
 GroupBean getSelectedGroup()
          Get the selected group
 java.util.List<ServerProgressBean> getServerProgressList()
          Get the list of ServerProgressBean that compose the operation
 TopologyBean getTopology()
          Get the topology
 IJadortService.OperationType getType()
           
 VMImageBean getVmImage()
          Get the VM Image to deploy
 java.util.List<WorkerProgressBean> getWorkerProgressList()
          Get the list of WorkerProgressBean that compose the operation
 void setAimedProgressPercent(int aimedProgressPercent)
          Set the progress percent to reach, when the operation is in the OperationStateBean.Step.EXECUTING_MIGRATION, OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION , OperationStateBean.Step.EXECUTING_MIGRATION_OSGI, OperationStateBean.Step.ERASE_OLD_VERSIONS, OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER or OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps.
 void setAimedServerProgressState(ServerProgressState globalServerProgressState)
          Set the serverProgress step to reach
 void setAimedWorkerProgressState(WorkerProgressState aimedWorkerProgressState)
           
 void setAllServerProgressList(java.util.Set<ServerProgressBean> allServerProgressList)
           
 void setAllWorkerProgressList(java.util.Set<WorkerProgressBean> allWorkerProgressList)
           
 void setApplication(ApplicationBean application)
          Set the application to deploy
 void setCanGoToNextStep(boolean canGoToNextStep)
           
 void setCanGoToPreviousStep(boolean canGoToPreviousStep)
           
 void setCurrentStep(OperationStateBean.Step step)
          Set the current operation step
 void setDate(java.util.Date date)
          Set the operation creation date
 void setId(java.lang.Integer id)
          Set the operation id
 void setName(java.lang.String name)
          Set the operation name
 void setSelectedGroup(GroupBean selectedGroup)
          Set the selected group
 void setServerProgressList(java.util.List<ServerProgressBean> serverProgressList)
          Set the list of ServerProgressBean that compose the operation
 void setTopology(TopologyBean topology)
          Set the topology
 void setType(IJadortService.OperationType type)
           
 void setVmImage(VMImageBean vmImage)
          Set the VM Image to deploy
 void setWorkerProgressList(java.util.List<WorkerProgressBean> workerProgressList)
          Set the list of WorkerProgressBean that compose the operation
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperationStateBean

public OperationStateBean()
Default OperationStateBean constructor

Method Detail

getId

public java.lang.Integer getId()
Get the operation id

Returns:
the operation id

setId

public void setId(java.lang.Integer id)
Set the operation id


getAimedServerProgressState

public ServerProgressState getAimedServerProgressState()
Get the serverProgress step to reach

Returns:
serverProgress step to reach

setAimedServerProgressState

public void setAimedServerProgressState(ServerProgressState globalServerProgressState)
Set the serverProgress step to reach

Parameters:
globalServerProgressState - the new serverProgress step to reach

getAimedProgressPercent

public int getAimedProgressPercent()
Get the progress percent to reach, when the operation is in the OperationStateBean.Step.EXECUTING_MIGRATION, OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION , OperationStateBean.Step.EXECUTING_MIGRATION_OSGI, OperationStateBean.Step.ERASE_OLD_VERSIONS, OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER or OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps.

Returns:
The progress percent to reach.

setAimedProgressPercent

public void setAimedProgressPercent(int aimedProgressPercent)
Set the progress percent to reach, when the operation is in the OperationStateBean.Step.EXECUTING_MIGRATION, OperationStateBean.Step.UNDEPLOY_ERASE_OLD_VERSION , OperationStateBean.Step.EXECUTING_MIGRATION_OSGI, OperationStateBean.Step.ERASE_OLD_VERSIONS, OperationStateBean.Step.EXECUTING_MAINTENANCE_CLUSTER or OperationStateBean.Step.EXECUTING_MAINTENANCE_NO_CLUSTER steps.

Parameters:
aimedProgressPercent - The progress percent to reach.

getCurrentStep

public OperationStateBean.Step getCurrentStep()
Get the current operation step

Returns:
the current operation step

setCurrentStep

public void setCurrentStep(OperationStateBean.Step step)
                    throws java.lang.IllegalArgumentException
Set the current operation step

Parameters:
step - the current operation step
Throws:
java.lang.IllegalArgumentException - If step is OperationStateBean.Step.SELECT_OPERATION

getCanGoToNextStep

public boolean getCanGoToNextStep()
Returns:
Whether we can go to the next step

This value is re-set every time the object is refreshed on the stateful bean, and not persisted.

setCanGoToNextStep

public void setCanGoToNextStep(boolean canGoToNextStep)
Parameters:
canGoToNextStep - Whether we can go to the next step

This value is re-set every time the object is refreshed on the stateful bean, and not persisted.

getCanGoToPreviousStep

public boolean getCanGoToPreviousStep()
Returns:
Whether we can go to the previous step

This value is re-set every time the object is refreshed on the stateful bean, and not persisted.

setCanGoToPreviousStep

public void setCanGoToPreviousStep(boolean canGoToPreviousStep)
Parameters:
canGoToNextStep - Whether we can go to the previous step

This value is re-set every time the object is refreshed on the stateful bean, and not persisted.

getSelectedGroup

public GroupBean getSelectedGroup()
Get the selected group

Returns:
the selected group

setSelectedGroup

public void setSelectedGroup(GroupBean selectedGroup)
Set the selected group

Parameters:
selectedGroup - The group to select

getTopology

public TopologyBean getTopology()
Get the topology

Returns:
the topology

setTopology

public void setTopology(TopologyBean topology)
Set the topology

Parameters:
topology - The topology to set

getServerProgressList

public java.util.List<ServerProgressBean> getServerProgressList()
Get the list of ServerProgressBean that compose the operation

Returns:
the list of ServerProgressBean that compose the operation

setServerProgressList

public void setServerProgressList(java.util.List<ServerProgressBean> serverProgressList)
Set the list of ServerProgressBean that compose the operation

Parameters:
serverProgressList - the new list of ServerProgressBean that compose the operation

getType

public IJadortService.OperationType getType()
Returns:
the operation type

setType

public void setType(IJadortService.OperationType type)
Parameters:
type - operation type (migrateApplication or maintain)

getWorkerProgressList

public java.util.List<WorkerProgressBean> getWorkerProgressList()
Get the list of WorkerProgressBean that compose the operation

Returns:
the list of WorkerProgressBean that compose the operation

setWorkerProgressList

public void setWorkerProgressList(java.util.List<WorkerProgressBean> workerProgressList)
Set the list of WorkerProgressBean that compose the operation

Parameters:
serverProgressList - the new list of WorkerProgressBean that compose the operation

getAimedWorkerProgressState

public WorkerProgressState getAimedWorkerProgressState()
Returns:
aimed worker progress state

setAimedWorkerProgressState

public void setAimedWorkerProgressState(WorkerProgressState aimedWorkerProgressState)
Parameters:
aimedWorkerProgressState - aimed worker progress state

getAllServerProgressList

public java.util.Set<ServerProgressBean> getAllServerProgressList()
Returns:
All (currently active + past) ServerProgressBean objects of the operation

setAllServerProgressList

public void setAllServerProgressList(java.util.Set<ServerProgressBean> allServerProgressList)
Parameters:
allServerProgressList - All (currently active + past) ServerProgressBean objects of the operation

addAllServerProgressList

public void addAllServerProgressList(java.util.Collection<ServerProgressBean> serverProgressListToAdd)
Parameters:
serverProgressListToAdd - The ServerProgressBean objects to add

addAllServerProgressList

public void addAllServerProgressList(ServerProgressBean serverProgressToAdd)
Parameters:
serverProgressToAdd - The ServerProgressBean to add

getAllWorkerProgressList

public java.util.Set<WorkerProgressBean> getAllWorkerProgressList()
Returns:
All (currently active + past) WorkerProgressBean objects of the operation

setAllWorkerProgressList

public void setAllWorkerProgressList(java.util.Set<WorkerProgressBean> allWorkerProgressList)
Parameters:
allWorkerProgressList - All (currently active + past) WorkerProgressBean objects of the operation

addAllWorkerProgressList

public void addAllWorkerProgressList(java.util.Collection<WorkerProgressBean> workerProgressListToAdd)
Parameters:
workerProgressListToAdd - The WorkerProgressBean objects to add

addAllWorkerProgressList

public void addAllWorkerProgressList(WorkerProgressBean workerProgressToAdd)
Parameters:
workerProgressToAdd - The WorkerProgressBean to add

getApplication

public ApplicationBean getApplication()
Get the application to deploy

Returns:
the application to deploy

setApplication

public void setApplication(ApplicationBean application)
Set the application to deploy

Parameters:
application - the application to deploy

getVmImage

public VMImageBean getVmImage()
Get the VM Image to deploy

Returns:
the VM Image to deploy

setVmImage

public void setVmImage(VMImageBean vmImage)
Set the VM Image to deploy

Parameters:
VMImage - the VM Image to deploy

getDate

public java.util.Date getDate()
Get the operation creation date

Returns:
the operation creation date

setDate

public void setDate(java.util.Date date)
Set the operation creation date

Parameters:
date - the operation creation date

getName

public java.lang.String getName()
Get the operation name

Returns:
the operation name

setName

public void setName(java.lang.String name)
Set the operation name

Parameters:
name - the operation name

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object
Returns:
true if obj is an OperationStateBean and the getId() is the same for both objects, false otherwise.

getIsDeletable

public boolean getIsDeletable()
Returns:
Whether the operation can be deleted.


Copyright © 2010 OW2 Consortium. All Rights Reserved.