Package org.platformlayer.service.git.model

Examples of org.platformlayer.service.git.model.GitRepository


  public void beforeCreateItem(ItemBase item) throws OpsException {
    super.beforeCreateItem(item);

    // TODO: This doesn't feel like the right place for this
    if (item instanceof GitRepository) {
      GitRepository repo = (GitRepository) item;

      if (Strings.isNullOrEmpty(repo.name)) {
        repo.name = repo.getId();
      }
    }
  }
View Full Code Here


    openFirewall(service, GitServerController.PORT);
    Assert.assertTrue(isPortOpen(socketAddress));

    String repoId = "repo" + id;
    GitRepository repo = new GitRepository();
    repo.name = repoId;
    repo = putItem(repoId, repo);
    repo = waitForHealthy(repo);

    // TODO: Make endpoint http://<ip>:<port>/<path>...
View Full Code Here

  public void handler(GitRepository model) {
  }

  @Override
  protected void addChildren() throws OpsException {
    GitRepository model = OpsContext.get().getInstance(GitRepository.class);

    File gitBase = new File("/var/git");
    File repoDir = new File(gitBase, model.name);

    {
      ManagedDirectory dir = ManagedDirectory.build(repoDir, "755");
      addChild(dir);
    }

    {
      GitRepoInit initRepo = injected(GitRepoInit.class);
      initRepo.repoDir = repoDir;
      addChild(initRepo);
    }

    {
      BackupDirectory backup = injected(BackupDirectory.class);
      backup.itemKey = model.getKey();

      backup.backupRoot = repoDir;

      addChild(backup);
    }
View Full Code Here

TOP

Related Classes of org.platformlayer.service.git.model.GitRepository

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.