Package org.jboss.as.domain.management.security.state

Examples of org.jboss.as.domain.management.security.state.StateValues


    protected State nextState;

    protected AddPropertiesUser() {
        theConsole = new JavaConsole();
        StateValues stateValues = new StateValues();
        stateValues.setJbossHome(System.getenv("JBOSS_HOME"));

        if (theConsole.getConsole() == null) {
            throw MESSAGES.noConsoleAvailable();
        }
        nextState = new PropertyFilePrompt(theConsole, stateValues);
View Full Code Here


        nextState = new PropertyFilePrompt(theConsole, stateValues);
    }

    protected AddPropertiesUser(ConsoleWrapper console) {
        this.theConsole = console;
        StateValues stateValues = new StateValues();
        stateValues.setJbossHome(System.getenv("JBOSS_HOME"));
        nextState = new PropertyFilePrompt(theConsole,stateValues);
    }
View Full Code Here

        nextState = new PropertyFilePrompt(theConsole,stateValues);
    }

    private AddPropertiesUser(final boolean management, final String user, final char[] password, final String realm) {
        boolean silent = false;
        StateValues stateValues = new StateValues();
        stateValues.setJbossHome(System.getenv("JBOSS_HOME"));
        String valueSilent = argsCliProps.getProperty("silent");

        if (valueSilent != null) {
            silent = Boolean.valueOf(valueSilent);
        }
        if (silent) {
            stateValues.setHowInteractive(Interactiveness.SILENT);
        } else {
            stateValues.setHowInteractive(Interactiveness.NON_INTERACTIVE);
        }

        theConsole = new JavaConsole();
        if (theConsole.getConsole() == null && !stateValues.isSilent()) {
            throw MESSAGES.noConsoleAvailable();
        }
        stateValues.setUserName(user);
        stateValues.setPassword(password);
        stateValues.setRealm(realm);
        stateValues.setManagement(management);

        nextState = new PropertyFileFinder(theConsole, stateValues);
    }
View Full Code Here

    protected State nextState;

    protected AddPropertiesUser() {
        theConsole = new JavaConsole();
        StateValues stateValues = new StateValues();
        stateValues.setJbossHome(System.getenv("JBOSS_HOME"));

        if (theConsole.getConsole() == null) {
            throw MESSAGES.noConsoleAvailable();
        }
        nextState = new PropertyFilePrompt(theConsole, stateValues);
View Full Code Here

        nextState = new PropertyFilePrompt(theConsole, stateValues);
    }

    protected AddPropertiesUser(ConsoleWrapper console) {
        this.theConsole = console;
        StateValues stateValues = new StateValues();
        stateValues.setJbossHome(System.getenv("JBOSS_HOME"));
        nextState = new PropertyFilePrompt(theConsole,stateValues);
    }
View Full Code Here

        nextState = new PropertyFilePrompt(theConsole,stateValues);
    }

    private AddPropertiesUser(final boolean management, final String user, final char[] password, final String realm) {
        boolean silent = false;
        StateValues stateValues = new StateValues();
        stateValues.setJbossHome(System.getenv("JBOSS_HOME"));
        String valueSilent = argsCliProps.getProperty("silent");

        if (valueSilent != null) {
            silent = Boolean.valueOf(valueSilent);
        }
        if (silent) {
            stateValues.setHowInteractive(Interactiveness.SILENT);
        } else {
            stateValues.setHowInteractive(Interactiveness.NON_INTERACTIVE);
        }

        // Silent modes still need to be able to output an error on failure.
        theConsole = new JavaConsole();
        if (theConsole.getConsole() == null) {
            throw MESSAGES.noConsoleAvailable();
        }
        stateValues.setUserName(user);
        stateValues.setPassword(password);
        stateValues.setRealm(realm);
        stateValues.setManagement(management);

        nextState = new PropertyFileFinder(theConsole, stateValues);
    }
View Full Code Here

    protected State nextState;

    protected AddPropertiesUser(ConsoleWrapper console) {
        theConsole = console;
        StateValues stateValues = new StateValues();
        stateValues.setJBossHome(System.getenv("JBOSS_HOME"));

        if (theConsole.getConsole() == null) {
            throw MESSAGES.noConsoleAvailable();
        }
        nextState = new PropertyFilePrompt(theConsole, stateValues);
View Full Code Here

        }
        nextState = new PropertyFilePrompt(theConsole, stateValues);
    }

    private AddPropertiesUser(ConsoleWrapper console, final boolean management, final String user, final String password, final String realm) {
        StateValues stateValues = new StateValues();
        stateValues.setJBossHome(System.getenv("JBOSS_HOME"));

        final Interactiveness howInteractive;
        boolean silent = Boolean.valueOf(argsCliProps.getProperty(CommandLineArgument.SILENT.key()));
        if (silent) {
            howInteractive = Interactiveness.SILENT;
        } else {
            howInteractive = Interactiveness.NON_INTERACTIVE;
        }
        stateValues.setHowInteractive(howInteractive);

        // Silent modes still need to be able to output an error on failure.
        theConsole = console;
        if (theConsole.getConsole() == null && !howInteractive.equals(Interactiveness.SILENT)) {
            throw MESSAGES.noConsoleAvailable();
        }
        // Username should not be null or empty.
        if (user == null || user.isEmpty()) {
            nextState = new ErrorState(theConsole, MESSAGES.noUsernameExiting(), null, stateValues);
            return;
        }
        stateValues.setUserName(user);
        // Password should not be null or empty.
        if (password == null || password.isEmpty()) {
            nextState = new ErrorState(theConsole, MESSAGES.noPasswordExiting(), null, stateValues);
            return;
        }
        stateValues.setPassword(password.toCharArray());
        stateValues.setRealm(realm);
        stateValues.setManagement(management);
        stateValues.setRoles(argsCliProps.getProperty(CommandLineArgument.ROLE.key()));

        nextState = new PropertyFileFinder(theConsole, stateValues);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.domain.management.security.state.StateValues

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.