Package com.google.gerrit.reviewdb.client

Examples of com.google.gerrit.reviewdb.client.SystemConfig


    this.mgr = mgr;
  }

  @Override
  protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException {
    SystemConfig sc = db.systemConfig().get(new SystemConfig.Key());
    String oldName = sc.wildProjectName.get();
    String newName = "All-Projects";
    if ("-- All Projects --".equals(oldName)) {
      ui.message("Renaming \"" + oldName + "\" to \"" + newName + "\"");
View Full Code Here


    final CurrentSchemaVersion sVer = CurrentSchemaVersion.create();
    sVer.versionNbr = versionNbr;
    db.schemaVersion().insert(Collections.singleton(sVer));

    final SystemConfig sConfig = initSystemConfig(db);
    initVerifiedCategory(db);
    initCodeReviewCategory(db, sConfig);

    if (mgr != null) {
      // TODO This should never be null when initializing a site.
View Full Code Here

    owners.setType(AccountGroup.Type.SYSTEM);
    c.accountGroups().insert(Collections.singleton(owners));
    c.accountGroupNames().insert(
        Collections.singleton(new AccountGroupName(owners)));

    final SystemConfig s = SystemConfig.create();
    try {
      s.sitePath = site_path.getCanonicalPath();
    } catch (IOException e) {
      s.sitePath = site_path.getAbsolutePath();
    }
View Full Code Here

    this.serverUser = serverUser;
  }

  @Override
  protected void migrateData(ReviewDb db, UpdateUI ui) throws OrmException {
    SystemConfig sc = db.systemConfig().get(new SystemConfig.Key());
    Project.NameKey allProjects = sc.wildProjectName;

    FileBasedConfig cfg = new FileBasedConfig(site.gerrit_config, FS.DETECTED);
    boolean cfgDirty = false;
    try {
View Full Code Here

      return null;
    }
  }

  private void updateSystemConfig(final ReviewDb db) throws OrmException {
    final SystemConfig sc = db.systemConfig().get(new SystemConfig.Key());
    if (sc == null) {
      throw new OrmException("No record in system_config table");
    }
    try {
      sc.sitePath = site.site_path.getCanonicalPath();
View Full Code Here

        }
      }
    });

    db.assertSchemaVersion();
    final SystemConfig sc = db.getSystemConfig();
    assertEquals(paths.site_path.getCanonicalPath(), sc.sitePath);
  }
View Full Code Here

TOP

Related Classes of com.google.gerrit.reviewdb.client.SystemConfig

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.