Codota Logo
MetaService.changeUserPassword
Code IndexAdd Codota to your IDE (free)

How to use
changeUserPassword
method
in
com.enioka.admin.MetaService

Best Java code snippets using com.enioka.admin.MetaService.changeUserPassword (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: enioka/jqm

  @Override
  int doWork()
  {
    try (DbConn cnx = Helpers.getNewDbSession())
    {
      Helpers.createUserIfMissing(cnx, login, password, "created through CLI", roles.toArray(new String[roles.size()]));
      MetaService.changeUserPassword(cnx, login, password);
      cnx.commit();
      return 0;
    }
  }
}
origin: com.enioka.jqm/jqm-admin

public static void changeUserPassword(DbConn cnx, String userLogin, String newPassword)
{
  List<RUserDto> dtos = getUsers(cnx, "user_select_by_key", 0, userLogin);
  if (dtos.size() == 0)
  {
    throw new JqmAdminApiUserException("Cannot update the password of a user which does not exist - given login was " + userLogin);
  }
  changeUserPassword(cnx, dtos.get(0).getId(), newPassword);
}
origin: enioka/jqm

public static void changeUserPassword(DbConn cnx, String userLogin, String newPassword)
{
  List<RUserDto> dtos = getUsers(cnx, "user_select_by_key", 0, userLogin);
  if (dtos.size() == 0)
  {
    throw new JqmAdminApiUserException("Cannot update the password of a user which does not exist - given login was " + userLogin);
  }
  changeUserPassword(cnx, dtos.get(0).getId(), newPassword);
}
origin: enioka/jqm

  @Override
  int doWork()
  {
    try (DbConn cnx = Helpers.getNewDbSession())
    {
      Helpers.createRoleIfMissing(cnx, "administrator", "all permissions without exception", "*:*");
      Helpers.createUserIfMissing(cnx, "root", password, "all powerful user", "administrator");
      MetaService.changeUserPassword(cnx, "root", password);
      cnx.commit();
      return 0;
    }
    catch (Exception ex)
    {
      jqmlogger.error("Could not reset the root account", ex);
      return 108;
    }
  }
}
origin: com.enioka.jqm/jqm-service

private static void user(String[] options)
{
  if (options.length < 3)
  {
    throw new IllegalArgumentException("-U option requires one login, one password and at least one role (in this order)");
  }
  DbConn cnx = null;
  try
  {
    cnx = Helpers.getNewDbSession();
    String[] roles = new String[options.length - 2];
    for (int i = 2; i < options.length; i++)
    {
      roles[i - 2] = options[i];
    }
    Helpers.createUserIfMissing(cnx, options[0], options[1], "created through CLI", roles);
    MetaService.changeUserPassword(cnx, options[0], options[1]);
    cnx.commit();
  }
  finally
  {
    Helpers.closeQuietly(cnx);
  }
}
origin: com.enioka.jqm/jqm-service

private static void root(String password)
{
  DbConn cnx = null;
  try
  {
    cnx = Helpers.getNewDbSession();
    Helpers.createRoleIfMissing(cnx, "administrator", "all permissions without exception", "*:*");
    Helpers.createUserIfMissing(cnx, "root", password, "all powerful user", "administrator");
    MetaService.changeUserPassword(cnx, "root", password);
    cnx.commit();
  }
  catch (Exception ex)
  {
    jqmlogger.fatal("Could not reset the root account", ex);
  }
  finally
  {
    Helpers.closeQuietly(cnx);
  }
}
origin: com.enioka.jqm/jqm-admin

changeUserPassword(cnx, dto.getId(), dto.getNewPassword());
changeUserPassword(cnx, newId, dto.getNewPassword());
origin: enioka/jqm

changeUserPassword(cnx, dto.getId(), dto.getNewPassword());
changeUserPassword(cnx, newId, dto.getNewPassword());
com.enioka.adminMetaServicechangeUserPassword

Popular methods of MetaService

  • getNodes
  • getQueueMappings
  • upsertNode
  • getGlobalParameter
  • getJndiObjectResource
  • getJobDef
  • getNode
  • getRoles
  • upsertJndiObjectResource
    Update or insert a resource. Convention is that if dto.id is null, we always insert. If non null, al
  • upsertJobDef
  • addSubElementsToDto
  • deleteAllTransac
    This method is an exception - it does not deal with metadata but transactional data. It is included
  • addSubElementsToDto,
  • deleteAllTransac,
  • deleteGlobalParameter,
  • deleteJndiObjectResource,
  • deleteJobDef,
  • deleteQueue,
  • deleteQueueMapping,
  • deleteRole,
  • deleteUser

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now