/*
(non-Javadoc)
@see com.popbill.api.HTTaxinvoiceService#getJobState(java.lang.String, java.lang.String)
351097
@Override
	public HTTaxinvoiceJobState getJobState(String CorpNum, String JobID)
			throws PopbillException {
		return  getJobState(CorpNum, JobID, null);
	}
87252
public JsonResponse getJobStatus(String jobId) throws IOException {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put(Job.JOB_ID, jobId);
        return apiGet(ApiAction.job, params);
    }
1294858
private synchronized RunningJobImpl get(final String jobIdentifier) {
    final RunningJobImpl result = this.jobs.get(jobIdentifier);
    if (null == result) {
      throw new RuntimeException("Trying to get a RunningJob that is unknown: " + jobIdentifier);
    }
    return result;
  }
1012832
public static int getFaxJobID(FaxJob faxJob)
    {
        if(faxJob==null)
        {
            throw new FaxException("Fax job not provided.");
        }

        //get fax job ID
        String faxJobID=faxJob.getID();
        WindowsFaxClientSpiHelper.validateFaxJobID(faxJobID);
        int faxJobIDInt=Integer.parseInt(faxJobID);

        return faxJobIDInt;
    }
320742
@Override
	public String getJobDescription(JobKey jobKey) throws SchedulerException {
		return scheduler.getJobDetail(jobKey).getDescription();
	}
142629
public boolean getState()
    {
        if (this.getData() == null)
            return m_bTrueIfNull;
        int fieldValue = (int)this.getValue();
        boolean returnValue = false;
        if ((fieldValue & (1 << m_iBitNumber)) != 0)
            returnValue = true;
        if (m_bTrueIfMatch)
            return returnValue;
        else
            return !returnValue;
    }
746888
public JobResult waitForJobState(String jobname, CrawlControllerState state, int tries, int interval) {
        JobResult jobResult = null;
        if (tries <= 0) {
            tries = 1;
        }
        if (interval <= 99) {
            interval = 1000;
        }
        boolean bLoop = true;
        while (bLoop && tries > 0) {
            jobResult = job(jobname);
            // debug
            //System.out.println(jobResult.status + " - " + ResultStatus.OK);
            if (jobResult.status == ResultStatus.OK) {
                // debug
                //System.out.println(jobResult.job.crawlControllerState + " - " + state.name());
                if ((state == null && jobResult.job.crawlControllerState == null) || (state != null && state.name().equals(jobResult.job.crawlControllerState))) {
                    bLoop = false;
                }
            }
            --tries;
            if (bLoop && tries > 0) {
                try {
                    Thread.sleep(interval);
                } catch (InterruptedException e) {
                }
            }
        }
        return jobResult;
    }
535305
@Override
    protected FaxJob createFaxJobImpl()
    {
        //get client
        HylaFAXClient client=this.getHylaFAXClient();

        FaxJob faxJob=null;
        try
        {
            //create job
            Job job=client.createJob();
            faxJob=new HylaFaxJob(job);
        }
        catch(RuntimeException exception)
        {
            throw exception;
        }
        catch(Exception exception)
        {
            throw new FaxException("General error.",exception);
        }
        
        return faxJob;
    }
972682
@Override
	public FaxResult[] getFaxResultRN(String corpNum, String requestNum)
			throws PopbillException {
		if (requestNum == null)
			throw new PopbillException(-99999999, "전송요청번호가 입력되지 않았습니다.");

		return httpget("/FAX/Get/" + requestNum, corpNum, null,
				FaxResult[].class);
	}
1340763
public String requestJob(String CorpNum, QueryType queryType, String SDate, String EDate, String UserID) throws PopbillException {
		
		if (SDate == null || SDate.isEmpty())
			throw new PopbillException(-99999999, "시작일자가 입력되지 않았습니다.");
		if (EDate == null || EDate.isEmpty())
			throw new PopbillException(-99999999, "종료일자가 입력되지 않았습니다.");
		
		JobIDResponse response = httppost("/HomeTax/Cashbill/" + queryType.name() 
				+"?SDate=" + SDate +"&EDate=" + EDate ,CorpNum, null, UserID, JobIDResponse.class);
		
		return response.jobID;
	}
233612
public static String getJobRunState(int state) {
    if (state < 1 || state >= runStates.length) {
      return UNKNOWN;
    }
    return runStates[state];
  }
131514
public void setJobStatesToNotify(java.util.Collection<String> jobStatesToNotify) {
        if (jobStatesToNotify == null) {
            this.jobStatesToNotify = null;
            return;
        }

        this.jobStatesToNotify = new java.util.ArrayList<String>(jobStatesToNotify);
    }
371563
@Override
    public Response update(String CorpNum, MgtKeyType KeyType, String MgtKey,
                           Taxinvoice taxinvoice) throws PopbillException {
        return update(CorpNum, KeyType, MgtKey, taxinvoice, null);

    }
597225
@Override
    public TaxinvoiceInfo getInfo(String CorpNum, MgtKeyType KeyType,
                                  String MgtKey) throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKey == null || MgtKey.isEmpty())
            throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

        return httpget("/Taxinvoice/" + KeyType.name() + "/" + MgtKey, CorpNum,
                null, TaxinvoiceInfo.class);
    }
577780
public JobDetails getJobByJobID(String cluster, String jobId,
      boolean populateTasks) throws IOException {
    return getJobByJobID(new QualifiedJobId(cluster, jobId), populateTasks);
  }
884019
static int getOldNewJobRunState(
    org.apache.hadoop.mapreduce.JobStatus.State state) {
    return state.getValue();
  }
459920
@Override
    public String getPopUpURL(String CorpNum, MgtKeyType KeyType,
                              String MgtKey, String UserID) throws PopbillException {
        if (KeyType == null)
            throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다.");
        if (MgtKey == null || MgtKey.isEmpty())
            throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다.");

        URLResponse response = httpget("/Taxinvoice/" + KeyType.name() + "/"
                + MgtKey + "?TG=POPUP", CorpNum, UserID, URLResponse.class);

        return response.url;
    }