public GroupBuilder addApplicationOptions()

in vault-cli/src/main/java/org/apache/jackrabbit/vault/cli/VaultFsApp.java [546:709]


    public GroupBuilder addApplicationOptions(GroupBuilder gbuilder) {
        /*
        optURI = new DefaultOptionBuilder()
                .withLongName("uri")
                .withDescription("The rmi uri in the format '//<host>:<port>/<name>'.")
                .withArgument(new ArgumentBuilder()
                        .withDescription("defaults to '" + DEFAULT_RMIURI + "'")
                        .withMinimum(0)
                        .withMaximum(1)
                        .create()
                )
                .create();

        optWorkspace = new DefaultOptionBuilder()
                .withLongName("workspace")
                .withDescription("The default workspace to connect to.")
                .withArgument(new ArgumentBuilder()
                        .withDescription("If missing the default workspace is used.")
                        .withMinimum(0)
                        .withMaximum(1)
                        .create()
                )
                .create();
        */
        optCreds = new DefaultOptionBuilder()
                .withLongName("credentials")
                .withDescription("The default credentials to use")
                .withArgument(new ArgumentBuilder()
                        .withDescription("Format: <user:pass>. If missing an anonymous login is used. " +
                                "If the password is not specified it is prompted via console.")
                        .withMinimum(0)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optUpdateCreds = new DefaultOptionBuilder()
                .withLongName("update-credentials")
                .withDescription("if present the credentials-to-host list is updated in the ~/.vault/auth.xml")
                .create();
        /*
        optMountpoint = new DefaultOptionBuilder()
                .withLongName("mountpoint")
                .withDescription("The default mountpoint to use")
                .withArgument(new ArgumentBuilder()
                        .withDescription("If missing, the root node is used as mountpoint.")
                        .withMinimum(0)
                        .withMaximum(1)
                        .create()
                )
                 .create();
        */
        optConfig = new DefaultOptionBuilder()
                .withLongName("config")
                .withDescription("The JcrFs config to use")
                .withArgument(new ArgumentBuilder()
                        .withDescription("If missing the default config is used.")
                        .withMinimum(0)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optUseSystemProperties = new DefaultOptionBuilder()
                .withLongName("useSystemProperties")
                .withDescription("Evaluating the default Java system properties for connection settings.")
                .create();
        optAllowSelfSignedCertificate = new DefaultOptionBuilder()
                .withLongName("allowSelfSignedCertificates")
                .withDescription("Allows to connect to HTTPS repository urls whose certificate is self-signed.")
                .create();
        optDisableHostnameValidation = new DefaultOptionBuilder()
                .withLongName("disableHostnameValidator")
                .withDescription("Disables hostname validation for HTTPS repository urls.")
                .create();
        optConnectionTimeoutMs = new DefaultOptionBuilder()
                .withLongName("connectionTimeoutMs")
                .withDescription("The connection timeout in milliseconds.")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optRequestTimeoutMs = new DefaultOptionBuilder()
                .withLongName("requestTimeoutMs")
                .withDescription("The request timeout in milliseconds.")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optSocketTimeoutMs = new DefaultOptionBuilder()
                .withLongName("socketTimeoutMs")
                .withDescription("The socket timeout in milliseconds.")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optProxyHost = new DefaultOptionBuilder()
                .withLongName("proxyHost")
                .withDescription("The host of the proxy to use.")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optProxyPort = new DefaultOptionBuilder()
                .withLongName("proxyPort")
                .withDescription("The port where the proxy is running (requires proxyHost as well).")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optProxyProtocol = new DefaultOptionBuilder()
                .withLongName("proxyProtocol")
                .withDescription("The protocol for which to use the proxy (requires proxyHost as well). If not set proxy is used for both HTTP and HTTPS.")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optProxyUsername = new DefaultOptionBuilder()
                .withLongName("proxyUsername")
                .withDescription("The username to use for authentication at the proxy (requires proxyHost as well).")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        optProxyPassword = new DefaultOptionBuilder()
                .withLongName("proxyPassword")
                .withDescription("The password to use for authentication at the proxy (requires proxyUsername as well)")
                .withArgument(new ArgumentBuilder()
                        .withMinimum(1)
                        .withMaximum(1)
                        .create()
                )
                .create();
        // register extended options
        for (ExtendedOption x: xOpts) {
            gbuilder.withOption(x.getOption());
        }
        //gbuilder.withOption(optURI);
        //gbuilder.withOption(optWorkspace);
        gbuilder.withOption(optCreds);
        gbuilder.withOption(optUpdateCreds);
        //gbuilder.withOption(optMountpoint);
        gbuilder.withOption(optConfig);
        gbuilder.withOption(optUseSystemProperties);
        gbuilder.withOption(optAllowSelfSignedCertificate);
        gbuilder.withOption(optDisableHostnameValidation);
        gbuilder.withOption(optConnectionTimeoutMs);
        gbuilder.withOption(optRequestTimeoutMs);
        gbuilder.withOption(optSocketTimeoutMs);
        gbuilder.withOption(optProxyHost).withOption(optProxyPort).withOption(optProxyProtocol).withOption(optProxyUsername).withOption(optProxyPassword);
        return super.addApplicationOptions(gbuilder);
    }