package com.capgemini.reports.releasestatus;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.teamcenter.soa.client.model.strong.Item;
import com.teamcenter.soa.client.model.strong.ItemRevision;

import java.io.Serializable;

/**
 * This interface provides an algorithm which can chose a specific Revision of an Item.
 */
public interface RevisionSelector extends Serializable {

    /**
     * Returns the correct {@link ItemRevision} of the {@link Item}. <br>
     * The exact algorithm for selecting the Revision must be coded inside this method. <br>
     *
     * @param session the Tc session
     * @param item    the {@link Item} for which we need to find a Revision
     * @return ItemRevision the selected Revision
     */
    RevisionStatusAndDate selectRevision(final TcSession session, final Item item);
}
