Codota Logo
com.enioka.api.admin
Code IndexAdd Codota to your IDE (free)

How to use com.enioka.api.admin

Best Java code snippets using com.enioka.api.admin (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: enioka/jqm

/**
 * Fluent API builder.
 *
 * @param cronExpression
 * @return
 */
public static ScheduledJob create(String cronExpression)
{
  ScheduledJob res = new ScheduledJob();
  res.cronExpression = cronExpression;
  return res;
}
origin: com.enioka.jqm/jqm-admin

public static void upsertQueueMapping(DbConn cnx, QueueMappingDto dto)
{
  if (dto.getId() != null)
  {
    cnx.runUpdate("dp_update_changed_by_id", dto.getEnabled(), dto.getNbThread(), dto.getPollingInterval(), dto.getNodeId(),
        dto.getQueueId(), dto.getId(), dto.getEnabled(), dto.getNbThread(), dto.getPollingInterval(), dto.getNodeId(),
        dto.getQueueId());
  }
  else
  {
    DeploymentParameter.create(cnx, dto.getNodeId(), dto.getNbThread(), dto.getPollingInterval(), dto.getQueueId());
  }
}
origin: com.enioka.jqm/jqm-admin

private static JndiObjectResourceDto mapJndiObjectResource(ResultSet rs) throws SQLException
{
  JndiObjectResourceDto res = new JndiObjectResourceDto();
  res.setId(rs.getInt(1));
  res.setName(rs.getString(2));
  res.setAuth(rs.getString(3));
  res.setType(rs.getString(4));
  res.setFactory(rs.getString(5));
  res.setDescription(rs.getString(6));
  res.setTemplate(rs.getString(7));
  res.setSingleton(rs.getBoolean(8));
  return res;
}
origin: com.enioka.jqm/jqm-admin

private static QueueMappingDto mapQueueMapping(ResultSet rs, int colShift)
{
  try
  {
    QueueMappingDto tmp = new QueueMappingDto();
    tmp.setId(rs.getInt(1 + colShift));
    tmp.setEnabled(rs.getBoolean(2 + colShift));
    tmp.setNbThread(rs.getInt(4 + colShift));
    tmp.setPollingInterval(rs.getInt(5 + colShift));
    tmp.setNodeId(rs.getInt(6 + colShift));
    tmp.setQueueId(rs.getInt(7 + colShift));
    tmp.setNodeName(rs.getString(8 + colShift));
    tmp.setQueueName(rs.getString(9 + colShift));
    return tmp;
  }
  catch (SQLException e)
  {
    throw new JqmAdminApiInternalException(e);
  }
}
origin: com.enioka.jqm/jqm-admin

public static void upsertQueue(DbConn cnx, QueueDto dto)
{
  if (dto.getId() != null)
  {
    cnx.runUpdate("q_update_changed_by_id", dto.isDefaultQueue(), dto.getDescription(), dto.getName(), dto.getId(),
        dto.isDefaultQueue(), dto.getDescription(), dto.getName());
  }
  else
  {
    Queue.create(cnx, dto.getName(), dto.getDescription(), dto.isDefaultQueue());
  }
}
origin: com.enioka.jqm/jqm-admin

private static QueueDto mapQueue(ResultSet rs, int colShift)
{
  try
  {
    QueueDto tmp = new QueueDto();
    tmp.setId(rs.getInt(1 + colShift));
    tmp.setDefaultQueue(rs.getBoolean(2 + colShift));
    tmp.setDescription(rs.getString(3 + colShift));
    tmp.setName(rs.getString(4 + colShift));
    return tmp;
  }
  catch (SQLException e)
  {
    throw new JqmAdminApiInternalException(e);
  }
}
origin: com.enioka.jqm/jqm-admin

private static GlobalParameterDto mapGlobalParameter(ResultSet rs) throws SQLException
{
  GlobalParameterDto res = new GlobalParameterDto();
  res.setId(rs.getInt(1));
  res.setKey(rs.getString(2));
  res.setValue(rs.getString(3));
  return res;
}
origin: com.enioka.jqm/jqm-admin

private static RRoleDto mapRole(ResultSet rs, int colShift)
{
  try
  {
    RRoleDto tmp = new RRoleDto();
    tmp.setId(rs.getInt(1 + colShift));
    tmp.setName(rs.getString(2 + colShift));
    tmp.setDescription(rs.getString(3 + colShift));
    return tmp;
  }
  catch (SQLException e)
  {
    throw new JqmAdminApiInternalException(e);
  }
}
origin: enioka/jqm

  @Override
  int doWork()
  {
    jqmlogger.info("# Roles defined");
    try (DbConn cnx = Helpers.getNewDbSession())
    {
      for (RRoleDto role : MetaService.getRoles(cnx))
      {
        jqmlogger.info("{} - {}", role.getName(), role.getDescription());
      }
    }
    return 0;
  }
}
origin: com.enioka.jqm/jqm-admin

public static void upsertGlobalParameter(DbConn cnx, GlobalParameterDto dto)
{
  if (dto == null || dto.getKey() == null || dto.getKey().isEmpty() || dto.getValue() == null || dto.getValue().isEmpty())
  {
    throw new IllegalArgumentException("invalid dto object");
  }
  GlobalParameter.setParameter(cnx, dto.getKey(), dto.getValue());
}
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

private static JndiObjectResourceDto mapJndiObjectResource(ResultSet rs) throws SQLException
{
  JndiObjectResourceDto res = new JndiObjectResourceDto();
  res.setId(rs.getInt(1));
  res.setName(rs.getString(2));
  res.setAuth(rs.getString(3));
  res.setType(rs.getString(4));
  res.setFactory(rs.getString(5));
  res.setDescription(rs.getString(6));
  res.setTemplate(rs.getString(7));
  res.setSingleton(rs.getBoolean(8));
  return res;
}
origin: enioka/jqm

public static void upsertQueueMapping(DbConn cnx, QueueMappingDto dto)
{
  if (dto.getId() != null)
  {
    cnx.runUpdate("dp_update_changed_by_id", dto.getEnabled(), dto.getNbThread(), dto.getPollingInterval(), dto.getNodeId(),
        dto.getQueueId(), dto.getId(), dto.getEnabled(), dto.getNbThread(), dto.getPollingInterval(), dto.getNodeId(),
        dto.getQueueId());
  }
  else
  {
    DeploymentParameter.create(cnx, dto.getNodeId(), dto.getNbThread(), dto.getPollingInterval(), dto.getQueueId());
  }
}
origin: enioka/jqm

public static void upsertQueue(DbConn cnx, QueueDto dto)
{
  if (dto.getId() != null)
  {
    cnx.runUpdate("q_update_changed_by_id", dto.isDefaultQueue(), dto.getDescription(), dto.getName(), dto.getId(),
        dto.isDefaultQueue(), dto.getDescription(), dto.getName());
  }
  else
  {
    Queue.create(cnx, dto.getName(), dto.getDescription(), dto.isDefaultQueue());
  }
}
origin: enioka/jqm

private static QueueDto mapQueue(ResultSet rs, int colShift)
{
  try
  {
    QueueDto tmp = new QueueDto();
    tmp.setId(rs.getInt(1 + colShift));
    tmp.setDefaultQueue(rs.getBoolean(2 + colShift));
    tmp.setDescription(rs.getString(3 + colShift));
    tmp.setName(rs.getString(4 + colShift));
    return tmp;
  }
  catch (SQLException e)
  {
    throw new JqmAdminApiInternalException(e);
  }
}
origin: enioka/jqm

private static GlobalParameterDto mapGlobalParameter(ResultSet rs) throws SQLException
{
  GlobalParameterDto res = new GlobalParameterDto();
  res.setId(rs.getInt(1));
  res.setKey(rs.getString(2));
  res.setValue(rs.getString(3));
  return res;
}
origin: enioka/jqm

private static RRoleDto mapRole(ResultSet rs, int colShift)
{
  try
  {
    RRoleDto tmp = new RRoleDto();
    tmp.setId(rs.getInt(1 + colShift));
    tmp.setName(rs.getString(2 + colShift));
    tmp.setDescription(rs.getString(3 + colShift));
    return tmp;
  }
  catch (SQLException e)
  {
    throw new JqmAdminApiInternalException(e);
  }
}
origin: enioka/jqm

public static void upsertGlobalParameter(DbConn cnx, GlobalParameterDto dto)
{
  if (dto == null || dto.getKey() == null || dto.getKey().isEmpty() || dto.getValue() == null || dto.getValue().isEmpty())
  {
    throw new IllegalArgumentException("invalid dto object");
  }
  GlobalParameter.setParameter(cnx, dto.getKey(), dto.getValue());
}
origin: com.enioka.jqm/jqm-admin

/**
 * Fluent API builder.
 * 
 * @param cronExpression
 * @return
 */
public static ScheduledJob create(String cronExpression)
{
  ScheduledJob res = new ScheduledJob();
  res.cronExpression = cronExpression;
  return res;
}
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);
}
com.enioka.api.admin

Most used classes

  • NodeDto
  • QueueMappingDto
    A mapping makes a NodeDto poll a QueueDto.
  • GlobalParameterDto
    Global parameters are shared between all nodes in the JQM cluster and control various aspects of its
  • JndiObjectResourceDto
    Describes a resource which can be retrieved by the running job instances through the JNDI API.
  • JobDefDto
    A job definition is the template of the job instances (the actual launches). It fully defines what t
  • RRoleDto,
  • ScheduledJob,
  • RUserDto
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