public class ProjectState extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ProjectState.EffectiveMaxObjectSizeLimit |
static interface |
ProjectState.Factory |
Modifier and Type | Field and Description |
---|---|
static String |
INHERITED_FROM_GLOBAL |
static String |
INHERITED_FROM_PARENT |
static String |
OVERRIDDEN_BY_GLOBAL |
static String |
OVERRIDDEN_BY_PARENT |
Constructor and Description |
---|
ProjectState(ProjectCache projectCache,
AllProjectsName allProjectsName,
AllUsersName allUsersName,
GitRepositoryManager gitMgr,
List<CommentLinkInfo> commentLinks,
CapabilityCollection.Factory limitsFactory,
TransferConfig transferConfig,
com.google.gerrit.metrics.MetricMaker metricMaker,
ProjectConfig config) |
public static final String INHERITED_FROM_PARENT
public static final String OVERRIDDEN_BY_PARENT
public static final String INHERITED_FROM_GLOBAL
public static final String OVERRIDDEN_BY_GLOBAL
@Inject public ProjectState(ProjectCache projectCache, AllProjectsName allProjectsName, AllUsersName allUsersName, GitRepositoryManager gitMgr, 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 String getName()
public ProjectConfig getConfig()
public ProjectLevelConfig getConfig(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 List<SectionMatcher> getAllSections()
public 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 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 Iterable<ProjectState> tree()
public 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 List<CommentLinkInfo> getCommentLinks()
public BranchOrderSection getBranchOrderSection()
public Collection<SubscribeSection> getSubscribeSections(Branch.NameKey branch)
public Set<GroupReference> getAllGroups()
public Set<GroupReference> getLocalGroups()
public SubmitType getSubmitType()
public com.google.gerrit.index.project.ProjectData toProjectData()