Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * 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);
 }