package performa.form;

import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.servlets.forms.NavigationFP;
import oneit.servlets.forms.SubmissionDetails;
import oneit.utils.MultiException;
import performa.orm.HiringTeam;


public class NavigateToInviteTeammatesFP extends NavigationFP
{

    @Override
    protected Map validate(SubmissionDetails submission, MultiException exceptions) 
    {
        HttpServletRequest  request     =   submission.getRequest();
        HiringTeam          hiringTeam  =   (HiringTeam)request.getAttribute("HiringTeam");
        
        BusinessObjectParser.assertFieldCondition(hiringTeam.getCountry() != null, hiringTeam, HiringTeam.FIELD_Country, exceptions);

        return super.validate(submission, exceptions);
    }
    
}