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 void
addPools(Collection<PoolBox> poolBoxes)
int
compareTo(BuildProject that)
int
getAllPoolsCount()
List<PoolBox>
getAssociatedPools()
List<SBuildType>
getBuildTypes()
Returns all build configurations registered in this project and all its subprojects (not only direct).int
getDepth()
String
getDescription()
Returns project descriptionString
getExternalId()
Returns the external project identifier.int
getFixedPoolsCount()
String
getFullName()
Returns project full name in the form: <parent project name> / <parent project name> / ...String
getId()
String
getName()
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.String
getParentId()
SProject
getParentProject()
Returns the parent project of this project.String
getParentProjectExternalId()
Returns external id of the parent project of this project.String
getParentProjectId()
Returns internal id of the parent project of this project.SProject
getProject()
String
getProjectId()
Returns the internal project identifier.List<SProject>
getProjects()
Returns all child projects (including children of children and so on) of this project.int
getRemovableChildrenCount()
Status
getStatus()
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).void
incRemovableChildrenCount()
boolean
isAdmin()
Indicates that the current user can admin thr pool-project associations for thi.boolean
isArchived()
boolean
isAssociated()
boolean
isCanBeDissociated()
Indicates that current user can dissociate this project from this pool.boolean
isRootProject()
Returns true iff this project is root projectvoid
setAdmin(boolean admin)
void
setAssociated(boolean associated)
void
setCanBeDissociated(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:
getId
in interfaceHierarchyUtil.HierarchyItem<String>
-
getProjectId
@NotNull public String getProjectId()
Description copied from interface:BuildProject
Returns 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:
getProjectId
in interfaceBuildProject
- Returns:
- internal id.
- See Also:
BuildProject.getExternalId()
-
getExternalId
@NotNull public String getExternalId()
Description copied from interface:BuildProject
Returns the external project identifier.- Specified by:
getExternalId
in interfaceBuildProject
- Returns:
- external identifier.
- See Also:
BuildProject.getProjectId()
-
getParentProject
@Nullable public SProject getParentProject()
Description copied from interface:BuildProject
Returns the parent project of this project.Every project, except the root one, has a parent project.
- Specified by:
getParentProject
in 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:BuildProject
Returns direct child projects of this project.- Specified by:
getOwnProjects
in interfaceBuildProject
- Returns:
- list of projects sorted by name
-
getProjects
@NotNull public List<SProject> getProjects()
Description copied from interface:BuildProject
Returns all child projects (including children of children and so on) of this project.- Specified by:
getProjects
in interfaceBuildProject
- Returns:
- list of projects sorted by name
-
getBuildTypes
@NotNull public List<SBuildType> getBuildTypes()
Description copied from interface:BuildProject
Returns all build configurations registered in this project and all its subprojects (not only direct).- Specified by:
getBuildTypes
in interfaceBuildProject
- Returns:
- list of build configurations sorted by name
-
getParentId
@Nullable public String getParentId()
- Specified by:
getParentId
in interfaceHierarchyUtil.HierarchyItem<String>
-
getParentProjectId
@Nullable public String getParentProjectId()
Description copied from interface:BuildProject
Returns internal id of the parent project of this project.Every project, except the root one, has a parent project.
- Specified by:
getParentProjectId
in 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:BuildProject
Returns external id of the parent project of this project.Every project, except the root one, has a parent project.
- Specified by:
getParentProjectExternalId
in 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:BuildProject
Returns true iff this project is root project- Specified by:
isRootProject
in interfaceBuildProject
- Returns:
- see above
-
getName
@NotNull public String getName()
Description copied from interface:BuildProject
Returns project name- Specified by:
getName
in interfaceBuildProject
- Returns:
- presentable name
-
getFullName
@NotNull public String getFullName()
Description copied from interface:BuildProject
Returns 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:
getFullName
in interfaceBuildProject
- Returns:
- presentable name
-
getDescription
@NotNull public String getDescription()
Description copied from interface:BuildProject
Returns project description- Specified by:
getDescription
in interfaceBuildProject
- Returns:
- project description
-
getStatus
public Status getStatus()
Description copied from interface:BuildProject
Returns 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:
getStatus
in interfaceBuildProject
- Returns:
- current project status
-
getOwnBuildTypes
@NotNull public List<SBuildType> getOwnBuildTypes()
Description copied from interface:BuildProject
Returns all build configurations registered in this certain project. Does NOT include build configurations from subprojects.- Specified by:
getOwnBuildTypes
in interfaceBuildProject
- Returns:
- list of build configurations sorted by name
-
getOwnVcsRoots
@NotNull public List<SVcsRoot> getOwnVcsRoots()
Description copied from interface:BuildProject
Returns 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:
getOwnVcsRoots
in interfaceBuildProject
- Returns:
- list of VCS roots
-
getVcsRoots
@NotNull public List<SVcsRoot> getVcsRoots()
Description copied from interface:BuildProject
Returns all VCS roots used by build configurations or templates in this project and all its subprojects (not only direct).- Specified by:
getVcsRoots
in interfaceBuildProject
- Returns:
- list of vcs roots
-
compareTo
public int compareTo(@NotNull BuildProject that)
- Specified by:
compareTo
in interfaceComparable<BuildProject>
-
getRemovableChildrenCount
public int getRemovableChildrenCount()
-
-