LCOV - code coverage report
Current view: top level - server/project - CreateProjectArgs.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 14 17 82.4 %
Date: 2022-11-19 15:00:39 Functions: 3 5 60.0 %

          Line data    Source code
       1             : // Copyright (C) 2011 The Android Open Source Project
       2             : //
       3             : // Licensed under the Apache License, Version 2.0 (the "License");
       4             : // you may not use this file except in compliance with the License.
       5             : // You may obtain a copy of the License at
       6             : //
       7             : // http://www.apache.org/licenses/LICENSE-2.0
       8             : //
       9             : // Unless required by applicable law or agreed to in writing, software
      10             : // distributed under the License is distributed on an "AS IS" BASIS,
      11             : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      12             : // See the License for the specific language governing permissions and
      13             : // limitations under the License
      14             : 
      15             : package com.google.gerrit.server.project;
      16             : 
      17             : import com.google.gerrit.common.Nullable;
      18             : import com.google.gerrit.entities.AccountGroup;
      19             : import com.google.gerrit.entities.Project;
      20             : import com.google.gerrit.extensions.client.InheritableBoolean;
      21             : import com.google.gerrit.extensions.client.SubmitType;
      22             : import java.util.List;
      23             : 
      24             : public class CreateProjectArgs {
      25             : 
      26             :   private Project.NameKey projectName;
      27             :   public List<AccountGroup.UUID> ownerIds;
      28             :   public Project.NameKey newParent;
      29             :   public String projectDescription;
      30             :   public SubmitType submitType;
      31             :   public InheritableBoolean contributorAgreements;
      32             :   public InheritableBoolean signedOffBy;
      33             :   public boolean permissionsOnly;
      34             :   public List<String> branch;
      35             :   public InheritableBoolean contentMerge;
      36             :   public InheritableBoolean newChangeForAllNotInTarget;
      37             :   public InheritableBoolean changeIdRequired;
      38             :   public InheritableBoolean rejectEmptyCommit;
      39             :   public InheritableBoolean enableSignedPush;
      40             :   public InheritableBoolean requireSignedPush;
      41             :   public boolean createEmptyCommit;
      42             :   public String maxObjectSizeLimit;
      43             : 
      44         144 :   public CreateProjectArgs() {
      45         144 :     contributorAgreements = InheritableBoolean.INHERIT;
      46         144 :     signedOffBy = InheritableBoolean.INHERIT;
      47         144 :     contentMerge = InheritableBoolean.INHERIT;
      48         144 :     changeIdRequired = InheritableBoolean.INHERIT;
      49         144 :     newChangeForAllNotInTarget = InheritableBoolean.INHERIT;
      50         144 :     enableSignedPush = InheritableBoolean.INHERIT;
      51         144 :     requireSignedPush = InheritableBoolean.INHERIT;
      52         144 :     submitType = SubmitType.MERGE_IF_NECESSARY;
      53         144 :     rejectEmptyCommit = InheritableBoolean.INHERIT;
      54         144 :   }
      55             : 
      56             :   public Project.NameKey getProject() {
      57         144 :     return projectName;
      58             :   }
      59             : 
      60             :   @Nullable
      61             :   public String getProjectName() {
      62           0 :     return projectName != null ? projectName.get() : null;
      63             :   }
      64             : 
      65             :   public void setProjectName(String n) {
      66         144 :     projectName = n != null ? Project.nameKey(n) : null;
      67         144 :   }
      68             : 
      69             :   public void setProjectName(Project.NameKey n) {
      70           0 :     projectName = n;
      71           0 :   }
      72             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750