Package org.btrplace.json.plan
Class ResumeVMConverter
java.lang.Object
org.btrplace.json.plan.ResumeVMConverter
- All Implemented Interfaces:
ActionConverter<ResumeVM>
public class ResumeVMConverter extends Object implements ActionConverter<ResumeVM>
JSON serialisation for
ResumeVM
actions.-
Field Summary
Fields inherited from interface org.btrplace.json.plan.ActionConverter
END_LABEL, ID_LABEL, NODE_LABEL, ON_LABEL, RC_AMOUNT_LABEL, RC_LABEL, START_LABEL, VM_DESTINATION_LABEL, VM_LABEL, VM_LOCATION_LABEL
-
Constructor Summary
Constructors Constructor Description ResumeVMConverter()
-
Method Summary
Modifier and Type Method Description void
fillJSON(ResumeVM ac, net.minidev.json.JSONObject ob)
Fill the JSON skeleton that will represent this action.ResumeVM
fromJSON(Model mo, net.minidev.json.JSONObject ob)
Create an action from a JSON Object.String
id()
The JSON identifier for the action.Class<ResumeVM>
supportedAction()
The action that is supported by this converter.
-
Constructor Details
-
ResumeVMConverter
public ResumeVMConverter()
-
-
Method Details
-
id
Description copied from interface:ActionConverter
The JSON identifier for the action.- Specified by:
id
in interfaceActionConverter<ResumeVM>
- Returns:
- a String that will be written inside the field
ActionConverter.ID_LABEL
-
supportedAction
Description copied from interface:ActionConverter
The action that is supported by this converter.- Specified by:
supportedAction
in interfaceActionConverter<ResumeVM>
- Returns:
- the action class.
-
fillJSON
Description copied from interface:ActionConverter
Fill the JSON skeleton that will represent this action. The events will be added in a later stage.- Specified by:
fillJSON
in interfaceActionConverter<ResumeVM>
- Parameters:
ac
- the action.ob
- the object to fill.
-
fromJSON
Description copied from interface:ActionConverter
Create an action from a JSON Object. The events attached to the hooks will be parsed in a later stage.- Specified by:
fromJSON
in interfaceActionConverter<ResumeVM>
- Parameters:
mo
- the model to use to parse elements.ob
- the object to convert- Returns:
- the resulting action.
- Throws:
JSONConverterException
- if the conversion failed.
-