当前位置: 首页>>代码示例>>Java>>正文


Java Submit类代码示例

本文整理汇总了Java中com.google.gerrit.server.change.Submit的典型用法代码示例。如果您正苦于以下问题:Java Submit类的具体用法?Java Submit怎么用?Java Submit使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Submit类属于com.google.gerrit.server.change包,在下文中一共展示了Submit类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: completeChangeSet

import com.google.gerrit.server.change.Submit; //导入依赖的package包/类
public ChangeSet completeChangeSet(ReviewDb db, Change change, CurrentUser user)
    throws IOException, OrmException, PermissionBackendException {
  try {
    if (orm == null) {
      orm = repoManagerProvider.get();
      closeOrm = true;
    }

    ChangeData cd = changeDataFactory.create(db, change.getProject(), change.getId());
    ChangeSet changeSet =
        new ChangeSet(
            cd, permissionBackend.user(user).change(cd).database(db).test(ChangePermission.READ));
    if (Submit.wholeTopicEnabled(cfg)) {
      return completeChangeSetIncludingTopics(db, changeSet, user);
    }
    return mergeSuperSetComputation.get().completeWithoutTopic(db, orm, changeSet, user);
  } finally {
    if (closeOrm && orm != null) {
      orm.close();
      orm = null;
    }
  }
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:24,代码来源:MergeSuperSet.java

示例2: getChangeInfo

import com.google.gerrit.server.change.Submit; //导入依赖的package包/类
private ChangeConfigInfo getChangeInfo(Config cfg) {
  ChangeConfigInfo info = new ChangeConfigInfo();
  info.allowBlame = toBoolean(cfg.getBoolean("change", "allowBlame", true));
  info.allowDrafts = toBoolean(cfg.getBoolean("change", "allowDrafts", true));
  boolean hasAssigneeInIndex =
      indexes.getSearchIndex().getSchema().hasField(ChangeField.ASSIGNEE);
  info.showAssigneeInChangesTable =
      toBoolean(
          cfg.getBoolean("change", "showAssigneeInChangesTable", false) && hasAssigneeInIndex);
  info.largeChange = cfg.getInt("change", "largeChange", 500);
  info.privateByDefault = toBoolean(cfg.getBoolean("change", "privateByDefault", false));
  info.replyTooltip =
      Optional.ofNullable(cfg.getString("change", null, "replyTooltip")).orElse("Reply and score")
          + " (Shortcut: a)";
  info.replyLabel =
      Optional.ofNullable(cfg.getString("change", null, "replyLabel")).orElse("Reply") + "\u2026";
  info.updateDelay =
      (int) ConfigUtil.getTimeUnit(cfg, "change", null, "updateDelay", 300, TimeUnit.SECONDS);
  info.submitWholeTopic = Submit.wholeTopicEnabled(cfg);
  return info;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:22,代码来源:GetServerInfo.java

示例3: RevisionApiImpl

import com.google.gerrit.server.change.Submit; //导入依赖的package包/类
@Inject
RevisionApiImpl(
    GitRepositoryManager repoManager,
    Changes changes,
    RevisionReviewers revisionReviewers,
    RevisionReviewerApiImpl.Factory revisionReviewerApi,
    CherryPick cherryPick,
    Rebase rebase,
    RebaseUtil rebaseUtil,
    Submit submit,
    PreviewSubmit submitPreview,
    Reviewed.PutReviewed putReviewed,
    Reviewed.DeleteReviewed deleteReviewed,
    Files files,
    Files.ListFiles listFiles,
    GetCommit getCommit,
    GetPatch getPatch,
    PostReview review,
    Mergeable mergeable,
    FileApiImpl.Factory fileApi,
    ListRevisionComments listComments,
    ListRobotComments listRobotComments,
    ApplyFix applyFix,
    Fixes fixes,
    ListRevisionDrafts listDrafts,
    CreateDraftComment createDraft,
    DraftComments drafts,
    DraftApiImpl.Factory draftFactory,
    Comments comments,
    CommentApiImpl.Factory commentFactory,
    RobotComments robotComments,
    RobotCommentApiImpl.Factory robotCommentFactory,
    GetRevisionActions revisionActions,
    TestSubmitType testSubmitType,
    TestSubmitType.Get getSubmitType,
    Provider<GetMergeList> getMergeList,
    PutDescription putDescription,
    GetDescription getDescription,
    @Assisted RevisionResource r) {
  this.repoManager = repoManager;
  this.changes = changes;
  this.revisionReviewers = revisionReviewers;
  this.revisionReviewerApi = revisionReviewerApi;
  this.cherryPick = cherryPick;
  this.rebase = rebase;
  this.rebaseUtil = rebaseUtil;
  this.review = review;
  this.submit = submit;
  this.submitPreview = submitPreview;
  this.files = files;
  this.putReviewed = putReviewed;
  this.deleteReviewed = deleteReviewed;
  this.listFiles = listFiles;
  this.getCommit = getCommit;
  this.getPatch = getPatch;
  this.mergeable = mergeable;
  this.fileApi = fileApi;
  this.listComments = listComments;
  this.robotComments = robotComments;
  this.listRobotComments = listRobotComments;
  this.applyFix = applyFix;
  this.fixes = fixes;
  this.listDrafts = listDrafts;
  this.createDraft = createDraft;
  this.drafts = drafts;
  this.draftFactory = draftFactory;
  this.comments = comments;
  this.commentFactory = commentFactory;
  this.robotCommentFactory = robotCommentFactory;
  this.revisionActions = revisionActions;
  this.testSubmitType = testSubmitType;
  this.getSubmitType = getSubmitType;
  this.getMergeList = getMergeList;
  this.putDescription = putDescription;
  this.getDescription = getDescription;
  this.revision = r;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:78,代码来源:RevisionApiImpl.java


注:本文中的com.google.gerrit.server.change.Submit类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。