return super.canAppearNext(ctx);
}
};
*/
RequestParamArgWithValue driverName = new RequiredRequestParamArg("driver-name", this,
new DefaultCompleter(new CandidatesProvider() {
@Override
public List<String> getAllCandidates(CommandContext ctx) {
final String profileName;
if (ctx.isDomainMode()) {
profileName = profile.getValue(ctx.getParsedCommandLine());
if (profileName == null) {
return Collections.emptyList();
}
} else {
profileName = null;
}
OperationRequestAddress datasources = new DefaultOperationRequestAddress();
if (profileName != null) {
datasources.toNode("profile", profileName);
}
datasources.toNode("subsystem", "datasources");
return Util.getNodeNames(
ctx.getModelControllerClient(), datasources,
"jdbc-driver");
}
}));
driverName.addRequiredPreceding(jndiName);
RequestParamArgWithValue poolName = new RequiredRequestParamArg("pool-name", this, "--pool-name");
poolName.addRequiredPreceding(driverName);
return poolName;
}