Package org.platformlayer.keystone.cli.commands

Source Code of org.platformlayer.keystone.cli.commands.ListUsers

package org.platformlayer.keystone.cli.commands;

import java.util.List;

import org.kohsuke.args4j.Argument;
import org.platformlayer.RepositoryException;
import org.platformlayer.auth.UserDatabase;

public class ListUsers extends KeystoneCommandRunnerBase {
  @Argument(index = 0)
  public String prefix;

  public ListUsers() {
    super("list", "users");
  }

  @Override
  public Object runCommand() throws RepositoryException {
    UserDatabase userRepository = getContext().getUserRepository();

    List<String> users = userRepository.listAllUserNames(prefix);
    return users;
  }

}
TOP

Related Classes of org.platformlayer.keystone.cli.commands.ListUsers

TOP
Copyright © 2018 www.massapi.com. 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.