integration-impl/src/main/java/se/idsec/signservice/integration/document/impl/AbstractTbsDocumentProcessor.java
protected T validateDocumentContent(
      final TbsDocument document, final IntegrationServiceConfiguration config, final String fieldName)
      throws InputValidationException {

    try {
      final T documentObject = this.getDocumentDecoder().decodeDocument(document.getContent());
      log.debug("{}: Successfully validated document (doc-id: {})", CorrelationID.id(), document.getId());
      return documentObject;
    }
    catch (DocumentProcessingException e) {
      final String msg = String.format("Failed to load content for document '%s' - %s", document.getId(), e.getMessage());
      log.error("{}: {}", CorrelationID.id(), msg, e);
      throw new InputValidationException(fieldName + ".content", msg, e);
    }
  }
/**
   * Validates the document contents. The default implementation invokes {@link DocumentDecoder#decodeDocument(String)}.
   * 
   * @param document
   *          the document holding the content to validate
   * @param config
   *          the current policy configuration
   * @param fieldName
   *          used for error reporting and logging
   * @return the contents represented according to the document format
   * @throws InputValidationException
   *           for validation errors
   */
Validates the document contents. The default implementation invokes  DocumentDecoder#decodeDocument(String).


Validates the document contents . The default implementation invokes DocumentDecoder#decodeDocument ( String ) .
protected T validateDocumentContent(
      final TbsDocument document, final IntegrationServiceConfiguration config, final String fieldName)
      throws InputValidationException {
    try {
      final T documentObject = this.getDocumentDecoder().decodeDocument(document.getContent());
      log.debug("{}: Successfully validated document (doc-id: {})", CorrelationID.id(), document.getId());
      return documentObject;
    }
    catch (DocumentProcessingException e) {
      final String msg = String.format("Failed to load content for document '%s' - %s", document.getId(), e.getMessage());
      log.error("{}: {}", CorrelationID.id(), msg, e);
      throw new InputValidationException(fieldName + ".content", msg, e);
    }
  }
protected T validateDocumentContent ( final TbsDocument document , final IntegrationServiceConfiguration config , final String fieldName ) throws InputValidationException { try { final T documentObject = this . getDocumentDecoder ( ) . decodeDocument ( document . getContent ( ) ) ; log . debug ( "{}: Successfully validated document (doc-id: {})" , CorrelationID . id ( ) , document . getId ( ) ) ; return documentObject ; } catch ( DocumentProcessingException e ) { final String msg = String . format ( "Failed to load content for document '%s' - %s" , document . getId ( ) , e . getMessage ( ) ) ; log . error ( "{}: {}" , CorrelationID . id ( ) , msg , e ) ; throw new InputValidationException ( fieldName + ".content" , msg , e ) ; } }
Validates the document contents.
Validates the document contents .