當前位置: 首頁>>代碼示例>>Java>>正文


Java DigiDocException.getNestedException方法代碼示例

本文整理匯總了Java中ee.sk.digidoc.DigiDocException.getNestedException方法的典型用法代碼示例。如果您正苦於以下問題:Java DigiDocException.getNestedException方法的具體用法?Java DigiDocException.getNestedException怎麽用?Java DigiDocException.getNestedException使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ee.sk.digidoc.DigiDocException的用法示例。


在下文中一共展示了DigiDocException.getNestedException方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: removeDataFile

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
private void removeDataFile(File file) {
  logger.info("Removing data file: " + file.getName());
  int index = -1;
  ArrayList ddocDataFiles = ddoc.getDataFiles();
  for (int i = 0; i < ddocDataFiles.size(); i++) {
    ee.sk.digidoc.DataFile dataFile = (ee.sk.digidoc.DataFile) ddocDataFiles.get(i);
    if (dataFile.getFileName().equalsIgnoreCase(file.getName())) index = i;
  }
  if (index == -1) {
    DigiDoc4JException exception = new DigiDoc4JException("File not found");
    logger.error(exception.toString());
    throw exception;
  }

  try {
    ddoc.removeDataFile(index);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:22,代碼來源:DDocFacade.java

示例2: signRaw

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
public Signature signRaw(byte[] rawSignature) {
  logger.info("Finalizing DDoc signature");
  try {
    ddocSignature.setSignatureValue(rawSignature);
    DDocSignature signature = new DDocSignature(ddocSignature);
    if (signatureProfile == SignatureProfile.LT_TM) {
      ddocSignature.getConfirmation();
    }
    signature.setIndexInArray(getSignatureIndexInArray());
    logger.info("Signing DDoc successfully completed");
    return signature;
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:17,代碼來源:DDocFacade.java

示例3: createDDOCContainer

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
private void createDDOCContainer() {
  logger.debug("");
  try {
    ddoc = new SignedDoc("DIGIDOC-XML", "1.3");
    signatureParameters.setDigestAlgorithm(DigestAlgorithm.SHA1);
    logger.info("DDoc container created");
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:12,代碼來源:DDocFacade.java

示例4: addDataFile

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
public DataFile addDataFile(String path, String mimeType) {
  logger.info("Adding data file: " + path + ", mime type " + mimeType);
  try {
    ddoc.addDataFile(new File(path), mimeType, CONTENT_EMBEDDED_BASE64);
    return new DataFile(path, mimeType);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:11,代碼來源:DDocFacade.java

示例5: addRawSignature

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
public void addRawSignature(InputStream signatureStream) {
  logger.info("Adding raw XAdES signature");
  try {
    ddoc.readSignature(signatureStream);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:10,代碼來源:DDocFacade.java

示例6: removeSignature

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
/**
 * @deprecated will be removed in the future.
 */
public void removeSignature(int index) {
  logger.info("Removing signature index: " + index);
  try {
    ddoc.removeSignature(index);
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:13,代碼來源:DDocFacade.java

示例7: save

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
public void save(String path) {
  logger.info("Saving container to path: " + path);
  try {
    ddoc.writeToFile(new File(path));
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:10,代碼來源:DDocFacade.java

示例8: sign

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
public Signature sign(SignatureToken signer) {
  logger.info("Signing DDoc container");
  calculateSignature(signer);
  try {
    signRaw(signer.sign(getDigestAlgorithm(), ddocSignature.calculateSignedInfoXML()));
  } catch (DigiDocException e) {
    logger.error(e.getMessage());
    throw new DigiDoc4JException(e.getNestedException());
  }

  return new DDocSignature(ddocSignature);
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:13,代碼來源:DDocFacade.java

示例9: addConfirmation

import ee.sk.digidoc.DigiDocException; //導入方法依賴的package包/類
private void addConfirmation() {
  logger.debug("");
  for (Object signature : ddoc.getSignatures()) {
    try {
      ((ee.sk.digidoc.Signature) signature).getConfirmation();
    } catch (DigiDocException e) {
      logger.error(e.getMessage());
      throw new DigiDoc4JException(e.getNestedException());
    }
  }
}
 
開發者ID:open-eid,項目名稱:digidoc4j,代碼行數:12,代碼來源:DDocFacade.java


注:本文中的ee.sk.digidoc.DigiDocException.getNestedException方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。