This function will submit a new fax job.<br>
The fax job ID may be populated by this method in the provided
fax job object.

@param   faxJob
The fax job object containing the needed information
760316
@Override
    protected void submitFaxJobImpl(FaxJob faxJob)
    {
        //get fax job
        HylaFaxJob hylaFaxJob=(HylaFaxJob)faxJob;
        
        //get client
        HylaFAXClient client=this.getHylaFAXClient();

        try
        {
            this.submitFaxJob(hylaFaxJob,client);
        }
        catch(FaxException exception)
        {
            throw exception;
        }
        catch(Exception exception)
        {
            throw new FaxException("General error.",exception);
        }
    }
1357027
@Override
    protected void resumeFaxJobImpl(FaxJob faxJob)
    {
        //get connection
        Connection<MailResourcesHolder> mailConnection=this.getMailConnection();

        //get holder
        MailResourcesHolder mailResourcesHolder=mailConnection.getResource();

        //create message
        Message message=this.createResumeFaxJobMessage(faxJob,mailResourcesHolder);
        
        //send message
        this.sendMail(faxJob,mailConnection,message);
    }
1073896
public void updateFaxJob(FaxJob faxJob,HTTPResponse httpResponse,FaxActionType faxActionType)
    {
        //get path
        String path=this.getPathToResponseData(faxActionType);

        //get fax job ID
        String id=this.findValue(httpResponse,path);
        
        if(id!=null)
        {
            faxJob.setID(id);
        }
    }
893924
private static FaxJobMonitor createFaxJobMonitor(Map<String,String> systemConfig)
    {
        //get class name
        String className=systemConfig.get(FaxClientSpiFactory.FAX_JOB_MONITOR_CLASS_NAME_PROPERTY_KEY);
        if((className==null)||(className.length()==0))
        {
            className=FaxJobMonitorImpl.class.getName();
        }

        //create new instance
        FaxJobMonitor faxJobMonitorInstance=(FaxJobMonitor)ReflectionHelper.createInstance(className);

        return faxJobMonitorInstance;
    }
852566
@Override
    protected void submitFaxJobImpl(FaxJob faxJob)
    {
        String name=VBSFaxClientSpi.VBS_WIN_XP_SUBMIT_SCRIPT;
        if(this.useWin2kAPI)
        {
            name=VBSFaxClientSpi.VBS_WIN_2K_SUBMIT_SCRIPT;
        }
        
        //setup input data
        Object[] input=setupSubmitFaxJobInput(faxJob);
        
        //invoke script
        this.invokeScript(faxJob,name,input,FaxActionType.SUBMIT_FAX_JOB);
    }
744189
@Override
    protected synchronized void submitFaxJobImpl(FaxJob faxJob)
    {
        //get the COMM port connection
        Connection<CommPortAdapter> connection=this.getCommPortConnection();

        //get adapter
        CommPortAdapter adapter=connection.getResource();

        //invoke action
        this.submitFaxJobImpl(faxJob,adapter);
    }
515845
public void printJob(PrinterJob job)
    {
        Frame frame = this.getFrame();
        dialog = new PrintDialog(frame, false);
        
        dialog.pack();
        if (frame != null)
            this.centerDialogInFrame(dialog, frame);

        
        Map<String,Object> map = new Hashtable<String,Object>();
        map.put("job", job);
        SyncPageWorker thread = new SyncPageWorker(dialog, map)
        {
            public void runPageLoader()
            {
                Thread swingPageLoader = new Thread("SwingPageLoader")
                {
                    public void run()
                    {
                        ((PrintDialog)m_syncPage).setVisible(true);
                    }
                };
                SwingUtilities.invokeLater(swingPageLoader);
            }
            public void afterPageDisplay()
            {
                Thread swingPageLoader = new Thread("SwingPageLoader")
                {
                    public void run()
                    {
                        try {
                            PrinterJob job = (PrinterJob)get("job");
                            job.print();
                        } catch (PrinterException ex) {
                            ex.printStackTrace ();
                        }
                        ((PrintDialog)m_syncPage).setVisible(false);
                    }
                };
                SwingUtilities.invokeLater(swingPageLoader);
            }
        };
        thread.start();
    }
471671
protected void cancelFaxJob(HylaFaxJob faxJob,HylaFAXClient client) throws Exception
    {
        //get job
        Job job=faxJob.getHylaFaxJob();
        
        //cancel job
        client.kill(job);
    }
839506
protected Object[] setupSubmitFaxJobInput(FaxJob faxJob)
    {
        //init list
        List<Object> inputList=new LinkedList<Object>();
        
        //set fax server information
        inputList.add(this.faxServerName);

        //set fax values
        File file=faxJob.getFile();
        inputList.add(file);
        String documentName=faxJob.getProperty(FaxJobExtendedPropertyConstants.DOCUMENT_NAME_FAX_JOB_PROPERTY_KEY.toString(),null);
        if((documentName==null)||(documentName.length()==0))
        {
            documentName=file.getName();
        }
        inputList.add(documentName);

        if(this.useWin2kAPI)
        {
            //set target information
            inputList.add(faxJob.getTargetAddress());
            inputList.add(faxJob.getTargetName());

            //set sender information
            inputList.add(faxJob.getSenderName());
            inputList.add(faxJob.getSenderFaxNumber());
        }
        else
        {
            FaxJobPriority priority=faxJob.getPriority();
            String valueStr="fptNORMAL";
            if(priority!=null)
            {
                switch(priority)
                {
                    case LOW_PRIORITY:
                        valueStr="fptLOW";
                        break;
                    case MEDIUM_PRIORITY:
                        valueStr="fptNORMAL";
                        break;
                    case HIGH_PRIORITY:
                        valueStr="fptHIGH";
                        break;
                }
            }
            inputList.add(valueStr);

            //set target information
            inputList.add(faxJob.getTargetAddress());
            inputList.add(faxJob.getTargetName());

            //set sender information
            inputList.add(faxJob.getSenderName());
            inputList.add(faxJob.getSenderFaxNumber());
            inputList.add(faxJob.getSenderEmail());
        }
        
        //convert to array
        int size=inputList.size();
        Object[] input=inputList.toArray(new Object[size]);
        
        return input;
    }
81065
@Override
    protected void updateFaxJobFromInputDataImpl(Message inputData,FaxJob faxJob)
    {
        String targetAddress=null;
        String senderEmail=null;
        try
        {
            //get target address
            targetAddress=this.getTargetAddress(inputData);
            
            //get sender email
            senderEmail=this.getSenderEmail(inputData);
        }
        catch(MessagingException exception)
        {
            throw new FaxException("Unable to extract fax job data from mail message.",exception);
        }
        
        //update fax job
        faxJob.setTargetAddress(targetAddress);
        faxJob.setSenderEmail(senderEmail);
    }
1147585
def submit_job(self, job_definition, parameters, job_name=None, queue=None):
        """"""
        if job_name is None:
            job_name = _random_id()
        response = self._client.submit_job(
            jobName=job_name,
            jobQueue=queue or self.get_active_queue(),
            jobDefinition=job_definition,
            parameters=parameters
        )
        return response['jobId']
930872
public final void initialize(Map<String,String> configuration,Logger logger,FaxJobMonitor faxJobMonitor)
    {
        if(this.initialized)
        {
            throw new FaxException("Fax client SPI already initialized.");
        }
        
        //set flag
        this.initialized=true;

        //get property part
        String propertyPart=this.getPropertyPart();

        //get configuration
        this.spiConfiguration=new ConfigurationHolderImpl(configuration,propertyPart);

        //get logger
        this.spiLogger=logger;

        //log fax client SPI information
        this.spiLogger.logDebug(new Object[]{"Initializing fax client SPI of type: ",this.getClass().getName(),"\nProvider Information:\n",this.getProvider(),"\nSPI Configuration:\n",configuration},null);

        //get fax job monitor
        this.spiFaxJobMonitor=faxJobMonitor;
        
        //init listeners data structures
        this.faxClientActionEventListeners=new HashSet<FaxClientActionEventListener>();
        this.faxMonitorEventListeners=new HashSet<FaxMonitorEventListener>();
        
        //initialize
        this.initializeImpl();
    }
223091
@Override
    protected void submitFaxJobImpl(FaxJob faxJob)
    {
        //get fax job values
        String targetAddress=faxJob.getTargetAddress();
        String targetName=faxJob.getTargetName();
        if(targetName==null)
        {
            targetName="";
        }
        String senderName=faxJob.getSenderName();
        if(senderName==null)
        {
            senderName="";
        }
        File file=faxJob.getFile();
        String filePath=null;
        try
        {
            filePath=file.getCanonicalPath();
        }
        catch(Exception exception)
        {
            throw new FaxException("Unable to extract canonical path from file: "+file,exception);
        }
        String documentName=faxJob.getProperty(WindowsFaxClientSpi.FaxJobExtendedPropertyConstants.DOCUMENT_NAME_PROPERTY_KEY.toString(), "");
        
        //invoke fax action
        int faxJobIDInt=this.winSubmitFaxJob(this.faxServerName,targetAddress,targetName,senderName,filePath,documentName);
        
        //validate fax job ID
        WindowsFaxClientSpiHelper.validateFaxJobID(faxJobIDInt);
        
        //set fax job ID
        String faxJobID=String.valueOf(faxJobIDInt);
        faxJob.setID(faxJobID);
    }
1157979
public static void validateFaxJobID(String faxJobID)
    {
        if((faxJobID==null)||(faxJobID.length()==0))
        {
            throw new FaxException("Fax job ID not provided.");
        }
        int faxJobIDInt=Integer.parseInt(faxJobID);
        WindowsFaxClientSpiHelper.validateFaxJobID(faxJobIDInt);
    }
1174674
public void monitorFaxJob(FaxClientSpi faxClientSpi,FaxJob faxJob)
    {
        if(faxClientSpi==null)
        {
            throw new FaxException("Fax client SPI not provided.");
        }
        if(faxJob==null)
        {
            throw new FaxException("Fax job not provided.");
        }
        String id=faxJob.getID();
        if((id==null)||(id.length()==0))
        {
            throw new FaxException("Missing fax job ID in provided fax job.");
        }
        
        //monitor fax job
        this.monitorFaxJobImpl(faxClientSpi,faxJob);
        
    }
895187
protected FaxJob createFaxJobImpl()
    {
        //create new fax job
        FaxJob faxJob=new FaxJobImpl();
        
        //set defaults
        faxJob.setPriority(FaxJobPriority.MEDIUM_PRIORITY);
        
        return faxJob;
    }
474410
protected void invokeFaxJobIDValidation(FaxJob faxJob)
    {
        //validate fax job is not null
        this.invokeFaxJobNullValidation(faxJob);

        //validate fax job ID
        String faxJobID=faxJob.getID();
        if((faxJobID==null)||(faxJobID.length()==0))
        {
            throw new FaxException("Fax job ID not provided.");
        }
    }