package performa.form;

import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.*;
import oneit.objstore.StorageException;
import oneit.servlets.forms.*;
import oneit.servlets.process.*;
import oneit.utils.BusinessException;
import performa.orm.*;


public class AddAdditionalHiringTeamFP  extends ORMProcessFormProcessor
{
    @Override
    public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
    {
        HttpServletRequest  request     =   submission.getRequest();
        InviteTeammateNPO   inviteTeammate  =   (InviteTeammateNPO) process.getAttribute("InviteTeammate");

        LogMgr.log(HiringTeam.LOG, LogLevel.PROCESSING1, "Inside AddAdditionalHiringTeamFP for ", inviteTeammate);
        
        inviteTeammate.addToHiringTeams(HiringTeamLinkNPO.createHiringTeamLinkNPO(process.getTransaction()));
        
        return RedisplayResult.getInstance();
    }
}