Class Project


  • public final class Project
    extends Object
    Projects match a source code repository managed by Gerrit
    • Field Detail

      • DEFAULT_SUBMIT_TYPE

        public static final SubmitType DEFAULT_SUBMIT_TYPE
        Default submit type for new projects.
      • DEFAULT_ALL_PROJECTS_SUBMIT_TYPE

        public static final SubmitType DEFAULT_ALL_PROJECTS_SUBMIT_TYPE
        Default submit type for root project (All-Projects).
      • description

        protected String description
      • maxObjectSizeLimit

        protected String maxObjectSizeLimit
      • defaultDashboardId

        protected String defaultDashboardId
      • localDefaultDashboardId

        protected String localDefaultDashboardId
      • configRefState

        protected String configRefState
    • Constructor Detail

      • Project

        protected Project()
    • Method Detail

      • getName

        public String getName()
      • getDescription

        public String getDescription()
      • setDescription

        public void setDescription​(String d)
      • getMaxObjectSizeLimit

        public String getMaxObjectSizeLimit()
      • setMaxObjectSizeLimit

        public void setMaxObjectSizeLimit​(String limit)
      • getConfiguredSubmitType

        public SubmitType getConfiguredSubmitType()
        Submit type as configured in project.config.

        Does not take inheritance into account, i.e. may return SubmitType.INHERIT.

        Returns:
        submit type.
      • setSubmitType

        public void setSubmitType​(SubmitType type)
      • setState

        public void setState​(ProjectState newState)
      • getDefaultDashboard

        public String getDefaultDashboard()
      • setDefaultDashboard

        public void setDefaultDashboard​(String defaultDashboardId)
      • getLocalDefaultDashboard

        public String getLocalDefaultDashboard()
      • setLocalDefaultDashboard

        public void setLocalDefaultDashboard​(String localDefaultDashboardId)
      • getParent

        public Project.NameKey getParent()
        Returns the name key of the parent project.
        Returns:
        name key of the parent project, null if this project is the wild project, null or the name key of the wild project if this project is a direct child of the wild project
      • getParent

        public Project.NameKey getParent​(Project.NameKey allProjectsName)
        Returns the name key of the parent project.
        Parameters:
        allProjectsName - name key of the wild project
        Returns:
        name key of the parent project, null if this project is the All-Projects project
      • getParentName

        public String getParentName()
      • setParentName

        public void setParentName​(String n)
      • getConfigRefState

        public String getConfigRefState()
        Returns the ObjectId as 40 digit hex of refs/meta/config's HEAD.
      • setConfigRefState

        public void setConfigRefState​(String state)
        Sets the ObjectId as 40 digit hex of refs/meta/config's HEAD.