@Override
public void execute(AdminCommandContext context) {
ActionReport report = context.getActionReport();
RestConfig restConfig = config.getExtensionByType(RestConfig.class);
/**
* The schedules does not exist in this Config. We will need to
* add it plus the default schedules.
*/
if (restConfig == null) {
try {
ConfigSupport.apply(new SingleConfigCode<Config>() {
@Override
public Object run(Config parent) throws TransactionFailure {
RestConfig child = parent.createChild(RestConfig.class);
parent.getContainers().add(child);
return child;
}
}, config);
} catch (TransactionFailure e) {