Package org.jboss.as.cli.impl

Examples of org.jboss.as.cli.impl.RequiredRequestParamArg


                }
                return super.canAppearNext(ctx);
            }
        };

        jndiName =  new RequiredRequestParamArg("jndi-name", this, "--jndi-name") {
            @Override
            public boolean canAppearNext(CommandContext ctx) throws CommandFormatException {
                if(ctx.isDomainMode() && !profile.isPresent(ctx.getParsedArguments())) {
                    return false;
                }
View Full Code Here


            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.getParsedArguments());
                            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;
    }
View Full Code Here

    }

    @Override
    public RequestParamArgWithValue initRequiredArguments() {
        ArgumentWithoutValue lastRequired = super.initRequiredArguments();
        RequestParamArgWithValue xaDataSourceClass = new RequiredRequestParamArg("xa-data-source-class", this);
        xaDataSourceClass.addRequiredPreceding(lastRequired);

        RequestParamArgWithValue xaProps = new RequestParamPropertiesArg("xa-data-source-properties", this);
        xaProps.addRequiredPreceding(xaDataSourceClass);

        return xaProps;
View Full Code Here

                }
                return super.canAppearNext(ctx);
            }
        };

        jndiName =  new RequiredRequestParamArg("jndi-name", this, "--jndi-name") {
            @Override
            public boolean canAppearNext(CommandContext ctx) throws CommandFormatException {
                if(ctx.isDomainMode() && !profile.isPresent(ctx.getParsedArguments())) {
                    return false;
                }
View Full Code Here

            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.getParsedArguments());
                            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;
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.cli.impl.RequiredRequestParamArg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.