use of org.springframework.roo.addon.tailor.actions.Action in project spring-roo by spring-projects.
the class DefaultTailorImpl method execute.
private void execute(final CommandTransformation commandTrafo) {
final TailorConfiguration configuration = configLocator.getActiveTailorConfiguration();
if (configuration == null) {
return;
}
final CommandConfiguration commandConfig = configuration.getCommandConfigFor(commandTrafo.getInputCommand());
if (commandConfig == null) {
return;
}
logInDevelopmentMode(Level.INFO, "Tailor: detected " + commandTrafo.getInputCommand());
for (final ActionConfig config : commandConfig.getActions()) {
final Action component = actionLocator.getAction(config.getActionTypeId());
if (component != null) {
logInDevelopmentMode(Level.INFO, "\tTailoring: " + component.getDescription(config));
component.execute(commandTrafo, config);
} else {
logInDevelopmentMode(Level.WARNING, "\tTailoring: Couldn't find action '" + config.getActionTypeId());
}
}
}
Aggregations