use of org.jboss.galleon.layout.ProvisioningLayout in project galleon by wildfly.
the class GetInfoCommand method runCommand.
@Override
protected void runCommand(PmCommandInvocation invoc) throws CommandExecutionException {
try {
Function<ProvisioningLayout<FeaturePackLayout>, FeatureContainer> supplier = new Function<ProvisioningLayout<FeaturePackLayout>, FeatureContainer>() {
public FeatureContainer apply(ProvisioningLayout<FeaturePackLayout> layout) {
try {
return getFeatureContainer(invoc.getPmSession(), layout);
} catch (CommandExecutionException | ProvisioningException | IOException ex) {
throw new RuntimeException(ex);
}
}
};
ProvisioningManager mgr = getManager(invoc.getPmSession());
StateInfoUtil.displayInfo(invoc, mgr.getInstallationHome(), mgr.getProvisioningConfig(), type, supplier);
} catch (ProvisioningException | CommandExecutionException ex) {
throw new CommandExecutionException(invoc.getPmSession(), CliErrors.infoFailed(), ex);
}
}
use of org.jboss.galleon.layout.ProvisioningLayout in project galleon by wildfly.
the class StateGetInfoCommand method runCommand.
@Override
protected void runCommand(PmCommandInvocation invoc) throws CommandExecutionException {
try {
ProvisioningConfig config = invoc.getPmSession().getContainer().getProvisioningConfig();
Function<ProvisioningLayout<FeaturePackLayout>, FeatureContainer> supplier = new Function<ProvisioningLayout<FeaturePackLayout>, FeatureContainer>() {
public FeatureContainer apply(ProvisioningLayout<FeaturePackLayout> layout) {
return invoc.getPmSession().getState().getContainer();
}
};
StateInfoUtil.displayInfo(invoc, null, config, type, supplier);
} catch (Exception ex) {
throw new CommandExecutionException(invoc.getPmSession(), CliErrors.infoFailed(), ex);
}
}
Aggregations