コード例 #1
0
ファイル: ConfigManager.java プロジェクト: beppec56/odf-xades
 /**
  * Returns the DigiDocFactory instance
  *
  * @return DigiDocFactory implementation
  */
 public DigiDocFactory getSignedDocFactory() throws SignedDocException {
   DigiDocFactory digFac = null;
   try {
     // ROB
     digFac = (DigiDocFactory) Class.forName(getProperty("SIGNEDDOC_FACTORY_IMPL")).newInstance();
     digFac.init();
   } catch (SignedDocException ex) {
     throw ex;
   } catch (Exception ex) {
     SignedDocException.handleException(ex, SignedDocException.ERR_DIG_FAC_INIT);
   }
   return digFac;
 }
コード例 #2
0
ファイル: SignedDoc.java プロジェクト: beppec56/odf-xades
 /**
  * Adds a new Signature object by reading it from input stream. This method can be used for
  * example during mobile signing process where the web-service returns new signature in XML
  *
  * @param is input stream
  */
 public void readSignature(InputStream is) throws SignedDocException {
   // ROB
   // DigiDocFactory ddfac = ConfigManager.instance().getDigiDocFactory();
   DigiDocFactory ddfac = ConfigManager.instance().getSignedDocFactory();
   Signature sig = ddfac.readSignature(this, is);
 }