Class ProjectPoolAgentTypePolicy
- java.lang.Object
-
- jetbrains.buildServer.serverSide.agentTypes.ProjectPoolAgentTypePolicy
-
- All Implemented Interfaces:
AgentTypePolicy
public class ProjectPoolAgentTypePolicy extends Object implements AgentTypePolicy
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Set<String>
getAllowedBuildTypes()
Selected build types.Set<String>
getAllowedProjects()
Allowed projects.int
getPolicyKind()
Kind of the policy.int
hashCode()
boolean
isAllowedToRun(String projectId, String buildTypeId)
Checks whether the specified build configuration is allowed to run on this agent.boolean
isBuildTypeAllowed(String buildTypeId)
Checks whether the specified build configuration is selected by this policy (this method does not consider pool associations).String
toString()
-
-
-
Method Detail
-
getPolicyKind
public int getPolicyKind()
Kind of the policy. SeeSimpleAgentTypePolicy
- Specified by:
getPolicyKind
in interfaceAgentTypePolicy
- Returns:
- 1 - run all configurations from associated (by pool) projects, 2 - run selected only (but from associated projects).
-
getAllowedProjects
@NotNull public Set<String> getAllowedProjects()
Allowed projects.- Specified by:
getAllowedProjects
in interfaceAgentTypePolicy
- Returns:
- an immutable set of project identifiers; may be ampty.
-
getAllowedBuildTypes
@NotNull public Set<String> getAllowedBuildTypes()
Selected build types.- Specified by:
getAllowedBuildTypes
in interfaceAgentTypePolicy
- Returns:
- an immutable set of build type identifiers; may be ampty.
-
isBuildTypeAllowed
public boolean isBuildTypeAllowed(@NotNull String buildTypeId)
Checks whether the specified build configuration is selected by this policy (this method does not consider pool associations).- Specified by:
isBuildTypeAllowed
in interfaceAgentTypePolicy
- Returns:
- see above
-
isAllowedToRun
public boolean isAllowedToRun(@NotNull String projectId, @NotNull String buildTypeId)
Checks whether the specified build configuration is allowed to run on this agent.- Specified by:
isAllowedToRun
in interfaceAgentTypePolicy
- Parameters:
projectId
-buildTypeId
- build configuration to check.- Returns:
- true if allowed.
-
-