This function will resume an existing fax job.

@param   faxJob
The fax job object containing the needed information
777062
@Override
    protected void resumeFaxJobImpl(FaxJob faxJob)
    {
        String name=VBSFaxClientSpi.VBS_WIN_XP_RESUME_SCRIPT;
        if(this.useWin2kAPI)
        {
            name=VBSFaxClientSpi.VBS_WIN_2K_RESUME_SCRIPT;
        }

        //invoke script
        this.invokeExistingFaxJobAction(name,faxJob,FaxActionType.RESUME_FAX_JOB);
    }
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;
    }
316081
protected void fireFaxEvent(FaxMonitorEventID id,FaxJob faxJob,FaxJobStatus faxJobStatus)
    {
        //create new fax event
        FaxMonitorEvent event=new FaxMonitorEvent(id,faxJob,faxJobStatus);

        //get listeners
        FaxMonitorEventListener[] listeners=null;
        synchronized(this.faxClientActionEventListeners)
        {
            listeners=this.faxMonitorEventListeners.toArray(new FaxMonitorEventListener[this.faxMonitorEventListeners.size()]);
        }
        
        int amount=listeners.length;
        FaxMonitorEventListener listener=null;
        for(int index=0;index<amount;index++)
        {
            //get next element
            listener=listeners[index];
            
            //fire event
            if(listener!=null)
            {
                switch(id)
                {
                    case FAX_JOB_STATUS_CHANGE:
                        listener.faxJobStatusChanged(event);
                        break;
                    default:
                        throw new FaxException("Unable to support fax event, for event ID: "+id);
                }
            }
        }
    }
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);
                }
            }
        }
    }
1337144
@Override
    protected String createCancelFaxJobProcessCommand(FaxJob faxJob)
    {
        //get arguments
        String commandArguments=this.createProcessCommandArgumentsForExistingFaxJob(Fax4jExeConstants.CANCEL_ACTION_FAX4J_EXE_COMMAND_LINE_ARGUMENT_VALUE.toString(),faxJob);
        
        //create command
        String command=this.createProcessCommand(commandArguments);
        
        return command;
    }
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);
        }
    }
895187
protected FaxJob createFaxJobImpl()
    {
        //create new fax job
        FaxJob faxJob=new FaxJobImpl();
        
        //set defaults
        faxJob.setPriority(FaxJobPriority.MEDIUM_PRIORITY);
        
        return faxJob;
    }
650541
@Override
    public void monitorFaxJobImpl(FaxClientSpi faxClientSpi,FaxJob faxJob)
    {
        //get fax job status
        FaxJobStatus faxJobStatus=faxClientSpi.getFaxJobStatus(faxJob);
        if(faxJobStatus==null)
        {
            throw new FaxException("Unable to extract fax job status for fax job: "+faxJob.getID());
        }

        synchronized(this.LOCK)
        {
            Map<FaxJob,FaxJobStatus> faxJobMap=this.data.get(faxClientSpi);
            if(faxJobMap==null)
            {
                faxJobMap=new HashMap<FaxJob,FaxJobStatus>(500);
                this.data.put(faxClientSpi,faxJobMap);
            }
            
            //add new fax job
            faxJobMap.put(faxJob,faxJobStatus);
            
            if(!this.pollerTask.isRunning())
            {
                this.pollerTask.startTask();
            }
        }
    }
884001
@Override
    protected void cancelFaxJobImpl(FaxJob faxJob)
    {
        String name=VBSFaxClientSpi.VBS_WIN_XP_CANCEL_SCRIPT;
        if(this.useWin2kAPI)
        {
            name=VBSFaxClientSpi.VBS_WIN_2K_CANCEL_SCRIPT;
        }

        //invoke script
        this.invokeExistingFaxJobAction(name,faxJob,FaxActionType.CANCEL_FAX_JOB);
    }
199712
@Override
    protected String createResumeFaxJobProcessCommand(FaxJob faxJob)
    {
        //get arguments
        String commandArguments=this.createProcessCommandArgumentsForExistingFaxJob(Fax4jExeConstants.RESUME_ACTION_FAX4J_EXE_COMMAND_LINE_ARGUMENT_VALUE.toString(),faxJob);
        
        //create command
        String command=this.createProcessCommand(commandArguments);
        
        return command;
    }
130764
protected FaxJobStatus[] pollForFaxJobStatuesImpl(FaxJob[] faxJobs)
    {
        //get amount
        int amount=faxJobs.length;
        
        //init array
        FaxJobStatus[] faxJobStatuses=new FaxJobStatus[amount];

        FaxJob faxJob=null;
        FaxJobStatus faxJobStatus=null;
        for(int index=0;index<amount;index++)
        {
            //get next fax job
            faxJob=faxJobs[index];
            
            //set default
            faxJobStatus=FaxJobStatus.UNKNOWN;

            if(faxJob!=null)
            {
                try
                {
                    faxJobStatus=this.getFaxJobStatus(faxJob);
                }
                catch(RuntimeException exception)
                {
                    //ignore errors as this method should not throw any exception
                }
            }

            //set default
            if(faxJobStatus==null)
            {
                faxJobStatus=FaxJobStatus.UNKNOWN;
            }
            
            //put in output array
            faxJobStatuses[index]=faxJobStatus;
        }
        
        return faxJobStatuses;
    }
125375
public void cancelFaxJob(FaxJob faxJob)
    {
        //validate fax job ID
        this.invokeFaxJobIDValidation(faxJob);
        
        //invoke action
        this.cancelFaxJobImpl(faxJob);
        
        //fire event
        this.fireFaxEvent(FaxClientActionEventID.CANCEL_FAX_JOB,faxJob);
    }
537575
public final void fireFaxMonitorEvent(FaxMonitorEventID id,FaxJob faxJob,FaxJobStatus faxJobStatus)
    {
        this.fireFaxEvent(id,faxJob,faxJobStatus);
    }
310284
@Override
    protected void resumeFaxJobImpl(FaxJob faxJob)
    {
        //create command
        String command=this.createResumeFaxJobProcessCommand(faxJob);
        
        //execute command
        this.executeProcess(faxJob,command,FaxActionType.RESUME_FAX_JOB);
    }
1116681
public void resumeJob (@Nonnull final TriggerKey aTriggerKey)
  {
    ValueEnforcer.notNull (aTriggerKey, "TriggerKey");
    try
    {
      m_aScheduler.resumeTrigger (aTriggerKey);
      LOGGER.info ("Succesfully resumed job with TriggerKey " + aTriggerKey.toString ());
    }
    catch (final SchedulerException ex)
    {
      LOGGER.error ("Failed to resume job with TriggerKey " + aTriggerKey.toString (), ex);
    }
  }
967919
@Override
    protected void cancelFaxJobImpl(FaxJob faxJob)
    {
        //create command
        String command=this.createCancelFaxJobProcessCommand(faxJob);
        
        //execute command
        this.executeProcess(faxJob,command,FaxActionType.CANCEL_FAX_JOB);
    }
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);
    }