public class ProjectState
extends java.lang.Object
Project.NameKey
.Modifier and Type | Class and Description |
---|---|
static class |
ProjectState.EffectiveMaxObjectSizeLimit |
static interface |
ProjectState.Factory |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INHERITED_FROM_GLOBAL |
static java.lang.String |
INHERITED_FROM_PARENT |
static java.lang.String |
OVERRIDDEN_BY_GLOBAL |
static java.lang.String |
OVERRIDDEN_BY_PARENT |
Constructor and Description |
---|
ProjectState(ProjectCache projectCache,
AllProjectsName allProjectsName,
AllUsersName allUsersName,
GitRepositoryManager gitMgr,
java.util.List<CommentLinkInfo> commentLinks,
CapabilityCollection.Factory limitsFactory,
TransferConfig transferConfig,
com.google.gerrit.metrics.MetricMaker metricMaker,
ProjectConfig config) |
public static final java.lang.String INHERITED_FROM_PARENT
public static final java.lang.String OVERRIDDEN_BY_PARENT
public static final java.lang.String INHERITED_FROM_GLOBAL
public static final java.lang.String OVERRIDDEN_BY_GLOBAL
@Inject public ProjectState(ProjectCache projectCache, AllProjectsName allProjectsName, AllUsersName allUsersName, GitRepositoryManager gitMgr, java.util.List<CommentLinkInfo> commentLinks, CapabilityCollection.Factory limitsFactory, TransferConfig transferConfig, com.google.gerrit.metrics.MetricMaker metricMaker, ProjectConfig config)
public CapabilityCollection getCapabilityCollection()
ProjectCache.getAllProjects()
. Null on any other project.public boolean hasPrologRules()
public Project getProject()
public Project.NameKey getNameKey()
public java.lang.String getName()
public ProjectConfig getConfig()
public ProjectLevelConfig getConfig(java.lang.String fileName)
public long getMaxObjectSizeLimit()
public boolean statePermitsRead()
public void checkStatePermitsRead() throws ResourceConflictException
ResourceConflictException
public boolean statePermitsWrite()
public void checkStatePermitsWrite() throws ResourceConflictException
ResourceConflictException
public ProjectState.EffectiveMaxObjectSizeLimit getEffectiveMaxObjectSizeLimit()
public java.util.List<SectionMatcher> getAllSections()
public java.util.Set<AccountGroup.UUID> getOwners()
AccountGroup
's to which the owner privilege for 'refs/*' is assigned for
this project (the local owners), if there are no local owners the local owners of the
nearest parent project that has local owners are returnedpublic java.util.Set<AccountGroup.UUID> getAllOwners()
AccountGroup
's that are allowed to administrate the complete project. This
includes all groups to which the owner privilege for 'refs/*' is assigned for this project
(the local owners) and all groups to which the owner privilege for 'refs/*' is assigned for
one of the parent projects (the inherited owners).public java.lang.Iterable<ProjectState> tree()
public java.lang.Iterable<ProjectState> treeInOrder()
public com.google.common.collect.FluentIterable<ProjectState> parents()
public boolean isAllProjects()
public boolean isAllUsers()
public boolean is(BooleanProjectConfig config)
public LabelTypes getLabelTypes()
public LabelTypes getLabelTypes(ChangeNotes notes)
public LabelTypes getLabelTypes(Branch.NameKey destination)
public java.util.List<CommentLinkInfo> getCommentLinks()
public BranchOrderSection getBranchOrderSection()
public java.util.Collection<SubscribeSection> getSubscribeSections(Branch.NameKey branch)
public java.util.Set<GroupReference> getAllGroups()
public java.util.Set<GroupReference> getLocalGroups()
public SubmitType getSubmitType()
public com.google.gerrit.index.project.ProjectData toProjectData()