Package com.google.gerrit.server.project
Class ProjectState
java.lang.Object
com.google.gerrit.server.project.ProjectState
State of a project, aggregated from the project and its parents. This is obtained from the 
ProjectCache. It should not be persisted across requests- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic interface
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionProjectState(ProjectCache projectCache, AllProjectsName allProjectsName, AllUsersName allUsersName, List<CommentLinkInfo> commentLinks, CapabilityCollection.Factory limitsFactory, TransferConfig transferConfig, CachedProjectConfig cachedProjectConfig) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidReturns allAccountGroup's that are allowed to administrate the complete project.Obtain all local and inherited sections.Returns cached computation of all global capabilities.All available label types.getLabelTypes(BranchNameKey destination) All available label types for this branch.getLabelTypes(ChangeNotes notes) All available label types for this change.longgetName()Returns allAccountGroup'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 returnedgetPluginConfig(String pluginName) Get all submit requirements for a project, including those from parent projects.getSubscribeSections(BranchNameKey branch) booleanReturns true if the Prolog engine is expected to run for this project, that is if this project or a parent possesses a rules.pl file.booleanis(BooleanProjectConfig config) booleanbooleancom.google.common.collect.FluentIterable<ProjectState>parents()Returns an iterable that walks through the parents of this project.booleanbooleancom.google.gerrit.index.project.ProjectDatatree()Returns an iterable that walks through this project and then the parents of this project.Returns an iterable that walks in-order from All-Projects through the project hierarchy to this project.
- 
Field Details- 
INHERITED_FROM_PARENT- See Also:
 
- 
OVERRIDDEN_BY_PARENT- See Also:
 
- 
INHERITED_FROM_GLOBAL- See Also:
 
- 
OVERRIDDEN_BY_GLOBAL- See Also:
 
 
- 
- 
Constructor Details- 
ProjectState@Inject public ProjectState(ProjectCache projectCache, AllProjectsName allProjectsName, AllUsersName allUsersName, List<CommentLinkInfo> commentLinks, CapabilityCollection.Factory limitsFactory, TransferConfig transferConfig, CachedProjectConfig cachedProjectConfig) 
 
- 
- 
Method Details- 
getCapabilityCollectionReturns cached computation of all global capabilities. This should only be invoked on the state fromProjectCache.getAllProjects(). Null on any other project.
- 
hasPrologRulespublic boolean hasPrologRules()Returns true if the Prolog engine is expected to run for this project, that is if this project or a parent possesses a rules.pl file.
- 
getProject
- 
getNameKey
- 
getName
- 
getConfig
- 
getConfig
- 
getMaxObjectSizeLimitpublic long getMaxObjectSizeLimit()
- 
statePermitsReadpublic boolean statePermitsRead()
- 
checkStatePermitsRead- Throws:
- ResourceConflictException
 
- 
statePermitsWritepublic boolean statePermitsWrite()
- 
checkStatePermitsWrite- Throws:
- ResourceConflictException
 
- 
getEffectiveMaxObjectSizeLimit
- 
getAllSectionsObtain all local and inherited sections. This collection is looked up dynamically and is not cached. Callers should try to cache this result per-request as much as possible.
- 
getOwnersReturns allAccountGroup'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 returned
- 
getAllOwnersReturns allAccountGroup'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).
- 
treeReturns an iterable that walks through this project and then the parents of this project. Starts from this project and progresses up the hierarchy to All-Projects.
- 
treeInOrderReturns an iterable that walks in-order from All-Projects through the project hierarchy to this project.
- 
parentsReturns an iterable that walks through the parents of this project. Starts from the immediate parent of this project and progresses up the hierarchy to All-Projects.
- 
isAllProjectspublic boolean isAllProjects()
- 
isAllUserspublic boolean isAllUsers()
- 
is
- 
getSubmitRequirementsGet all submit requirements for a project, including those from parent projects.
- 
getLabelTypesAll available label types.
- 
getLabelTypesAll available label types for this change.
- 
getLabelTypesAll available label types for this branch.
- 
getCommentLinks
- 
getPluginConfigReturns thePluginConfigthat got parsed from thepluginssection ofproject.config. The returned instance is a defensive copy of the cached value. Returns an empty config in case we find no config for the given plugin name. This is useful when callingPluginConfig#withInheritance(ProjectState.Factory)
- 
getBranchOrderSection
- 
getSubscribeSections
- 
getAllGroups
- 
getLocalGroups
- 
getSubmitType
- 
toProjectDatapublic com.google.gerrit.index.project.ProjectData toProjectData()
 
-