Class PoolProject
- java.lang.Object
-
- jetbrains.buildServer.controllers.agent.PoolProject
-
- All Implemented Interfaces:
Comparable<BuildProject>,BuildProject,HierarchyUtil.HierarchyItem<String>
public class PoolProject extends Object implements BuildProject, HierarchyUtil.HierarchyItem<String>
- Author:
- Maxim.Manuylov Date: 11/17/11
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.BuildProject
ROOT_PROJECT_ID
-
-
Constructor Summary
Constructors Constructor Description PoolProject(SProject project)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPools(Collection<PoolBox> poolBoxes)intcompareTo(BuildProject that)intgetAllPoolsCount()List<PoolBox>getAssociatedPools()List<SBuildType>getBuildTypes()Returns all build configurations registered in this project and all its subprojects (not only direct).intgetDepth()StringgetDescription()Returns project descriptionStringgetExternalId()Returns the external project identifier.intgetFixedPoolsCount()StringgetFullName()Returns project full name in the form: <parent project name> / <parent project name> / ...StringgetId()StringgetName()Returns project nameList<SBuildType>getOwnBuildTypes()Returns all build configurations registered in this certain project.List<SProject>getOwnProjects()Returns direct child projects of this project.List<SVcsRoot>getOwnVcsRoots()Returns all VCS roots used by build configurations or templates in this certain project.StringgetParentId()SProjectgetParentProject()Returns the parent project of this project.StringgetParentProjectExternalId()Returns external id of the parent project of this project.StringgetParentProjectId()Returns internal id of the parent project of this project.SProjectgetProject()StringgetProjectId()Returns the internal project identifier.List<SProject>getProjects()Returns all child projects (including children of children and so on) of this project.intgetRemovableChildrenCount()StatusgetStatus()Returns project status calculated according to cumulative status of all build configurations registered in the project.List<SVcsRoot>getVcsRoots()Returns all VCS roots used by build configurations or templates in this project and all its subprojects (not only direct).voidincRemovableChildrenCount()booleanisAdmin()Indicates that the current user can admin thr pool-project associations for thi.booleanisArchived()booleanisAssociated()booleanisCanBeDissociated()Indicates that current user can dissociate this project from this pool.booleanisRootProject()Returns true iff this project is root projectvoidsetAdmin(boolean admin)voidsetAssociated(boolean associated)voidsetCanBeDissociated(boolean canBeDissociated)
-
-
-
Constructor Detail
-
PoolProject
public PoolProject(@NotNull SProject project)
-
-
Method Detail
-
addPools
public void addPools(Collection<PoolBox> poolBoxes)
-
isAdmin
public boolean isAdmin()
Indicates that the current user can admin thr pool-project associations for thi.
-
setAdmin
public void setAdmin(boolean admin)
-
isCanBeDissociated
public boolean isCanBeDissociated()
Indicates that current user can dissociate this project from this pool.
-
setCanBeDissociated
public void setCanBeDissociated(boolean canBeDissociated)
-
isAssociated
public boolean isAssociated()
-
setAssociated
public void setAssociated(boolean associated)
-
incRemovableChildrenCount
public void incRemovableChildrenCount()
-
getDepth
public int getDepth()
-
getProject
@NotNull public SProject getProject()
-
getAllPoolsCount
public int getAllPoolsCount()
-
getFixedPoolsCount
public int getFixedPoolsCount()
-
getId
@NotNull public String getId()
- Specified by:
getIdin interfaceHierarchyUtil.HierarchyItem<String>
-
getProjectId
@NotNull public String getProjectId()
Description copied from interface:BuildProjectReturns the internal project identifier.Before 8.0 TC there was only one project identifier. Since 8.0 there are two project identifiers: internal (with a surrogate value, to use in DB) and external (that is build based on the project name, or specified by users).
- Specified by:
getProjectIdin interfaceBuildProject- Returns:
- internal id.
- See Also:
BuildProject.getExternalId()
-
getExternalId
@NotNull public String getExternalId()
Description copied from interface:BuildProjectReturns the external project identifier.- Specified by:
getExternalIdin interfaceBuildProject- Returns:
- external identifier.
- See Also:
BuildProject.getProjectId()
-
getParentProject
@Nullable public SProject getParentProject()
Description copied from interface:BuildProjectReturns the parent project of this project.Every project, except the root one, has a parent project.
- Specified by:
getParentProjectin interfaceBuildProject- Returns:
- parent project or null if it is the root project
- See Also:
BuildProject.getParentProjectId(),BuildProject.getParentProjectExternalId()
-
getOwnProjects
@NotNull public List<SProject> getOwnProjects()
Description copied from interface:BuildProjectReturns direct child projects of this project.- Specified by:
getOwnProjectsin interfaceBuildProject- Returns:
- list of projects sorted by name
-
getProjects
@NotNull public List<SProject> getProjects()
Description copied from interface:BuildProjectReturns all child projects (including children of children and so on) of this project.- Specified by:
getProjectsin interfaceBuildProject- Returns:
- list of projects sorted by name
-
getBuildTypes
@NotNull public List<SBuildType> getBuildTypes()
Description copied from interface:BuildProjectReturns all build configurations registered in this project and all its subprojects (not only direct).- Specified by:
getBuildTypesin interfaceBuildProject- Returns:
- list of build configurations sorted by name
-
getParentId
@Nullable public String getParentId()
- Specified by:
getParentIdin interfaceHierarchyUtil.HierarchyItem<String>
-
getParentProjectId
@Nullable public String getParentProjectId()
Description copied from interface:BuildProjectReturns internal id of the parent project of this project.Every project, except the root one, has a parent project.
- Specified by:
getParentProjectIdin interfaceBuildProject- Returns:
- parent project internal id or null if it is the root project
- See Also:
BuildProject.getParentProject(),BuildProject.getParentProjectExternalId()
-
getParentProjectExternalId
@Nullable public String getParentProjectExternalId()
Description copied from interface:BuildProjectReturns external id of the parent project of this project.Every project, except the root one, has a parent project.
- Specified by:
getParentProjectExternalIdin interfaceBuildProject- Returns:
- parent project external id or null if it is the root project
- See Also:
BuildProject.getParentProject(),BuildProject.getParentProjectId()
-
isArchived
public boolean isArchived()
-
isRootProject
public boolean isRootProject()
Description copied from interface:BuildProjectReturns true iff this project is root project- Specified by:
isRootProjectin interfaceBuildProject- Returns:
- see above
-
getName
@NotNull public String getName()
Description copied from interface:BuildProjectReturns project name- Specified by:
getNamein interfaceBuildProject- Returns:
- presentable name
-
getFullName
@NotNull public String getFullName()
Description copied from interface:BuildProjectReturns project full name in the form: <parent project name> / <parent project name> / ... / <project name>. Root project name is not included in this sequence, so the first name in the sequence is the name of some child of the root project.- Specified by:
getFullNamein interfaceBuildProject- Returns:
- presentable name
-
getDescription
@NotNull public String getDescription()
Description copied from interface:BuildProjectReturns project description- Specified by:
getDescriptionin interfaceBuildProject- Returns:
- project description
-
getStatus
public Status getStatus()
Description copied from interface:BuildProjectReturns project status calculated according to cumulative status of all build configurations registered in the project. Since 8.0.3: if the project is active (not archived), the status of the archived subprojects is ignored.- Specified by:
getStatusin interfaceBuildProject- Returns:
- current project status
-
getOwnBuildTypes
@NotNull public List<SBuildType> getOwnBuildTypes()
Description copied from interface:BuildProjectReturns all build configurations registered in this certain project. Does NOT include build configurations from subprojects.- Specified by:
getOwnBuildTypesin interfaceBuildProject- Returns:
- list of build configurations sorted by name
-
getOwnVcsRoots
@NotNull public List<SVcsRoot> getOwnVcsRoots()
Description copied from interface:BuildProjectReturns all VCS roots used by build configurations or templates in this certain project. Does NOT include VCS roots used by build configurations or templates in subprojects.- Specified by:
getOwnVcsRootsin interfaceBuildProject- Returns:
- list of VCS roots
-
getVcsRoots
@NotNull public List<SVcsRoot> getVcsRoots()
Description copied from interface:BuildProjectReturns all VCS roots used by build configurations or templates in this project and all its subprojects (not only direct).- Specified by:
getVcsRootsin interfaceBuildProject- Returns:
- list of vcs roots
-
compareTo
public int compareTo(@NotNull BuildProject that)- Specified by:
compareToin interfaceComparable<BuildProject>
-
getRemovableChildrenCount
public int getRemovableChildrenCount()
-
-