Interface AgentTypePolicy

  • All Known Implementing Classes:
    ProjectPoolAgentTypePolicy, SimpleAgentTypePolicy

    public interface AgentTypePolicy
    Provides information about agent type policy - which run configuration can run on this agents and which can not.
    Author:
    Leonid Bushuev from JetBrains
    • Method Detail

      • getPolicyKind

        int getPolicyKind()
        Kind of the policy.
        Returns:
        1 - run all configurations from associated (by pool) projects, 2 - run selected only (but from associated projects).
      • getAllowedProjects

        @NotNull
        Set<String> getAllowedProjects()
        Projects that relates to this agent type (associated via pool).
        Returns:
        an immutable set of project identifiers; may be empty.
      • getAllowedBuildTypes

        @NotNull
        Set<String> getAllowedBuildTypes()
        Selected build types which are allowed to run on these agents.
        Returns:
        an immutable set of internal build type ids; may be empty.
      • isBuildTypeAllowed

        boolean isBuildTypeAllowed​(@NotNull
                                   String buildTypeId)
        Checks whether the specified build configuration is selected by this policy (this method does not consider pool associations).
        Returns:
        see above
      • isAllowedToRun

        boolean isAllowedToRun​(@NotNull
                               String projectId,
                               @NotNull
                               String buildTypeId)
        Checks whether the specified build configuration is allowed to run on this agent.
        Parameters:
        projectId - project to check.
        buildTypeId - build configuration to check.
        Returns:
        true if allowed.