Creates the process command from the fax job data.

@param   faxJob
The fax job object
@return  The process command to execute
324081
@Override
    protected String createGetStatusFaxJobProcessCommand(FaxJob faxJob)
    {
        //get arguments
        String commandArguments=this.createProcessCommandArgumentsForExistingFaxJob(Fax4jExeConstants.GET_STATUS_ACTION_FAX4J_EXE_COMMAND_LINE_ARGUMENT_VALUE.toString(),faxJob);
        
        //create command
        String command=this.createProcessCommand(commandArguments);
        
        return command;
    }
805708
public void updateFaxJobFromInputData(T inputData,FaxJob faxJob)
    {
        if(!this.initialized)
        {
            throw new FaxException("Fax bridge not initialized.");
        }
        
        //get fax job
        this.updateFaxJobFromInputDataImpl(inputData,faxJob);
    }
892634
public String getProperty(String key,String defaultValue)
    {
        String value=null;
        try
        {
            value=this.JOB.getProperty(key);
        }
        catch(Exception exception)
        {
            throw new FaxException("Error while extracting job property.",exception);
        }
        
        if(value==null)
        {
            value=defaultValue;
        }
        
        return value;
    }
186255
public static StepExecutionItem createJobRef(
            final String jobIdentifier,
            final String[] args,
            final boolean nodeStep,
            final StepExecutionItem handler,
            final boolean keepgoingOnSuccess,
            final String label
    )
    {
        return createJobRef(
                jobIdentifier,
                args,
                nodeStep,
                handler,
                keepgoingOnSuccess,
                null,
                null,
                null,
                null,
                null,
                label,
                false,
                null,
                false,
                false,
                null,
                false
        );
    }
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);
        }
    }
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;
    }
69720
protected void fireFaxEvent(FaxClientActionEventID id,FaxJob faxJob)
    {
        //create new fax event
        FaxClientActionEvent event=new FaxClientActionEvent(id,faxJob);

        //get listeners
        FaxClientActionEventListener[] listeners=null;
        synchronized(this.faxClientActionEventListeners)
        {
            listeners=this.faxClientActionEventListeners.toArray(new FaxClientActionEventListener[this.faxClientActionEventListeners.size()]);
        }
        
        int amount=listeners.length;
        FaxClientActionEventListener listener=null;
        for(int index=0;index<amount;index++)
        {
            //get next element
            listener=listeners[index];
            
            //fire event
            if(listener!=null)
            {
                switch(id)
                {
                    case CREATE_FAX_JOB:
                        listener.faxJobCreated(event);
                        break;
                    case SUBMIT_FAX_JOB:
                        listener.faxJobSubmitted(event);
                        break;
                    case SUSPEND_FAX_JOB:
                        listener.faxJobSuspended(event);
                        break;
                    case RESUME_FAX_JOB:
                        listener.faxJobResumed(event);
                        break;
                    case CANCEL_FAX_JOB:
                        listener.faxJobCancelled(event);
                        break;
                    default:
                        throw new FaxException("Unable to support fax event, for event ID: "+id);
                }
            }
        }
    }
1215331
protected FaxJob2HTTPRequestConverter createFaxJob2HTTPRequestConverter()
    {
        //get property part
        String propertyPart=this.getPropertyPart();

        //create converter
        FaxJob2HTTPRequestConverter converter=(FaxJob2HTTPRequestConverter)ServiceFactory.createService(FaxClientSpiConfigurationConstants.FAX_JOB2HTTP_REQUEST_CONVERTER_CLASS_NAME_PROPERTY_KEY,MultiPartFaxJob2HTTPRequestConverter.class.getName(),this,propertyPart);
        
        return converter;
    }
992198
private void winResumeFaxJob(String serverName,int faxJobID)
    {
        synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK)
        {
            //pre native call
            this.preNativeCall();
            
            //invoke native
            WindowsJNIFaxClientSpi.resumeFaxJobNative(serverName,faxJobID);
        }
    }
85900
def makeJob(tool, jobobj, step_inputs, runtime_context):
    

    if tool.tool["class"] == "Workflow":
        wfjob = CWLWorkflow(tool, jobobj, runtime_context)
        followOn = ResolveIndirect(wfjob.rv())
        wfjob.addFollowOn(followOn)
        return (wfjob, followOn)
    else:
        # get_requirement
        resourceReq, _ = tool.get_requirement("ResourceRequirement")
        if resourceReq:
            for req in ("coresMin", "coresMax", "ramMin", "ramMax",
                        "tmpdirMin", "tmpdirMax", "outdirMin", "outdirMax"):
                r = resourceReq.get(req)
                if isinstance(r, string_types) and ("$(" in r or "${" in r):
                    # Found a dynamic resource requirement so use a job wrapper
                    job = CWLJobWrapper(tool, jobobj, runtime_context)
                    return (job, job)
        job = CWLJob(tool, jobobj, runtime_context)
        return (job, job)
20213
public FaxJob submitFaxJob(T inputData)
    {
        if(inputData==null)
        {
            throw new FaxException("Input data not provided.");
        }
        
        //create fax job
        FaxJob faxJob=this.createFaxJob();
        
        //update fax job info
        this.requestParser.updateFaxJobFromInputData(inputData,faxJob);
        
        //create file info
        FileInfo fileInfo=this.requestParser.getFileInfoFromInputData(inputData);
        if(fileInfo==null)
        {
            throw new FaxException("Unable to extract file info from input data.");
        }
        
        //submit fax job
        this.submitFaxJob(faxJob,fileInfo);
        
        return faxJob;
    }
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);
    }
1077390
protected FaxJobStatus getFaxJobStatusFromWindowsFaxJobStatusString(String faxJobStatusStr)
    {
        FaxJobStatus faxJobStatus=FaxJobStatus.UNKNOWN;
        if((faxJobStatusStr!=null)&&(faxJobStatusStr.length()>0))
        {
            if((faxJobStatusStr.equalsIgnoreCase("Pending"))||(faxJobStatusStr.equalsIgnoreCase("Paused"))||(faxJobStatusStr.equalsIgnoreCase("Retrying")))
            {
                faxJobStatus=FaxJobStatus.PENDING;
            }
            else if(faxJobStatusStr.equalsIgnoreCase("In Progress"))
            {
                faxJobStatus=FaxJobStatus.IN_PROGRESS;
            }
            else if((faxJobStatusStr.equalsIgnoreCase("Failed"))||(faxJobStatusStr.equalsIgnoreCase("No Line"))||(faxJobStatusStr.equalsIgnoreCase("Retries Exceeded")))
            {
                faxJobStatus=FaxJobStatus.ERROR;
            }
        }
        
        return faxJobStatus;
    }
93845
@Override
    protected void resumeFaxJobImpl(FaxJob faxJob)
    {
        //get fax job ID
        int faxJobIDInt=WindowsFaxClientSpiHelper.getFaxJobID(faxJob);

        //invoke fax action
        this.winResumeFaxJob(this.faxServerName,faxJobIDInt);
    }
1007559
public final FaxJobStatus[] pollForFaxJobStatues(FaxJob[] faxJobs)
    {
        FaxJobStatus[] faxJobStatuses=null;
        if((faxJobs!=null)&&(faxJobs.length>0)&&(this.isFaxMonitorEventsSupported()))
        {
            faxJobStatuses=this.pollForFaxJobStatuesImpl(faxJobs);
        }

        return faxJobStatuses;
    }
1005976
protected String createProcessCommand(Enum<?> templateNameEnum,FaxJob faxJob)
    {
        //get template name
        String templateName=templateNameEnum.toString();

        //get template
        String template=this.getTemplate(templateName);
        String command=null;
        if(template!=null)
        {
            //format template
            command=this.formatTemplate(template,faxJob);
        }

        return command;
    }
1153779
@Override
    protected void submitFaxJobImpl(FaxJob faxJob)
    {
        //get connection
        Connection<MailResourcesHolder> mailConnection=this.getMailConnection();

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

        //create message
        Message message=this.createSubmitFaxJobMessage(faxJob,mailResourcesHolder);
        
        //send message
        this.sendMail(faxJob,mailConnection,message);
    }