/** * Returns the {@link Promotion} object that represents the successful promotion. * * @return null if the promotion has never been successful, or if it was but the record is already * lost. */ public Promotion getSuccessfulPromotion(JobPropertyImpl jp) { if (promotion >= 0) { PromotionProcess p = jp.getItem(name); if (p != null) return p.getBuildByNumber(promotion); } return null; }
/** Gets the {@link PromotionProcess} that this object deals with. */ public PromotionProcess getProcess() { JobPropertyImpl jp = parent.getProject().getProperty(JobPropertyImpl.class); if (jp == null) return null; return jp.getItem(name); }