001package io.ebean.docker.commands;
002
003import java.util.Properties;
004
005/**
006 * Oracle configuration.
007 */
008public class OracleConfig extends DbConfig {
009
010  private String apexPort = "8181";
011
012  private String internalApexPort = "8080";
013
014  /**
015   * Wait time allowed when starting oracle from scratch.
016   */
017  private int startupWaitMinutes = 8;
018
019  public OracleConfig(String version, Properties properties) {
020    this(version);
021    setProperties(properties);
022  }
023
024  public OracleConfig() {
025    this("latest");
026  }
027
028  public OracleConfig(String version) {
029    super("oracle", 1521, 1521, version);
030    this.image = "vitorfec/oracle-xe-18c:" + version;
031    setAdminUser("system");
032    setAdminPassword("oracle");
033    setDbName("XE");
034  }
035
036  public String jdbcUrl() {
037    return "jdbc:oracle:thin:@localhost:" + getPort() + ":" + getDbName();
038  }
039
040  public String getApexPort() {
041    return apexPort;
042  }
043
044  public void setApexPort(String apexPort) {
045    this.apexPort = apexPort;
046  }
047
048  public String getInternalApexPort() {
049    return internalApexPort;
050  }
051
052  public void setInternalApexPort(String internalApexPort) {
053    this.internalApexPort = internalApexPort;
054  }
055
056  public int getStartupWaitMinutes() {
057    return startupWaitMinutes;
058  }
059
060  public void setStartupWaitMinutes(int startupWaitMinutes) {
061    this.startupWaitMinutes = startupWaitMinutes;
062  }
063}