}
return cmd;
}
private static UpdateStateCommand toUpdateContextCommand(AbstractContext context) {
UpdateStateCommand cmd = null;
if (context instanceof ConfigurationContext) {
cmd = new UpdateConfigurationStateCommand();
} else if (context instanceof ServiceGroupContext) {
ServiceGroupContext sgCtx = (ServiceGroupContext) context;
cmd = new UpdateServiceGroupStateCommand();