Class UserChangesPolicy


  • public class UserChangesPolicy
    extends java.lang.Object
    Policy to collect build changes.
    A few words on terminology:
    • Build change is "suspicious" if some build with the change is failed but yet not fixed.
    • Change is "running", if some build with the change is currently running.
    • Change is "pending", if some configuration hasn't been run yet since the change was made.
    • "Active days" - days, when any changes to certain configuration have been made. If in a some day no any specified change was not made, this day is not counted. The set of active days can differ for different projects
    This class also contains number of factory methods for most frequently used policies.
    • Method Detail

      • createUserChangesPolicy

        public static UserChangesPolicy createUserChangesPolicy​(User user,
                                                                int numberOfActiveDays)
        Creates policy to collect all changes made by specified user in last numberOfActiveDays days.
        Parameters:
        user - user, whose changes are to be collected
        numberOfActiveDays - number of recent active days to collect changes for
        Returns:
        policy to collect all changes made by specified user in last numberOfActiveDays days.
      • createAllChangesPolicy

        public static UserChangesPolicy createAllChangesPolicy​(int numberOfActiveDays)
        Creates policy to collect all changes made in last numberOfActiveDays active days.
        Parameters:
        numberOfActiveDays - number of recent active days to collect changes for
        Returns:
        policy to collect all changes made in last numberOfActiveDays active days.
      • getUser

        public User getUser()
        Return user whose changes should be returned, or null if changes should not be filtered by user
        Returns:
        see above
      • getActiveDaysCount

        public int getActiveDaysCount()
        Return number of active days to collect changes for
        Returns:
        see above