this.excludedOps = new HashSet<String>(Arrays.asList(excludeOperations));
} else {
excludedOps = Collections.emptySet();
}
profile = new ArgumentWithValue(this, new DefaultCompleter(new CandidatesProvider(){
@Override
public List<String> getAllCandidates(CommandContext ctx) {
return Util.getNodeNames(ctx.getModelControllerClient(), null, Util.PROFILE);
}}), "--profile") {
@Override
public boolean canAppearNext(CommandContext ctx) throws CommandFormatException {
if(!isDependsOnProfile()) {
return false;
}
if(!ctx.isDomainMode()) {
return false;
}
return super.canAppearNext(ctx);
}
};
//profile.addCantAppearAfter(helpArg);
operation = new ArgumentWithValue(this, new DefaultCompleter(new CandidatesProvider(){
@Override
public Collection<String> getAllCandidates(CommandContext ctx) {
DefaultOperationRequestAddress address = new DefaultOperationRequestAddress();
if(isDependsOnProfile() && ctx.isDomainMode()) {
final String profileName = profile.getValue(ctx.getParsedCommandLine());