Move some project classes to extension to expose them in Project API

Change-Id: I25a8d463b50fd3cd016c7d182790ae54883b7401
This commit is contained in:
David Ostrovsky
2014-02-04 09:20:27 +01:00
committed by David Ostrovsky
parent c72b30cab8
commit 99dea4bfba
55 changed files with 267 additions and 183 deletions

View File

@@ -14,7 +14,7 @@
package com.google.gerrit.reviewdb.client;
import com.google.gerrit.reviewdb.client.Project.InheritableBoolean;
import com.google.gerrit.extensions.common.InheritableBoolean;
public class InheritedBoolean {

View File

@@ -14,6 +14,9 @@
package com.google.gerrit.reviewdb.client;
import com.google.gerrit.extensions.api.projects.ProjectState;
import com.google.gerrit.extensions.common.InheritableBoolean;
import com.google.gerrit.extensions.common.SubmitType;
import com.google.gwtorm.client.Column;
import com.google.gwtorm.client.StringKey;
@@ -65,32 +68,6 @@ public final class Project {
}
}
public static enum SubmitType {
FAST_FORWARD_ONLY,
MERGE_IF_NECESSARY,
REBASE_IF_NECESSARY,
MERGE_ALWAYS,
CHERRY_PICK
}
public static enum State {
ACTIVE,
READ_ONLY,
HIDDEN
}
public static enum InheritableBoolean {
TRUE,
FALSE,
INHERIT
}
protected NameKey name;
protected String description;
@@ -101,7 +78,7 @@ public final class Project {
protected SubmitType submitType;
protected State state;
protected ProjectState state;
protected NameKey parent;
@@ -123,7 +100,7 @@ public final class Project {
public Project(Project.NameKey nameKey) {
name = nameKey;
submitType = SubmitType.MERGE_IF_NECESSARY;
state = State.ACTIVE;
state = ProjectState.ACTIVE;
useContributorAgreements = InheritableBoolean.INHERIT;
useSignedOffBy = InheritableBoolean.INHERIT;
requireChangeID = InheritableBoolean.INHERIT;
@@ -194,11 +171,11 @@ public final class Project {
submitType = type;
}
public State getState() {
public ProjectState getState() {
return state;
}
public void setState(final State newState) {
public void setState(final ProjectState newState) {
state = newState;
}