Package com.gitblit.models

Examples of com.gitblit.models.SubmoduleModel


              WicketUtils
                  .newPathParameter(repositoryName, entry.commitId, entry.path)));
        } else if (entry.isSubmodule()) {
          // submodule
          String submoduleId = entry.objectId;
          SubmoduleModel submodule = getSubmodule(entry.path);
          submodulePath = submodule.gitblitPath;
          hasSubmodule = submodule.hasSubmodule;

          // add relative link
          item.add(new LinkPanel("pathName", "list", entry.path + " @ " + getShortObjectId(submoduleId), "#" + entry.path));
View Full Code Here


                  .newPathParameter(repositoryName, currentPatchset.tip, entry.path), true));
          item.add(new Label("diffStat").setVisible(false));
        } else if (entry.isSubmodule()) {
          // submodule
          String submoduleId = entry.objectId;
          SubmoduleModel submodule = getSubmodule(entry.path);
          submodulePath = submodule.gitblitPath;
          hasSubmodule = submodule.hasSubmodule;

          item.add(new LinkPanel("pathName", "list", entry.path + " @ " +
              getShortObjectId(submoduleId), TreePage.class,
View Full Code Here

    }
    return submodules;
  }

  protected SubmoduleModel getSubmodule(String path) {
    SubmoduleModel model = null;
    if (submodules != null) {
      model = submodules.get(path);
    }
    if (model == null) {
      // undefined submodule?!
      model = new SubmoduleModel(path.substring(path.lastIndexOf('/') + 1), path, path);
      model.hasSubmodule = false;
      model.gitblitPath = model.name;
      return model;
    } else {
      // extract the repository name from the clone url
View Full Code Here

    // submodule
    final String submodulePath;
    final boolean hasSubmodule;
    if (isSubmodule) {
      SubmoduleModel submodule = getSubmodule(submodules, repositoryName, matchingPath == null ? null : matchingPath.path);
      submodulePath = submodule.gitblitPath;
      hasSubmodule = submodule.hasSubmodule;
    } else {
      submodulePath = "";
      hasSubmodule = false;
View Full Code Here

  public boolean hasMore() {
    return hasMore;
  }

  protected SubmoduleModel getSubmodule(Map<String, SubmoduleModel> submodules, String repositoryName, String path) {
    SubmoduleModel model = submodules.get(path);
    if (model == null) {
      // undefined submodule?!
      model = new SubmoduleModel(path.substring(path.lastIndexOf('/') + 1), path, path);
      model.hasSubmodule = false;
      model.gitblitPath = model.name;
      return model;
    } else {
      // extract the repository name from the clone url
View Full Code Here

          } else if (entry.isSubmodule()) {
            // submodule
            String submoduleId = entry.objectId;
            String submodulePath;
            boolean hasSubmodule = false;
            SubmoduleModel submodule = getSubmodule(entry.path);
            submodulePath = submodule.gitblitPath;
            hasSubmodule = submodule.hasSubmodule;

            item.add(WicketUtils.newImage("pathIcon", "git-orange-16x16.png"));
            item.add(new Label("pathSize", ""));
View Full Code Here

              WicketUtils
                  .newPathParameter(repositoryName, entry.commitId, entry.path)));
        } else if (entry.isSubmodule()) {
          // submodule
          String submoduleId = entry.objectId;
          SubmoduleModel submodule = getSubmodule(entry.path);
          submodulePath = submodule.gitblitPath;
          hasSubmodule = submodule.hasSubmodule;

          item.add(new LinkPanel("pathName", "list", entry.path + " @ " +
              getShortObjectId(submoduleId), TreePage.class,
View Full Code Here

                WicketUtils
                .newPathParameter(repositoryName, endId, entry.path)));
          } else if (entry.isSubmodule()) {
            // submodule
            String submoduleId = entry.objectId;
            SubmoduleModel submodule = getSubmodule(entry.path);
            submodulePath = submodule.gitblitPath;
            hasSubmodule = submodule.hasSubmodule;

            // add relative link
            item.add(new LinkPanel("pathName", "list", entry.path + " @ " + getShortObjectId(submoduleId), "#" + entry.path));
View Full Code Here

    try {
      BlobBasedConfig config = new BlobBasedConfig(repository.getConfig(), blob);
      for (String module : config.getSubsections("submodule")) {
        String path = config.getString("submodule", module, "path");
        String url = config.getString("submodule", module, "url");
        list.add(new SubmoduleModel(module, path, url));
      }
    } catch (ConfigInvalidException e) {
      LOGGER.error("Failed to load .gitmodules file for " + repository.getDirectory(), e);
    }
    return list;
View Full Code Here

                  .newPathParameter(repositoryName, currentPatchset.tip, entry.path), true));
          item.add(new Label("diffStat").setVisible(false));
        } else if (entry.isSubmodule()) {
          // submodule
          String submoduleId = entry.objectId;
          SubmoduleModel submodule = getSubmodule(entry.path);
          submodulePath = submodule.gitblitPath;
          hasSubmodule = submodule.hasSubmodule;

          item.add(new LinkPanel("pathName", "list", entry.path + " @ " +
              getShortObjectId(submoduleId), TreePage.class,
View Full Code Here

TOP

Related Classes of com.gitblit.models.SubmoduleModel

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.