Package com.google.gerrit.server.project
Class ProjectState
- java.lang.Object
- 
- com.google.gerrit.server.project.ProjectState
 
- 
 public class ProjectState extends Object Cached information on a project. Must not contain any data derived from parents other than it's immediate parent'sProject.NameKey.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classProjectState.EffectiveMaxObjectSizeLimitstatic interfaceProjectState.Factory
 - 
Field SummaryFields Modifier and Type Field Description static StringINHERITED_FROM_GLOBALstatic StringINHERITED_FROM_PARENTstatic StringOVERRIDDEN_BY_GLOBALstatic StringOVERRIDDEN_BY_PARENT
 - 
Constructor SummaryConstructors Constructor Description ProjectState(SitePaths sitePaths, ProjectCache projectCache, AllProjectsName allProjectsName, AllUsersName allUsersName, ProjectControl.AssistedFactory projectControlFactory, PrologEnvironment.Factory envFactory, GitRepositoryManager gitMgr, RulesCache rulesCache, List<CommentLinkInfo> commentLinks, CapabilityCollection.Factory limitsFactory, TransferConfig transferConfig, ProjectConfig config)
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
INHERITED_FROM_PARENTpublic static final String INHERITED_FROM_PARENT - See Also:
- Constant Field Values
 
 - 
OVERRIDDEN_BY_PARENTpublic static final String OVERRIDDEN_BY_PARENT - See Also:
- Constant Field Values
 
 - 
INHERITED_FROM_GLOBALpublic static final String INHERITED_FROM_GLOBAL - See Also:
- Constant Field Values
 
 - 
OVERRIDDEN_BY_GLOBALpublic static final String OVERRIDDEN_BY_GLOBAL - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ProjectState@Inject public ProjectState(SitePaths sitePaths, ProjectCache projectCache, AllProjectsName allProjectsName, AllUsersName allUsersName, ProjectControl.AssistedFactory projectControlFactory, PrologEnvironment.Factory envFactory, GitRepositoryManager gitMgr, RulesCache rulesCache, List<CommentLinkInfo> commentLinks, CapabilityCollection.Factory limitsFactory, TransferConfig transferConfig, ProjectConfig config) 
 
- 
 - 
Method Detail- 
getCapabilityCollectionpublic CapabilityCollection getCapabilityCollection() - Returns:
- cached computation of all global capabilities. This should only be invoked on the state
     from ProjectCache.getAllProjects(). Null on any other project.
 
 - 
newPrologEnvironmentpublic PrologEnvironment newPrologEnvironment() throws com.googlecode.prolog_cafe.exceptions.CompileException - Returns:
- Construct a new PrologEnvironment for the calling thread.
- Throws:
- com.googlecode.prolog_cafe.exceptions.CompileException
 
 - 
newPrologEnvironmentpublic PrologEnvironment newPrologEnvironment(String name, Reader in) throws com.googlecode.prolog_cafe.exceptions.CompileException LikenewPrologEnvironment()but instead of reading the rules.pl read the provided input stream.- Parameters:
- name- a name of the input stream. Could be any name.
- in- stream to read prolog rules from
- Throws:
- com.googlecode.prolog_cafe.exceptions.CompileException
 
 - 
getProjectpublic Project getProject() 
 - 
getNameKeypublic Project.NameKey getNameKey() 
 - 
getNamepublic String getName() 
 - 
getConfigpublic ProjectConfig getConfig() 
 - 
getConfigpublic ProjectLevelConfig getConfig(String fileName) 
 - 
getEffectiveMaxObjectSizeLimitpublic ProjectState.EffectiveMaxObjectSizeLimit getEffectiveMaxObjectSizeLimit() 
 - 
getOwnerspublic Set<AccountGroup.UUID> getOwners() - Returns:
- all 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 returned
 
 - 
getAllOwnerspublic Set<AccountGroup.UUID> getAllOwners() - Returns:
- all 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).
 
 - 
controlForpublic ProjectControl controlFor(CurrentUser user) 
 - 
treepublic Iterable<ProjectState> tree() - Returns:
- 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.
 
 - 
treeInOrderpublic Iterable<ProjectState> treeInOrder() - Returns:
- an iterable that walks in-order from All-Projects through the project hierarchy to this project.
 
 - 
parentspublic com.google.common.collect.FluentIterable<ProjectState> parents() - Returns:
- 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() 
 - 
isUseContributorAgreementspublic boolean isUseContributorAgreements() 
 - 
isUseContentMergepublic boolean isUseContentMerge() 
 - 
isUseSignedOffBypublic boolean isUseSignedOffBy() 
 - 
isRequireChangeIDpublic boolean isRequireChangeID() 
 - 
isCreateNewChangeForAllNotInTargetpublic boolean isCreateNewChangeForAllNotInTarget() 
 - 
isEnableSignedPushpublic boolean isEnableSignedPush() 
 - 
isRequireSignedPushpublic boolean isRequireSignedPush() 
 - 
isRejectImplicitMergespublic boolean isRejectImplicitMerges() 
 - 
isPrivateByDefaultpublic boolean isPrivateByDefault() 
 - 
isWorkInProgressByDefaultpublic boolean isWorkInProgressByDefault() 
 - 
isEnableReviewerByEmailpublic boolean isEnableReviewerByEmail() 
 - 
isMatchAuthorToCommitterDatepublic boolean isMatchAuthorToCommitterDate() 
 - 
getLabelTypespublic LabelTypes getLabelTypes() All available label types.
 - 
getLabelTypespublic LabelTypes getLabelTypes(ChangeNotes notes, CurrentUser user) All available label types for this change and user.
 - 
getLabelTypespublic LabelTypes getLabelTypes(Branch.NameKey destination, CurrentUser user) All available label types for this branch and user.
 - 
getCommentLinkspublic List<CommentLinkInfo> getCommentLinks() 
 - 
getBranchOrderSectionpublic BranchOrderSection getBranchOrderSection() 
 - 
getSubscribeSectionspublic Collection<SubscribeSection> getSubscribeSections(Branch.NameKey branch) 
 - 
getThemepublic ThemeInfo getTheme() 
 - 
getAllGroupspublic Set<GroupReference> getAllGroups() 
 - 
getLocalGroupspublic Set<GroupReference> getLocalGroups() 
 
- 
 
-